Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs Date: Thu, 4 Dec 2003 15:40:14 -0600 (CST) From: Brian Ford X-X-Sender: ford AT eos To: "Rajagopalan, Karthik" cc: "'cygwin AT cygwin DOT com'" Subject: Re: Query regarding Cygwin make/Gnu Make In-Reply-To: <21559A0D4CF8D511B51100065B38178B0166FC14@mshyd2.hyd.deshaw.com> Message-ID: References: <21559A0D4CF8D511B51100065B38178B0166FC14 AT mshyd2 DOT hyd DOT deshaw DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/