Environment setting for make

Joel Hatton freebsd-questions at auscert.org.au
Sat Sep 17 02:18:55 PDT 2005


I've been setting the DESTDIR environment var when installing into a jail,
either by first performing:

	setenv DESTDIR /usr/jail/example

and then installing world, or by running:

	make installworld DESTDIR=/usr/jail/example

Both methods work ok. However, I've been studying share/mk/bsd.obj.mk with
the intention of creating separate build environments too. From the section
below, my second method is obviously insufficient:

	# MAKEOBJDIRPREFIX  Specifies somewhere other than /usr/obj to root the object
	#               tree.  Note: MAKEOBJDIRPREFIX is an *environment* variable
	#               and works properly only if set as an environment variable,
	#               not as a global or command line variable!
	#               E.g. use `env MAKEOBJDIRPREFIX=/somewhere/obj make'

However, and at this risk of exposing my inexperience and just plain old
sounding foolish, how does this method of setting MAKEOBJDIRPREFIX differ

	setenv MAKEOBJDIRPREFIX /somewhere/obj

Also, in the example above, is the backquote '`' intended, or is that for
compatibility for something like tex?

-- Joel Hatton --
Security Analyst                    | Hotline: +61 7 3365 4417
AusCERT - Australia's national CERT | Fax:     +61 7 3365 7031
The University of Queensland        | WWW:     www.auscert.org.au
Qld 4072 Australia                  | Email:   auscert at auscert.org.au

More information about the freebsd-questions mailing list