Idea: Add command-line option for reporting potential makefile errors

2019-06-11 Thread David A. Wheeler
Problem: Makefiles often have errors, and they lay dormant because they're undetected. On Tue, 11 Jun 2019 07:44:31 -0700, wrote: > Considering that many build systems created with Make do not properly > perform incremental builds (because all the necessary rules are not > written, or are wri

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread David A. Wheeler
On Tue, 11 Jun 2019 14:25:10 -0800, Britton Kerin wrote: > > I think .COMMANDCHANGE is not complex. > > Since it caches the expanded command, at worst it will re-run a script > > when before it would not have done so. > > So it's relatively low risk; at worst, it'll run a command more often than

Re: Idea: .MUSTCREATE

2019-06-11 Thread David A. Wheeler
On June 9, 2019 9:50:53 PM EDT, Paul Smith wrote: >On Sun, 2019-06-09 at 19:21 -0400, David A. Wheeler wrote: >> If I understand correctly, that means that a single: >> .WONTCREATE: >> will be enough to detect a problem if *all* my rules >> are supposed to always create the non-PHONY targets. > >Y

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread Britton Kerin
> I think .COMMANDCHANGE is not complex. > Since it caches the expanded command, at worst it will re-run a script > when before it would not have done so. > So it's relatively low risk; at worst, it'll run a command more often than > before. > It won't rerun if only an environment variable changes

Idea: Standard way to negate special targets

2019-06-11 Thread David A. Wheeler
Idea: Standard way to negate special targets Problem: Sometimes you want to set a default value using a special target, but in a few cases you want to *disable* the special target. For example, you might want to use: .ONESHELL: for *almost* all the rules, except for a few rules where you want to

Idea: MAKE_SILENCEWARNINGS variable silences make warnings

2019-06-11 Thread David A. Wheeler
Problem: Make warnings are generally useful, but in special cases they can be spurious. It'd be nice to be able to control them. Solution: Create a new make special variable "MAKE_SILENCEWARNINGS". By default it is not set (empty). If it's non-empty (true), then make does not print make warnings

Re: Idea: MAKE_SILENCEWARNINGS variable silences make warnings

2019-06-11 Thread Paul Smith
On Tue, 2019-06-11 at 14:37 -0400, David A. Wheeler wrote: > Create a new make special variable "MAKE_SILENCEWARNINGS". I have toyed with an idea like this in my mind. When I think about it, I wanted to create a warning infrastructure like the one GCC has, with command line -W... options, allowin

Idea: Automatically detect erroneous multi-targets

2019-06-11 Thread David A. Wheeler
Idea: Automatically detect erroneous multi-targets Problem: In many cases people write (though ignorance or accident) rules like this: BB CC: prerequisites command when they intended to say "both BB and CC are simultaneously generated by command". Of course, what that really means is th

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread David A. Wheeler
> On Mon, 2019-06-10 at 13:14 -0400, David A. Wheeler wrote: > > Idea: Add .COMMANDCHANGE and .CACHE On Tue, 11 Jun 2019 11:06:51 -0400, Paul Smith wrote: > Unlike some of the other ideas I think this one needs a lot of thought > and consideration. To me it seems the most complex and the most li

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread Paul Smith
On Mon, 2019-06-10 at 13:14 -0400, David A. Wheeler wrote: > Idea: Add .COMMANDCHANGE and .CACHE Unlike some of the other ideas I think this one needs a lot of thought and consideration. To me it seems the most complex and the most likely to have unintended side-effects or for the implementation

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread thutt
Edward Welbourne writes: > On Mon, Jun 10, 2019 at 5:14 PM David A. Wheeler > wrote: > >>> Using a lot of some_fragment.mk files gets you *closer*, but it's not > >>> the same thing. My proposed .COMMANDCHANGE depends on > >>> the *expanded* set of commands, not the original commands. > >>

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread Edward Welbourne
On Mon, Jun 10, 2019 at 5:14 PM David A. Wheeler wrote: >>> Using a lot of some_fragment.mk files gets you *closer*, but it's not >>> the same thing. My proposed .COMMANDCHANGE depends on >>> the *expanded* set of commands, not the original commands. >>> That way, if you change a value (say CCFLA

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread David A. Wheeler
On Mon, Jun 10, 2019 at 5:14 PM David A. Wheeler wrote: > > Using a lot of some_fragment.mk files gets you *closer*, but it's not > > the same thing. My proposed .COMMANDCHANGE depends on > > the *expanded* set of commands, not the original commands. > > That way, if you change a value (say CCFLA

Re: Idea: Allow $(name ...) as an abbrevation of $(call name ....)

2019-06-11 Thread David A. Wheeler
On Tue, 11 Jun 2019 14:09:42 +0900, Masahiro Yamada wrote: > If we drop the compatibility like Python 3, > We could fix our regrets ... The Python3 transition was horrific, and is a textbook case of how to *not* handle a transition. It's not that Python3 is bad (I use it), but its transition was

Re: Idea: Add .COMMANDCHANGE and .CACHE

2019-06-11 Thread Britton Kerin
On Mon, Jun 10, 2019 at 5:14 PM David A. Wheeler wrote: > > On Mon, 10 Jun 2019 15:40:53 -0800, Britton Kerin > wrote: > > No, just the rules that :Makefile, which you can easily tune if it matters. > > Heck, you can include some_fragment.mk that has the recipes that > > are a concern and depend