Probably has something to do with the fact that I'm using sh syntax where I should be using make syntax.
I've tried this: $(if -f $(SRC_TREE)/$(1)/make.include,$(shell echo "$(1) exists"),$(shell echo "$(1) not exists")) Is the -f $(SRC_TREE)/$(1)/make.include is causing the problem. Probably, How do I test for the existance of a file? $(shell -f $(SRC_TREE)/$(1)/make.include) Just tried this $(if $(shell test -f $(SRC_TREE)/$(1)/make.include),$(shell echo "$(1) exists"),$(shell echo "$(1) not exists")) I don't need to include both. make.include files from the SRC_TREE and MAKEINC_DIR So from a make command how do I check for the existance of a file to include. I have a possible 450+ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of PATTON, BILLY (SBCSI) Sent: Monday, March 20, 2006 9:31 AM To: [email protected] Subject: Must be very simple It must be a very obvious problem that I can't see. define inc_proj if test -f $(SRC_TREE)/$(1)/make.include ; then \ include $(SRC_TREE)/$(1)/make.include ; \ -include $(SRC_TREE)/$(1)/make.dependencies ; \ else \ include $(MAKEINC_DIR)/$(1).make.include ; \ -include $(MAKEINC_DIR)/$(1).make.dependencies ; \ fi endef $(foreach proj,${PROJECTS},$(eval $(call inc_proj,$(proj)))) Makefile:46: *** missing separator. Stop. Line 46 is the foreach line. If I change eval to warning I don't get the message. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
