]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Makefile: Fix path to git-ls-files-attr
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 4 Oct 2015 07:23:24 +0000 (09:23 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 4 Oct 2015 07:23:24 +0000 (09:23 +0200)
When git-ls-files-attr was called as part of release target from other
respoitories (e.g. simulink), the command was called with wrong path. This
is now fixed.

common.mk

index ef9dcf858c81eb9a4195c1419d18a3541c4353e8..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),\
-       etc/git-ls-files-attr --not $(RELEASE_ATTR),\
+       $(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>)