X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-lib.git/blobdiff_plain/bcc51b05171e724172a568ca7e76093ddb117c66..ff699be13840a9e037a35e82b986315231ecc76a:/common.mk diff --git a/common.mk b/common.mk index ef3818d..21be655 100644 --- 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,) define release_rules @@ -51,11 +51,12 @@ 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) $(MAKE) $$(RELEASE_BASENAME) + find $$(RELEASE_BASENAME) -type d -empty -print -delete zip -r $$@ $$(RELEASE_BASENAME) $$(RELEASE_BASENAME):: .git/info/attributes