Re: questionable feature in FreeBSD pmake

From: Harti Brandt (harti_at_freebsd.org)
Date: 10/29/04

  • Next message: Allan Marshall: "4.8-STABLE kernel crash"
    Date: Fri, 29 Oct 2004 09:01:57 +0200 (CEST)
    To: Sean Farley <sean-freebsd@farley.org>
    
    

    On Thu, 28 Oct 2004, Sean Farley wrote:

    SF>On Thu, 28 Oct 2004, Dan Strick wrote:
    SF>
    SF>> On Thu, 28 Oct 2004 03:23:02 -0700, Dan Strick wrote:
    SF>> >
    SF>> > I just spent a *very* frustrating hour trying to figure out why the
    SF>> > FreeBSD make program was invoking all commands to make things in a
    SF>> > subdirectory named "obj".
    SF>
    SF>I just noticed this is in the BUGS section of make:
    SF> The determination of .OBJDIR is contorted to the point of
    SF> absurdity.
    SF>
    SF>> It seems that I have no alternative but to rename my "obj" directory.
    SF>> Can someone suggest an alternative? Note that it is not possible for
    SF>> me to set an environment variable (i.e. MAKEOBJDIR) before running
    SF>> make or to add an option to the make command line. Any fix must be
    SF>> contained entirely within the makefile. Setting .OBJDIR or MAKEOBJDIR
    SF>> within the makefile does not work. Placing a "cd .." or "cd
    SF>> $(.CURDIR)" in front of every set of makefile shell commands is
    SF>> unthinkable.
    SF>
    SF>Why are you unable to do anything with the command-line? Any of these
    SF>will solve your problem.
    SF>Bourne:
    SF>MAKEOBJDIR=/no_obj_here make
    SF>
    SF>Bourne or CSH:
    SF>env MAKEOBJDIR=/no_obj_here make
    SF>
    SF>Here is a Makefile that does not use obj/. The special targets can be
    SF>placed into a file to be included into all your Makefiles. It only
    SF>suffers from a failed build where it will not rename obj to tmpobj.
    SF>
    SF>-----------------------
    SF>.BEGIN:
    SF> mv tmpobj obj || mkdir obj
    SF>
    SF>.INTERRUPT:
    SF> mv obj tmpobj

    .INTERRUPT is dangerous at the moment, because it is not called always and
    it's sometimes called in the wrong place. I have a fix for this.

    harti

    SF>
    SF>.END:
    SF> mv obj tmpobj
    SF>
    SF>all:
    SF> touch testing
    SF>
    SF>clean:
    SF> rm -f testing
    SF>-----------------------
    SF>
    SF>Sean
    SF>
    _______________________________________________
    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: Allan Marshall: "4.8-STABLE kernel crash"

    Relevant Pages

    • Re: [opensuse] iptables.h
      ... Perhaps fix the makefile. ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
      (SuSE)
    • 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: questionable feature in FreeBSD pmake
      ... > Bourne or CSH: ... > suffers from a failed build where it will not rename obj to tmpobj. ... My goal was to write a generic makefile that would work on almost ... feature I don't like. ...
      (freebsd-hackers)
    • 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: Why is make building all targets
      ... object files placed in a directory called "obj" to be linked into the ... here's an example of my Makefile (this is ... .PHONY: all ... But if you 'make llfd' it won't be used; ...
      (comp.unix.programmer)