-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (47 loc) · 1.61 KB
/
Copy pathMakefile
File metadata and controls
69 lines (47 loc) · 1.61 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## This is web/makeIntro2025
## This section is for Dushoff-style vim-setup and vim targeting
current: target
-include target.mk
Ignore = target.mk
## vim_session depends on no other files
vim_session:
bash -ic "vmt README.md"
######################################################################
Sources += $(wildcard *.md)
######################################################################
Sources += $(wildcard *.R)
## A non-trivial dependency with an explicit recipe
calculate.Rout: calculate.R
R --vanilla < calculate.R > calculate.Rout
Ignore += fev.csv
fev.csv:
wget -O fev.csv "https://hbiostat.org/data/repo/FEV.csv"
## We can use variables in our recipe to avoid duplication and silliness
analyze.Rout: analyze.R fev.csv
R --vanilla < $< > $@
## We could also give the recipe line above a variable name... or put it in an included make file
## < takes from stdin
## > places stuff stdout
## there is also something called stderr
######################################################################
## A makestuff example
fev.Rout: fev.R fev.csv
$(pipeR)
######################################################################
### Makestuff
Sources += Makefile
Ignore += makestuff
msrepo = https://github.com/dushoff
## ln -s ../makestuff . ## Do this first if you want a linked makestuff
Makefile: makestuff/00.stamp
makestuff/%.stamp: | makestuff
- $(RM) makestuff/*.stamp
cd makestuff && $(MAKE) pull
touch $@
makestuff:
git clone --depth 1 $(msrepo)/makestuff
-include makestuff/os.mk
-include makestuff/pipeR.mk
-include makestuff/texj.mk
-include makestuff/git.mk
-include makestuff/visual.mk