Instead of a lengthy explantion...
In the makefile below, the ifeq section gets evaluated *after* the "cgi"
target. This is not what I want. Would someone please point out what I'm
doing wrong?
Also, on a separate note, is it better to have one ".PHONY:" target or
multiple, one for each phony target?
Thank you, Harvey.
ifndef DEBUG
DEBUG=0
endif
.PHONY: all cgi clean
all: cgi
ifeq ($(DEBUG),1)
HIDE=
else
HIDE=@
endif
# For some reason in this particular Makefile, the "ifeq" above gets
evaluated AFTER
# the targets below. This is a quick hack around that.
HIDE=@
cgi:
# @echo "DEBUG is \""$(DEBUG)"\""
# @echo "HIDE is \""$(HIDE)"\""
@echo "Building... " $@
$(HIDE) DEBUG="$(DEBUG)" GUMSTIX="$(GUMSTIX)"
BUILD_ARM="$(BUILD_ARM)" CC="$(CC)" CXX="$(CXX)" AR="$(AR)" make -C cgi
clean:
$(HIDE) DEBUG="$(DEBUG)" GUMSTIX="$(GUMSTIX)"
BUILD_ARM="$(BUILD_ARM)" CC="$(CC)" CXX="$(CXX)" AR="$(AR)" make -C cgi
clean
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make