Environment setting for make

Gary W. Swearingen garys at opusnet.com
Sat Sep 17 10:59:07 PDT 2005

Joel Hatton <joel at auscert.org.au> writes:

> I'm a little confused about the Bourne shell, however. Do you mean that
> (1) 'MAKEOBJDIRPREFIX=/somewhere/obj make' is equivalent to (2) 'setenv
> MAKEOBJDIRPREFIX /somewhere/obj' or (3) 'env
> MAKEOBJDIRPREFIX=/somewhere/obj make'? Can (1) be substituted for (3)?

Yes, (1) == (3), except (3) works in any shell.

>>From my trials, (1) and (2) aren't similar as MAKEOBJDIRPREFIX remains
> unset in the shell after make exits for (1). In csh (2) has the same effect
> as the Bourne 'export MAKEOBJDIRPREFIX=/somewhere/obj'

Correct. And same as 'MAKEOBJDIRPREFIX=/somewhere/obj; export MAKEOBJDIRPREFIX'

More information about the freebsd-questions mailing list