summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-04 04:11:00 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-04 04:11:00 +0000
commit53ea605b4d3f387bc92ed0200e23e192ab9562f1 (patch)
treeacf4789f3f2ade9dac50d1ec88387361bf483f53
parent00edfad9cbe6e4b3559f431790fe62ec6794b933 (diff)
downloadnasm-53ea605b4d3f387bc92ed0200e23e192ab9562f1.tar.gz
Change the NASM environment variable to NASMOPT.
-rw-r--r--ChangeLog3
-rw-r--r--doc/nasmdoc.src17
-rw-r--r--nasm.c4
3 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 511b14e8..f207cd16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
2002-05-03 H. Peter Anvin <hpa@zytor.com>
+ * (nasm.c): Change the NASM environment variable to NASMOPT.
+
+2002-05-03 H. Peter Anvin <hpa@zytor.com>
* (Makefile.in Mkfiles/*): use new version -> version.{h,mac}.
* (macros.pl): support multiple input files (standard.mac, version.mac).
* (standard.mac): use an explicit delimiter to end the TASM macros.
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index d588df75..7ef413ad 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -561,7 +561,7 @@ to search for the file \c{foobar.i}...)
If you want to define a \e{standard} \i{include search path},
similar to \c{/usr/include} on Unix systems, you should place one or
-more \c{-i} directives in the \c{NASM} environment variable (see
+more \c{-i} directives in the \c{NASMOPT} environment variable (see
\k{nasmenv}).
For Makefile compatibility with many C compilers, this option can also
@@ -762,13 +762,13 @@ and the date on which it was compiled.
You will need the version number if you report a bug.
-\S{nasmenv} The \c{NASM} \i{Environment} Variable
+\S{nasmenv} The \c{NASMOPT} \i{Environment} Variable
-If you define an environment variable called \c{NASM}, the program
+If you define an environment variable called \c{NASMOPT}, the program
will interpret it as a list of extra command-line options, which are
processed before the real command line. You can use this to define
standard search directories for include files, by putting \c{-i}
-options in the \c{NASM} variable.
+options in the \c{NASMOPT} variable.
The value of the variable is split up at white space, so that the
value \c{-s -ic:\\nasmlib} will be treated as two separate options.
@@ -778,12 +778,15 @@ NASM command-line processing will get confused by the two
nonsensical words \c{-dNAME="my} and \c{name"}.
To get round this, NASM provides a feature whereby, if you begin the
-\c{NASM} environment variable with some character that isn't a minus
+\c{NASMOPT} environment variable with some character that isn't a minus
sign, then NASM will treat this character as the \i{separator
-character} for options. So setting the \c{NASM} variable to the
+character} for options. So setting the \c{NASMOPT} variable to the
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
-ic:\\nasmlib}, but \c{!-dNAME="my name"} will work.
+This variable was called \c{NASM} in earlier versions of NASM,
+however, this caused problems with makefiles which used a \c{$(NASM)}
+variable.
\H{qstart} \i{Quick Start} for \i{MASM} Users
@@ -5655,7 +5658,7 @@ it.
\b Which version of NASM you're using, and exactly how you invoked
it. Give us the precise command line, and the contents of the
-\c{NASM} environment variable if any.
+\c{NASMOPT} environment variable if any.
\b Which versions of any supplementary programs you're using, and
how you invoked them. If the problem only becomes visible at link
diff --git a/nasm.c b/nasm.c
index a0446d83..266b4eef 100644
--- a/nasm.c
+++ b/nasm.c
@@ -683,9 +683,9 @@ static void parse_cmdline(int argc, char **argv)
*inname = *outname = *listname = '\0';
/*
- * First, process the NASM environment variable.
+ * First, process the NASMOPT environment variable.
*/
- envreal = getenv("NASM");
+ envreal = getenv("NASMOPT");
arg = NULL;
if (envreal) {
envcopy = nasm_strdup(envreal);