Makefile woes

Nils Vogels nivo+sender+6075ff at yuckfou.org
Wed Sep 7 06:21:22 PDT 2005


Hi there !

I'm trying to write a Makefile and it's my first time writing a bit more
complex one .. I seem to be stuck and examples currently are not very
helpful, so I thought I'd try here:

What I am trying to do is differ the way of building depending if a
variable has been defined, my current Makefile looks like this:

build_1:
  @cd /build/dir && make OPTION=set

build_2:
  @cd /build/dir && make

build:
.if defined(WANT_OPTION)
HAS_OPTION?=1
${MAKE} build_1
.else
HAS_OPTION?=0
${MAKE} build_2             <-- error in this line
.endif

Whenever I run "make build" I get:

"Makefile", line xx: Need an operator
make: fatal errors encountered -- cannot continue

The error seems to occur in the indicated line ${MAKE} build_2, but I am
at a complete loss what I am doing wrong.. Help! :)

I am running RELENG_5_4 and the make that comes with it ..

Grts,

Nils

-- 
Simple guidelines to happiness:
Work like you don't need the money,
love like your heart has never been broken and 
dance like no one can see you.


More information about the freebsd-questions mailing list