]> git.saurik.com Git - apt-legacy.git/blame - buildlib/copy.mak
Commit that APT bug fix from their bug tracker.
[apt-legacy.git] / buildlib / copy.mak
CommitLineData
da6ee469
JF
1# -*- make -*-
2
00ec24d0 3# This installs arbitrary files into a directory
da6ee469
JF
4
5# Input
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
9# to.
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
15LOCAL := copy-$(firstword $(SOURCE))
16$(LOCAL)-LIST := $(addprefix $(TO)/,$(SOURCE))
17
18# Install generation hooks
19$(TARGET): $($(LOCAL)-LIST)
20veryclean: veryclean/$(LOCAL)
21
22MKDIRS += $(dir $($(LOCAL)-LIST))
23
24$($(LOCAL)-LIST) : $(TO)/% : %
25 echo Installing $< to $(@D)
26 cp $< $(@D)
27
28# Clean rule
29.PHONY: veryclean/$(LOCAL)
30veryclean/$(LOCAL):
31 -rm -rf $($(@F)-LIST)