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