Gnu make by default exports make variables passed on the command line to
the environment. This presents a problem in processing complex Makefiles
on systems with a small ARG_MAX. In particular, this is a problem when
variables are passed on the command line to sub-makes. This places
unnecessary variables into the environment and may cause other commands
which use the environment for passing information to fail. The particular
problem is the gcc Makefile when used under ultrix which has an ARG_MAX
of 10240.
I have found that:
1) `unexport' by itself doesn't unexport command line variables.
2) `unexport VARIABLE' will unexport VARIABLE when passed on the command
line.
3) Some reduction in the size of the environment exported can be achieved
by passing `MAKEOVERRIDES=' on the command line. This prevents
the command line variables from being put into MAKEFLAGS.
Here are the possible solutions that I see:
1) Change the default behaviour so that command line variables are
not exported by default. If I want a variable exported to the
environment, there are a variety of ways to do this before the
sub-make is executed.
2) Add a make option to change the above default.
3) Parse MAKEFLAGS to determine the variables passed on the command line
and unexport them. This make be tricky to do in a manner which is
portable.
Does anybody have another solution?
Dave
--
J. David Anglin [EMAIL PROTECTED]
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make