This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "cd dir && $(MAKE)", not "cd dir; $(MAKE)"


Andrew Cagney <ac131313@redhat.com> writes:


> 	  (cd etc; $(MAKE) $(FLAGS_TO_PASS) check)

Just FYI,

If there is no etc/, the above should barf.  This is because MAKE runs
/bin/sh -e and the unchecked `cd''s error status should cause an abort.

I thought GNU make didn't do that?

   * Some versions of `make' invoke the shell with the `-e' flag,
     except under `-k' (*note Testing the Compilation of a Program:
     Testing.).  The `-e' flag tells the shell to exit as soon as any
     program it runs returns a nonzero status.  We feel it is cleaner to
     write each shell command line to stand on its own and not require
     this special treatment.
Ah, that explains a few things.  Thanks.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]