i'm looking at someone else's Makefile, and it is replete with targets whose names begin with a period. i'm aware of the property that such targets will not be considered as the default, but once you define a few early targets, is there any value in continuing to have period-prefixed targets? in this Makefile, there are a number of "paired" targets such as: clean_mystuff: .clean_mystuff_fail: which seems to suggest some kind of pattern, but i have no idea what it might be. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== _______________________________________________ Help-make mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-make |
On Fri, 2019-10-11 at 10:18 -0400, Robert P. J. Day wrote:
> i'm looking at someone else's Makefile, and it is replete with > targets whose names begin with a period. i'm aware of the property > that such targets will not be considered as the default, but once you > define a few early targets, is there any value in continuing to have > period-prefixed targets? > > in this Makefile, there are a number of "paired" targets such as: > > clean_mystuff: > .clean_mystuff_fail: > > which seems to suggest some kind of pattern, but i have no idea what > it might be. make itself doesn't treat targets starting with '.' any differently; this must be a coding convention for these makefiles specifically. I will point out that POSIX reserves all target names beginning with '.' followed by uppercase letters as reserved for implementations so it's probably a good idea to not use target names like that in your makefiles. _______________________________________________ Help-make mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-make |
On Fri, 11 Oct 2019, Paul Smith wrote:
> On Fri, 2019-10-11 at 10:18 -0400, Robert P. J. Day wrote: > > i'm looking at someone else's Makefile, and it is replete with > > targets whose names begin with a period. i'm aware of the property > > that such targets will not be considered as the default, but once you > > define a few early targets, is there any value in continuing to have > > period-prefixed targets? > > > > in this Makefile, there are a number of "paired" targets such as: > > > > clean_mystuff: > > .clean_mystuff_fail: > > > > which seems to suggest some kind of pattern, but i have no idea what > > it might be. > > make itself doesn't treat targets starting with '.' any differently; > this must be a coding convention for these makefiles specifically. apparently, after further investigation, this is exactly what it is ... an internal convention for targets that are not meant to be called directly by the user. is that a well-known idiom? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== |
Free forum by Nabble | Edit this page |