]>
Commit | Line | Data |
---|---|---|
c3c459fc AL |
1 | # -*- make -*- |
2 | ||
3 | # This installs arbitary files into a directory | |
4 | ||
5 | # Input | |
6 | # $(SOURCE) - The documents to use | |
7 | # $(TO) - The directory to put them in | |
8 | # All output is writtin to files in the build/$(TO) directory | |
9 | ||
10 | # See defaults.mak for information about LOCAL | |
11 | ||
12 | # Some local definitions | |
13 | LOCAL := copy-$(firstword $(SOURCE)) | |
14 | $(LOCAL)-LIST := $(addprefix $(TO)/,$(SOURCE)) | |
15 | ||
16 | # Install generation hooks | |
17 | doc: $($(LOCAL)-LIST) | |
18 | veryclean: veryclean/$(LOCAL) | |
19 | ||
b2e465d6 AL |
20 | MKDIRS += $(dir $($(LOCAL)-LIST)) |
21 | ||
c3c459fc AL |
22 | $($(LOCAL)-LIST) : $(TO)/% : % |
23 | echo Installing $< to $(@D) | |
24 | cp $< $(@D) | |
25 | ||
26 | # Clean rule | |
27 | .PHONY: veryclean/$(LOCAL) | |
28 | veryclean/$(LOCAL): | |
29 | -rm -rf $($(@F)-LIST) |