From owner-freebsd-questions@FreeBSD.ORG Thu May 14 17:53:30 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8718106566C for ; Thu, 14 May 2009 17:53:30 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id B73A58FC1C for ; Thu, 14 May 2009 17:53:30 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from sarevok.dnr.servegame.org (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 6F7A57E837; Thu, 14 May 2009 09:53:29 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Thu, 14 May 2009 19:53:27 +0200 User-Agent: KMail/1.11.2 (FreeBSD/8.0-CURRENT; KDE/4.2.2; i386; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905141953.27852.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: David Wassman Subject: Re: make.conf options based on DESTDIR? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 17:53:31 -0000 On Wednesday 13 May 2009 20:16:47 David Wassman wrote: > I have setup several jails that use a master template similar to the > advanced jail configuration in the handbook. Currently, I build the master > jail with several build options turned off using a separate make.conf file > and setting __MAKE_CONF to it. > > I was wondering if there is a way to set /etc/make.conf up so that if > DESTDIR is set to the master jail location, make would use those options > but not use them during a standard build process with DESTDIR not defined > or pointed somewhere else. > > I have read through the man pages on make and make.conf, and have tried: > > .if DESTDIR=/usr/Jail/master > WITHOUT_ACPI=YES > WITHOUT_BOOT=YES > ... > .endif Almost: # head -3 /etc/make.conf .if defined(DESTDIR) && (${DESTDIR:M/usr/jails/tpl} != "") WITH_FOO=yes .endif # cat Makefile all: @echo "WITH_FOO=${WITH_FOO}" # make WITH_FOO= # make DESTDIR=/usr/jails/tpl WITH_FOO=yes -- Mel