help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a goal as default?


From: Stephan Beal
Subject: Re: How to make a goal as default?
Date: Fri, 21 Aug 2009 19:13:50 +0200

On Fri, Aug 21, 2009 at 6:47 PM, Philip Guenther <address@hidden> wrote:
On Fri, Aug 21, 2009 at 7:45 AM, Stephan Beal<address@hidden> wrote:
> The default target for a makefile is ALWAYS the first target in the
> makefile, no matter what it is called.

i wanted to elaborate a bit, but my boss got back from his meeting and i needed to get out of gmail ;). So...

Keep in mind that "the first target in the makefile" might actually come from an included makefile. In my build system, the first non-target line of all makefiles is expected to include a makefile which gets created by the configure script:

  #!/usr/bin/make -f
  include toc2.make

toc2.make's first line is:

  default: all

which is the conventional first target for a makefile. The dir-specific makefile then implements "all" or adds its own targets as prereqs of "all".

 
Always...unless you use special variable .DEFAULT_GOAL that is.  To
quote the info pages:

i wasn't aware of that. So let's do s/ALWAYS/almost always/ on my post :).


--
----- stephan beal
http://wanderinghorse.net/home/stephan/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]