On Fri, Aug 21, 2009 at 6:47 PM, Philip Guenther
<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 :).