3 # This installs arbitrary files into a directory
6 # $(SOURCE) - The documents to use
7 # $(TO) - The directory to put them in
8 # $(TARGET) - The global target to add the local target as a dependency
10 # All output is writtin to files in the build/$(TO) directory
12 # See defaults.mak for information about LOCAL
14 # Some local definitions
15 LOCAL := copy-$(firstword $(SOURCE))
16 $(LOCAL)-LIST := $(addprefix $(TO)/,$(SOURCE))
18 # Install generation hooks
19 $(TARGET): $($(LOCAL)-LIST)
20 veryclean: veryclean/$(LOCAL)
22 MKDIRS += $(dir $($(LOCAL)-LIST))
24 $($(LOCAL)-LIST) : $(TO)/% : % dirs
25 echo Installing $< to $(@D)
29 .PHONY: veryclean/$(LOCAL)