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
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