File: copy.mak

package info (click to toggle)
apt 0.3.19
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,328 kB
  • ctags: 4,573
  • sloc: cpp: 23,660; sh: 2,279; makefile: 369; perl: 209
file content (27 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (3)
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
# -*- make -*-

# This installs arbitary files into a directory

# Input
# $(SOURCE) - The documents to use
# $(TO)     - The directory to put them in
# All output is writtin to files in the build/$(TO) directory

# See defaults.mak for information about LOCAL

# Some local definitions
LOCAL := copy-$(firstword $(SOURCE))
$(LOCAL)-LIST := $(addprefix $(TO)/,$(SOURCE))

# Install generation hooks
doc: $($(LOCAL)-LIST)
veryclean: veryclean/$(LOCAL)

$($(LOCAL)-LIST) : $(TO)/% : %
	echo Installing $< to $(@D)
	cp $< $(@D)

# Clean rule
.PHONY: veryclean/$(LOCAL)
veryclean/$(LOCAL):
	-rm -rf $($(@F)-LIST)