Query regarding Cygwin make/Gnu Make
Brian Ford
ford@vss.fsi.com
Thu Dec 4 22:07:00 GMT 2003
On Thu, 4 Dec 2003, Rajagopalan, Karthik wrote:
> I found today a weird working difference between Cygwin Make against Gnu
> Make. Let me explain the situation I faced.
>
Cygwin make *is* GNU make.
> I have following piece of code as "test" target. Here $(EXE) takes .exe for
> Windows and blank for Linux.
>
> test:
> cat test.dat | test$(EXE) 1> test.res 2>&
> diff test.res test.std
>
> When "make test" is fired, it proceed to execute the first command
>
> cat test.dat | test$(EXE) 1> test.res 2>&
>
I am unfamiliar with the 2>& syntax. Was that a typo?
> test$(EXE) return -1 back because of encountering a error in code test.c.
> This return value stops the execution of "make" utility in Cygwin to proceed
> to next command
>
That is correct. (Now officially OT) From "info make":
To ignore errors in a command line, write a `-' at the beginning of
the line's text (after the initial tab). The `-' is discarded before
the command is passed to the shell for execution.
For example,
clean:
-rm -f *.o
This causes `rm' to continue even if it is unable to remove a file.
> diff test.res test.std
>
> where in Linux it proceeds to execute the above code. This is the desired
> execution we require to happen. Why is this strange difference in "Cygwin
> Make" and "GNU Make". Which is correct order of execution :Cygwin Make or
> GNU Make". Can you explain me the workingfunctionality behind this taking
> into account the return value to shell?
>
Sounds like a Linux GNU make bug to me. AFAIK, the return status for a
pipeline is generally that of the last command.
HTH
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list