Re: questionable feature in FreeBSD pmake

From: Sean Farley (sean-freebsd_at_farley.org)
Date: 10/29/04

  • Next message: Harti Brandt: "Re: questionable feature in FreeBSD pmake"
    Date: Thu, 28 Oct 2004 23:12:50 -0500 (CDT)
    To: Dan Strick <strick@covad.net>
    
    

    On Thu, 28 Oct 2004, Dan Strick wrote:

    > On Thu, 28 Oct 2004 03:23:02 -0700, Dan Strick wrote:
    >>
    >> I just spent a *very* frustrating hour trying to figure out why the
    >> FreeBSD make program was invoking all commands to make things in a
    >> subdirectory named "obj".

    I just noticed this is in the BUGS section of make:
          The determination of .OBJDIR is contorted to the point of
          absurdity.

    > It seems that I have no alternative but to rename my "obj" directory.
    > Can someone suggest an alternative? Note that it is not possible for
    > me to set an environment variable (i.e. MAKEOBJDIR) before running
    > make or to add an option to the make command line. Any fix must be
    > contained entirely within the makefile. Setting .OBJDIR or MAKEOBJDIR
    > within the makefile does not work. Placing a "cd .." or "cd
    > $(.CURDIR)" in front of every set of makefile shell commands is
    > unthinkable.

    Why are you unable to do anything with the command-line? Any of these
    will solve your problem.
    Bourne:
    MAKEOBJDIR=/no_obj_here make

    Bourne or CSH:
    env MAKEOBJDIR=/no_obj_here make

    Here is a Makefile that does not use obj/. The special targets can be
    placed into a file to be included into all your Makefiles. It only
    suffers from a failed build where it will not rename obj to tmpobj.

    -----------------------
    .BEGIN:
             mv tmpobj obj || mkdir obj

    .INTERRUPT:
             mv obj tmpobj

    .END:
             mv obj tmpobj

    all:
             touch testing

    clean:
             rm -f testing
    -----------------------

    Sean

    -- 
    sean-freebsd@farley.org
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Harti Brandt: "Re: questionable feature in FreeBSD pmake"

    Relevant Pages

    • Re: Strange behavior with Make dependencies...
      ... Make will check if the timestamp of the bootsect directory is ... so simple existence will skip the commands. ... add a dependency on the Makefile). ...
      (comp.unix.programmer)
    • Re: why these statements in a general latex makefile
      ... I am not asking for mechanics of the makefile and ... >>*nix commands. ... >>compiling a latex document. ... The document is indeed helpful in understanding the process of compiling ...
      (comp.text.tex)
    • Re: questionable feature in FreeBSD pmake
      ... SF>> It seems that I have no alternative but to rename my "obj" directory. ... SF>> contained entirely within the makefile. ... SF>> $" in front of every set of makefile shell commands is ... I have a fix for this. ...
      (freebsd-hackers)
    • Re: parsing Makefiles
      ... > use warnings; ... This code works just fine providing that the Makefile commands don't output anything. ... Andrew Gaffney ...
      (perl.beginners)
    • Re: [patch] make the Makefile mostly stay within col 80
      ... Try to make most of the Makefile obey the 80 column width rule. ... Use tab to indent commands as make requires it ... Commands spanning more than one line may be indented with tabs. ... At present I'm fed up with day time job that is almost around the clock ...
      (Linux-Kernel)