Actually the level of my confusion seems to be constant, but this time
is about variables...
With a makefile like:
,----
| CC=gpp
| LIB_ROOT=../lib
| INCL=`find ${LIB_ROOT} -type d \! \( -name '.*' -prune \) | sed -e 's/^/-I /'`
| CFLAGS=-x --curdirinclast ${INCL}
| SRCS=$(wildcard *.gpp)
| TARGETS=$(SRCS:.gpp=.php)
|
| .SUFFIXES : .gpp .php
|
| .gpp.php :
| » @echo ${CFLAGS}
| » $(CC) $(CFLAGS) -o $@ $<
|
| all: $(TARGETS)
|
| clean:
| » rm -f $(MAKEDEPEND_OUTPUT)
| » rm -f *.php
|
| echo:
| » @echo ${CFLAGS}
`----
Why do the following produce different output in terms of the CFLAGS content?
,----
| $ make echo
| -x --curdirinclast -I ../lib -I ../lib/db -I ../lib/ewz -I ../lib/ewz/ws -I
../lib/net -I ../lib/net/protocol -I ../lib/net/protocol/http
`----
,----
| $ make all
| [snip]
| -x --curdirinclast -I ../lib -I ../lib/db -I ../lib/ewz -I ../lib/ewz/ws -I
../lib/net -I ../lib/net/protocol -I ../lib/net/protocol/http
| gpp -x --curdirinclast `find ../lib -type d \! \( -name '.*' -prune \) | sed
-e 's/^/-I /'` -o FOO.php FOO.gpp
`----
The 'make all' works fine, I'm just trying to understand what's going
on, i.e. why one call to echo produces one output and another produces
different output.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make