From owner-freebsd-questions Wed Jul 26 13:49: 1 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 39BA837BE2F for ; Wed, 26 Jul 2000 13:48:58 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id PAA23292; Wed, 26 Jul 2000 15:48:55 -0500 (CDT) (envelope-from dan) Date: Wed, 26 Jul 2000 15:48:54 -0500 From: Dan Nelson To: Kaj Telenar Cc: "'freebsd-questions@freebsd.org'" Subject: Re: make nightmare Message-ID: <20000726154854.A22469@dan.emsphone.com> References: <01BFF711.D72B3120.ktelenar@etrue.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.3.5i In-Reply-To: <01BFF711.D72B3120.ktelenar@etrue.com>; from "Kaj Telenar" on Wed Jul 26 14:57:37 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jul 26), Kaj Telenar said: > Hi, > > I am having troubles using the make utility that comes with FreeBSD. > > I am trying to put conditionals in the makefile - actually, I'm modifying a > bunch of makefiles that came from Windows. I get the following error: > . . . Malformed Conditional: ("$(CFG)" == "Release") > > from this line: > .if $(CFG) == "Release" That's the right syntax. Problem is, if $CFG hasn't been defined, make aborts. So a workaround is to put CFG ?= unknown or something similar at the top of your Makefile, so it has a value by the time it gets to the .if > 3. Is there a sample makefile that shows all (or most) of the makefile > options? Is there more documentation on this version of make? /usr/share/mk/* and /usr/ports/Mk/bsd.port.mk probably have more examples than you'll ever want to look at. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message