-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
46 lines (33 loc) · 1.07 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.RECIPEPREFIX := |
.DEFAULT_GOAL := emacs
# Adapted From: https://www.systutorials.com/how-to-get-the-full-path-and-directory-of-a-makefile-itself/
mkfilePath := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfileDir := $(dir $(mkfilePath))
chmodBin := chmod +x $(mkfileDir)/bundle/bin/*
pre-init:
|-fd . $(mkfileDir) -HIt d -t e -x rm -rf
tangle-setup:
|cp $(mkfileDir)/bundle/bin/org-tangle $(mkfileDir)/bundle/bin/backup-tangle
|$(chmodBin)
tangle: tangle-setup
|yes yes | fd . $(mkfileDir) \
-HId 1 -e org \
-E testing.aiern.org \
-E resting.aiern.org \
-x $(mkfileDir)/bundle/bin/backup-tangle
|$(chmodBin)
subinit: pre-init
|git -C $(mkfileDir) submodule sync --recursive
# Just for documentation purposes
# |git -C $(mkfileDir) submodule foreach 'git -C $$toplevel config submodule.$$name.ignore all'
pull: subinit
|git -C $(mkfileDir) pull
add:
|git -C $(mkfileDir) add .
commit:
|-git -C $(mkfileDir) commit --allow-empty-message -am ""
cammit: pre-init add commit
push: cammit
|-git -C $(mkfileDir) push
super-push: tangle push
include $(mkfileDir)/tests.mk