[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need to get $MAKEFLAGS value only
From: |
Paul D. Smith |
Subject: |
Re: Need to get $MAKEFLAGS value only |
Date: |
Sat, 19 Oct 2002 09:51:27 -0400 |
%% gk <address@hidden> writes:
g> In other words, rather than emulating Gnu make's options parsing, I
g> would like to call Gnu make, passing some parameters and get back
g> the value of $MAKEFLAGS, without the -C, -o, -W, -f options which
g> aren't ever included in $MAKEFLAGS, and without the targets of
g> course.
You don't say what you're calling GNU make from (C/C++? Perl? Some
other interpreter?)
But you could do something equivalent to this:
echo '$(shell echo $(MAKEFLAGS) 1>&2)' | make -f- <options>
It's not perfect; you'll have to parse the output.
I think all things being equal it's best to just parse the command line
options yourself; it's much simpler and make's command line options
don't change very often.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist