[Top][All Lists]
[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:33 -0600 |
Makefile:46: *** commands commence before first target. Stop.
-----Original Message-----
From: Paul Smith [mailto:address@hidden On Behalf Of Paul D. Smith
Sent: Monday, March 20, 2006 9:51 AM
To: PATTON, BILLY (SBCSI)
Cc: address@hidden
Subject: Re: Must be very simple
%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:
pb> It must be a very obvious problem that I can't see.
pb> define inc_proj
pb> if test -f $(SRC_TREE)/$(1)/make.include ; then \
pb> include $(SRC_TREE)/$(1)/make.include ; \
pb> -include $(SRC_TREE)/$(1)/make.dependencies ; \
pb> else \
pb> include $(MAKEINC_DIR)/$(1).make.include ; \
pb> -include $(MAKEINC_DIR)/$(1).make.dependencies ; \
pb> fi
pb> endef
The above is a shell script.
pb> $(foreach proj,${PROJECTS},$(eval $(call inc_proj,$(proj))))
This will generate a bunch of instances of the shell script in the
makefile and make will try to read them as make commands; they aren't
legal make commands.
You have to put the foreach into a script context (precede it with a TAB
in a rule context).
pb> If I change eval to warning I don't get the message.
Sure, because warning doesn't evaluate to anything (it just prints
things), so there's nothing for make to read in and thus no syntax
error.
--
------------------------------------------------------------------------
-------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist
- Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20
- RE: Must be very simple,
PATTON, BILLY \(SBCSI\) <=
- RE: Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20
- RE: Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20
- RE: Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20
- RE: Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20
- RE: Must be very simple, PATTON, BILLY \(SBCSI\), 2006/03/20