help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu make and compile engines.


From: Barry D Benowitz
Subject: Re: gnu make and compile engines.
Date: Tue, 1 May 2001 09:13:22 -0400

Hi Paul,

Here is a relevant snippet:

RSH_BEGIN = rsh -n $(CC_engine) "cd $$(pwd);

RSH_END = ; echo $$$\?"  > .return_status
RSH_TEST_RETURN_STATUS = if [ "`tail .return_status`" -ne "0" ] ;\
                                                        then \
                                                                -rm $@;\
                                                                exit 1;\
                                                 fi

# Pattern Rule
%.o : %.cpp
        $(RSH_BEGIN) $(CXX) $(CFLAGS) $(GOODS_DEFINES) $(ACE_DEFINES)\
                 $(ALL_INCLUDES) -c $< $(RSH_END)
        $(RSH_TEST_RETURN_STATUS)
#

# Static Library creation rule
(%.o) : %.o
         $(RSH_BEGIN) $(AR) cr $@ $*.o $(RSH_END)
         $(RSH_TEST_RETURN_STATUS)
#

If I ask make to rebuild the library, the *.cpp file is compiled, and it 
fails. An error code is returned from the compiler which is saved in a file 
called ".return_status". The next line notices that there is a non-zero value 
in .return_status, the .o is removed, the script exits with an exit 1, but it 
doesn't stop there. It trys to execute the AR rule to archive it.

Can you see whats wrong?

Thanks in advance.

On Monday 30 April 2001 03:02 pm, Paul D. Smith wrote:
> %% Barry D Benowitz <address@hidden> writes:
>
>
> From what you say I see no reason why this _shouldn't_ work, so you'll
> have to give more details as to what you're doing, and what doesn't work
> about it if you want to pursue it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]