help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Must be very simple


From: PATTON, BILLY \(SBCSI\)
Subject: RE: Must be very simple
Date: Mon, 20 Mar 2006 09:54:52 -0600

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: address@hidden
[mailto:address@hidden On Behalf Of PATTON,
BILLY (SBCSI)
Sent: Monday, March 20, 2006 9:31 AM
To: address@hidden
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
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make




reply via email to

[Prev in Thread] Current Thread [Next in Thread]