bug-make
[Top][All Lists]
Advanced

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

Re: goals starting with a period followed by a slash


From: Stefan Tauner
Subject: Re: goals starting with a period followed by a slash
Date: Fri, 3 Feb 2017 18:47:21 +0100

On Thu, 02 Feb 2017 11:36:18 -0500
Paul Smith <address@hidden> wrote:

> On Thu, 2017-02-02 at 16:53 +0100, Stefan Tauner wrote:
> > I don't know why it behaves differently with slashes in the goal and
> > would love to hear a rationale for that (and it being mentioned in
> > the documentation ;)
> > The current documentation reads as follows (emphasis mine):  
> > > By default, the goal is the first target in the makefile (*not
> > > counting targets that start with a period*).  
> 
> The documentation is wrong (or rather, incomplete).  It's intended to
> state that special targets are not considered as default targets.
> 
> The POSIX spec defines special targets as "targets with names
> consisting of a leading <period> followed by one or more uppercase
> letters".
> 
> In GNU make we extend the characters that may appear in special
> targets to include underscores, I think.
> 
> But we don't allow slashes in special targets, so any target that
> contains a slash is not a special target, and will be used as the
> default target.

Makes sense, thank you very much.
My original objective was to disable the assignment of a default
goal in a makefile that gets included by other makefiles, which
provides a number of useful stuff including some recipes. I now simply
resort to unsetting .DEFAULT_GOAL (with ":=") at the end of the included
makefile and this seems to do the trick just fine.

KR
-- 
Dipl.-Ing. Stefan Tauner
Research and Development
Embedded Systems Department

University of Applied Sciences Technikum Wien
Hoechstaedtplatz 6, 1200 Vienna, Austria
T: +43 1 333 40 77-316
E: address@hidden
I: embsys.technikum-wien.at
I: www.technikum-wien.at



reply via email to

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