]> andersk Git - config-package-dev.git/blobdiff - transform-files.mk
Improve config-package-dev documentation and examples.
[config-package-dev.git] / transform-files.mk
index 48e0fc03d434e64f1e8f46c0d7cac80a2e3ad826..d0de55a99a924449d8d0342097dc219873b04653 100644 (file)
@@ -17,6 +17,9 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # 02111-1307 USA.
 
+# Don't include transform-files.mk in your rules files directly;
+# instead use config-package.mk.
+
 ifndef _cdbs_rules_transform_files
 _cdbs_rules_transform_files = 1
 
@@ -24,12 +27,12 @@ include /usr/share/cdbs/1/rules/check-files.mk
 
 DEB_TRANSFORM_FILES = $(foreach package,$(DEB_ALL_PACKAGES),$(DEB_TRANSFORM_FILES_$(package)))
 
-DEB_TRANSFORM_FILES_DIR=debian/transform_file_copies
+DEB_TRANSFORM_FILES_TMPDIR=debian/transform_file_copies
 
-debian_transform_files = $(patsubst %,$(DEB_TRANSFORM_FILES_DIR)%,$(1))
-undebian_transform_files = $(patsubst $(DEB_TRANSFORM_FILES_DIR)%,%,$(1))
+debian_transform_files = $(patsubst %,$(DEB_TRANSFORM_FILES_TMPDIR)%,$(1))
+undebian_transform_files = $(patsubst $(DEB_TRANSFORM_FILES_TMPDIR)%,%,$(1))
 
-common-build-indep:: $(foreach file,$(DEB_TRANSFORM_FILES),$(call debian_transform_files,$(file)))
+common-build-arch common-build-indep:: $(foreach file,$(DEB_TRANSFORM_FILES),$(call debian_transform_files,$(file)))
 
 $(call debian_transform_files,%): $(call debian_check_files,%)
        mkdir -p $(@D)
@@ -40,11 +43,10 @@ $(call debian_transform_files,%): $(call debian_check_files,%)
 $(patsubst %,binary-install/%,$(DEB_ALL_PACKAGES)) :: binary-install/%:
        $(foreach file,$(DEB_TRANSFORM_FILES_$(cdbs_curpkg)), \
                install -d $(DEB_DESTDIR)/$(dir $(file)); \
-               cp -a $(DEB_TRANSFORM_FILES_DIR)$(file) \
+               cp -a $(call debian_transform_files,$(file)) \
                    $(DEB_DESTDIR)/$(dir $(file));)
 
 clean::
-       $(foreach file,$(DEB_TRANSFORM_FILES),rm -f debian/$(notdir $(file)))
-       rm -rf $(DEB_TRANSFORM_FILES_DIR)
+       rm -rf $(DEB_TRANSFORM_FILES_TMPDIR)
 
 endif
This page took 0.118994 seconds and 4 git commands to generate.