Problem with conditional in Makefile
Freddie Cash
fcash at sd73.bc.ca
Mon Jul 7 13:37:09 PDT 2003
Hey oh,
I'm working on an update for the www/dansguardian* ports. I need to
check the version of FreeBSD to determine which version of GCC to use
(DansGuardian support GCC 2 and 3). I have the following construct in
the Makefile:
.if ${OSVERSION} > 500000 || defined(WITH_GCC3)
CONFIGURE_ARGS+= --gccver=3
.else
CONFIGURE_ARGS+= --gccver=2
.endif
However, trying to use the Makefile for anything generates the following
error:
[root at spark ports/www/dansguardian]# make clean
"Makefile", line 31: Malformed conditional (${OSVERSION} > 500000 ||
defined(WITH_GCC3))
"Makefile", line 31: Missing dependency operator
"Makefile", line 33: if-less else
"Makefile", line 33: Need an operator
"Makefile", line 35: if-less endif
"Makefile", line 35: Need an operator
make: fatal errors encountered -- cannot continue
I've compared my .if line with that in other ports, and I can't see
anything that is wrong. If I remove the ${OSVERSION} section and just
use
.if defined(WITH_GCC3)
it works perfectly.
Could someone please point out what I am doing wrong, or where to search
for more information on using OSVERSION and/or .if statement? Muchly
obliged.
Please CC: me as I am not (yet) subscribed to this list.
--
Freddie Cash District HelpDesk / Network Admin
fcash at sd73.bc.ca helpdesk at sd73.bc.ca
(250) 374-0679 ext. 219
More information about the freebsd-ports
mailing list