]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Make the command used for determining ignored files visible in make output
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Jul 2015 15:36:00 +0000 (17:36 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Jul 2015 15:36:53 +0000 (17:36 +0200)
This way, it is easier to debug problems with (not) released files.

common.mk

index ef3818d274be7521e9e1fa353e917cdadc71712b..701b115feced8fb785db2aaaf1d4d83aa425b1b3 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -29,9 +29,9 @@ cp=cp $1 $2
 endif
 
 # `make release` can ignore files without certain git attribute
-RELEASE_IGNORE_FILES = $(if $(RELEASE_ATTR),\
-       $(shell git ls-files | git check-attr --stdin $(RELEASE_ATTR)|awk -F: '!/$(RELEASE_ATTR): set$$/ {print $$1}'),\
-       $(if $(filter RELEASE_ATTR,$(.VARIABLES)),,$(error Please specify RELEASE_ATTR variable (it can be empty))))
+RELEASE_IGNORE_FILES_CMD = $(strip $(if $(RELEASE_ATTR),\
+       git ls-files | git check-attr --stdin $(RELEASE_ATTR)|awk -F: '!/$(RELEASE_ATTR): set$$/ {print $$1}',\
+       $(if $(filter RELEASE_ATTR,$(.VARIABLES)),,$(error Please specify RELEASE_ATTR variable (it can be empty)))))
 
 # Usage: $(call release_rules,<release_prefix>)
 define release_rules
@@ -51,7 +51,7 @@ RELEASE_BASENAME = $$(RELEASE_PREFIX)-$$(RELEASE_VERSION)
        test ! -e $$A || head -n 1 $$A | grep -F "Automatically generated (yoo9jei6Ee6Teiti)"
        echo "# Automatically generated (yoo9jei6Ee6Teiti)" > $$A
 # Write ignored files there
-       for i in $$(RELEASE_IGNORE_FILES); do echo $$$$i export-ignore >> $$A; echo Not releasing $$$$i; done
+       for i in `$$(RELEASE_IGNORE_FILES_CMD)`; do echo $$$$i export-ignore >> $$A; echo Not releasing $$$$i; done
 
 $$(RELEASE_BASENAME).zip:
        rm -rf $$@ $$(RELEASE_BASENAME)