how to print invocated commands including non echoed ones ”@foo” ?
make -n
but dont invocated them :
Solution :
remake -d
This helped to hack autotools makefiles
If you need only a few known variables exporting in makefile can be an option, here is an example of what I am using.
$ grep ID /etc/os-release
ID=ubuntu ID_LIKE=debian
$ cat Makefile
default: help rule/setup/lsb source?=. help: -${MAKE} --version | head -n1 rule/setup/%: echo ID=${@F} rule/setup/lsb: /etc/os-release ${source} $< && export ID && ${MAKE} rule/setup/$${ID}
$ make
make --version | head -n1 GNU Make 3.81 . /etc/os-release && export ID && make rule/setup/${ID} make[1]: Entering directory `/tmp' echo ID=ubuntu ID=ubuntu
VPATH :
OBJ_DIRS?=$(shell find . -iname "*.o" | sed -e "s|\(.*\)/.*|\1|g" | sort | uniq | tr '\n' ':') VPATH=${OBJ_DIRS}
show-vpath: ${OBJS} echo "VPATH=" echo ${^D} | tr ' ' '\n' | sort | uniq | tr '\n' ':' "
RegEx :
test: ${CURDIR} echo ${<:%-1.0.0=%} echo ${<:%-1.0.0=%-snapshot} echo ${<:%-%=%-snapshot} echo ${<:%-1.0.0=%-snapshot} install-libs: ${modules_jni} echo ${^:TuxGuitar-%=tuxguitar-%} for t in ${^} ; do \ echo install -s $$t/$${t/TuxGuitar/tuxguitar} \ ; done
install-list:
find . -type f -perm -u+x -exec file '{}' \;
" *** target pattern contains no `%'. Stop."
pwd | grep ':'
Message :
# rzr@lap:linux/ # [0] # make Makefile:129: *** multiple target patterns. Stop.
Cause :
# rzr@lap:linux/ # [0] # pwd /home/rzr/var/cache/url/git/ssh/git@github.com:/rzr/linux/src/linux
Solution :
# rzr@lap:ssh/ # [0] # mv git\@github.com\: git\@github.com/