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
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to