[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnu make and compile engines.
From: |
Paul D. Smith |
Subject: |
Re: gnu make and compile engines. |
Date: |
Tue, 1 May 2001 10:22:23 -0400 |
%% Barry D Benowitz <address@hidden> writes:
bdb> RSH_BEGIN = rsh -n $(CC_engine) "cd $$(pwd);
bdb> RSH_END = ; echo $$$\?" > .return_status
This won't do what you want.
You have the redirection _outside_ of the quotes, so it's not being
passed to the remote system but is instead being executed on the local
system. As I said, rsh always returns success if it managed to contact
the remote system, regardless of whether the remote command succeeded or
failed, so the contents of .return_status will always be 0 (success).
You need to put the redirection inside the quotes, so it's sent as part
of the remote command.
bdb> RSH_TEST_RETURN_STATUS = if [ "`tail .return_status`" -ne "0" ] ;\
bdb> then \
bdb> -rm $@;\
bdb> exit 1;\
bdb> fi
Note the above "-rm" is a syntax error; make only handles special chars
like "-" as the _first_ character on a command line; this is far from
the first character. You'll have to remove the "-" or you'll get an
error from the shell about "no such command, '-rm'" or similar.
I really strongly urge you to consider a different option, though, such
as invoking the entire make inside the rsh instead of each command
individually, or else using one of the distributed build add-ons for GNU
make. It'll be much more efficient.
Also, note that using a simple filename like .return_status means you
can never do parallel builds....
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist