summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.1
diff options
context:
space:
mode:
authorsjg <sjg@NetBSD.org>2010-06-06 01:13:12 +0000
committersjg <sjg@NetBSD.org>2010-06-06 01:13:12 +0000
commitfbb620d711b44afa0d64fc975dbfad54a1c826bb (patch)
tree0637a59f54909113eb9a42d487fe39dbe0eb7af1 /usr.bin/make/make.1
parent90abead58e2b966647f4e70b4b92a721a5e49f82 (diff)
Add .export-env which tells make to export a variable to the environment
but not to track it - as is done for .export This allows the variable to be updated without affecting what was put into the environment. Older versions of make will simply treat this as .export
Diffstat (limited to 'usr.bin/make/make.1')
-rw-r--r--usr.bin/make/make.115
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1
index 8a068156896..3a9db7fcd60 100644
--- a/usr.bin/make/make.1
+++ b/usr.bin/make/make.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.172 2010/05/13 18:10:16 joerg Exp $
+.\" $NetBSD: make.1,v 1.173 2010/06/06 01:13:12 sjg Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -791,8 +791,10 @@ is set in the environment or on the command line.)
.Pp
Variable expansion is performed on the value before it's used,
so expressions such as
-.Dl ${.CURDIR:C,^/usr/src,/var/obj,}
+.Dl ${.CURDIR:S,^/usr/src,/var/obj,}
may be used.
+This is especially useful with
+.Ql Ev MAKEOBJDIR .
.Pp
.Ql Va .OBJDIR
may be modified in the makefile as a global variable.
@@ -1320,6 +1322,15 @@ flag, so should be used with caution.
Appending a variable name to
.Va .MAKE.EXPORTED
is equivalent to exporting a variable.
+.It Ic .export-env Ar variable ...
+The same as
+.Ql .export ,
+except that the variable is not appended to
+.Va .MAKE.EXPORTED .
+This allows exporting a value to the environment which is different from that
+used by
+.Nm
+internally.
.It Ic .info Ar message
The message is printed along with the name of the makefile and line number.
.It Ic .undef Ar variable