]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - common.mk
Touch PIN_ETHRST only on TMS570_RPP
[pes-rpp/rpp-lib.git] / common.mk
index 701b115feced8fb785db2aaaf1d4d83aa425b1b3..272b1fd98a132f7d9971add620dcfac1a6eeab0f 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -1,5 +1,7 @@
 # Common GNU Make definitions useful for multiple Makefiles
 
+common_mk_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+
 ECLIPSE=$(foreach file,\
                   /opt/ti/ccsv5/eclipse/eclipse \
                   C:/ti/ccsv5/eclipse/eclipsec.exe,\
@@ -30,7 +32,7 @@ endif
 
 # `make release` can ignore files without certain git attribute
 RELEASE_IGNORE_FILES_CMD = $(strip $(if $(RELEASE_ATTR),\
-       git ls-files | git check-attr --stdin $(RELEASE_ATTR)|awk -F: '!/$(RELEASE_ATTR): set$$/ {print $$1}',\
+       $(common_mk_dir)/etc/git-ls-files-attr --not $(RELEASE_ATTR),\
        $(if $(filter RELEASE_ATTR,$(.VARIABLES)),,$(error Please specify RELEASE_ATTR variable (it can be empty)))))
 
 # Usage: $(call release_rules,<release_prefix>)
@@ -56,6 +58,7 @@ RELEASE_BASENAME = $$(RELEASE_PREFIX)-$$(RELEASE_VERSION)
 $$(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