[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make: how to selectively handle exit status of commands
From: |
Paul D. Smith |
Subject: |
Re: make: how to selectively handle exit status of commands |
Date: |
29 Aug 2004 13:39:11 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
%% Stan Brown <the_stan_brown@fastmail.fm> writes:
sb> I don't have rm commands in my makefile, but when deleting
sb> intermediate files rm itself displays an "rm" command.
Aha! That's something entirely different.
sb> My question was about how this works, and the
sb> implications. Perhaps make simply deletes the files by an unlink(
sb> ) or similar function call and does a printf("rm %1", filename),
Exactly.
sb> or perhaps it's got some sort of internal rm emulator. If it's the
sb> latter, then I wonder what other commands are emulated.
This is not really emulating a command that appears in a makefile.
Make will delete intermediate files on its own as part of its internal
processing, not related in any way to any command scripts that appear in
the makefile. See the GNU make manual description of intermediate files
for more information here.
The output, as you say above, is simply informing the user that
something was deleted. It could say something like "Removing files ..."
instead of "rm".
GNU make never emulates any command script contents at all [*].
[*] Well. If your SHELL is not changed to a non-default value GNU make
will, as a performance enhancement, check if the script is empty or
consists of nothing but the shell no-op operator, ":" and if so it
won't invoke a shell. I guess this, in a way, could be considered
emulating the no-op operator :).
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> 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
- make: how to selectively handle exit status of commands, Stephan Petersen, 2004/08/13
- Re: make: how to selectively handle exit status of commands, Paul Jarc, 2004/08/13
- Re: make: how to selectively handle exit status of commands, Stephan Petersen, 2004/08/16
- Message not available
- Re: make: how to selectively handle exit status of commands, Stan Brown, 2004/08/21
- Re: make: how to selectively handle exit status of commands, Paul D. Smith, 2004/08/28
- Re: make: how to selectively handle exit status of commands, Stan Brown, 2004/08/28
- Re: make: how to selectively handle exit status of commands, Glynn Clements, 2004/08/28
- Re: make: how to selectively handle exit status of commands, mike burrell, 2004/08/28
- Re: make: how to selectively handle exit status of commands, Stan Brown, 2004/08/29
- Re: make: how to selectively handle exit status of commands,
Paul D. Smith <=
- Re: make: how to selectively handle exit status of commands, Stan Brown, 2004/08/29