Date: Mon, 7 Jul 2003 13:30:16 -0700 From: Freddie Cash <fcash@sd73.bc.ca> To: ports@freebsd.org Subject: Problem with conditional in Makefile Message-ID: <200307071330.16446.fcash@sd73.bc.ca>
next in thread | raw e-mail | index | archive | help
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@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@sd73.bc.ca helpdesk@sd73.bc.ca (250) 374-0679 ext. 219
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307071330.16446.fcash>