Re: Immediately exiting (with return code zero) from Makefile?

From: Cameron Simpson (cs_at_zip.com.au)
Date: 01/28/04

  • Next message: David Raleigh Arnold: "Re: Handy Linux clipboard"
    Date: Thu, 29 Jan 2004 07:38:33 +1100
    To: comp.unix.misc@usenet, comp.os.linux.questions@usenet
    
    

    On 10:49 28 Jan 2004, Ian Zimmerman <bayard@newsguy.com> wrote:
    | You could write the top rule of M1/Makefile like this:
    |
    | all:
    | if test -e ../M2/Makefile ; then $(MAKE) m1.a ; fi

    You might find that fails and you need to rephrase like this:

    all:
            test ! -e ../M2/Makefile || $(MAKE) m1.a

    i.e. success if no M2/makefile or success if $(MAKE) succeeds.

    -- 
    Cameron Simpson <cs@zip.com.au> DoD#743
    http://www.cskk.ezoshosting.com/cs/
    Men are not hanged for stealing horses, but that horses may not be stolen.
            - Lord Halifax, Works
    

  • Next message: David Raleigh Arnold: "Re: Handy Linux clipboard"

    Relevant Pages

    • Re: Immediately exiting (with return code zero) from Makefile?
      ... You might find that fails and you need to rephrase like this: ... i.e. success if no M2/makefile or success if $succeeds. ... Men are not hanged for stealing horses, but that horses may not be stolen. ...
      (comp.unix.misc)
    • Re: various exits from function with one general clean-up?
      ... This is the case when even something fails the total ... to differ between success and fail of this step ... Splitting out a whole switch statement ... b free memory allows to be called with NULL ...
      (comp.lang.c)
    • [-mm patch] Correct add_bd_holder() return value
      ... So I think it's better to return success after freeing by itself. ... lvresize will fails with following message: ... to let the caller free temporary bd_holder. ... Also, if either one of symlinking fails, the bd_holder should not ...
      (Linux-Kernel)
    • Re: Bushs Band of War Happy Simpletons
      ... resorted to it in the past, and had success with it, will virtually ... certainly try it again and again until it fails. ... and his band of draft dodging hawks has been flushing some 200+ years ...
      (misc.news.internet.discuss)
    • Re: Short memories
      ... secret of success in politics. ... "A nation that fails to learn from the mistakes of the past are doomed to do poorly on history tests" George Santayana as relayed by Dave Barry. ...
      (uk.rec.sheds)