On 16/02/2019 15:06, Luc Van Oostenryck wrote: > These variables are only used for selfcheck and as such they > shouldn't be configurable from the command line or the environment. > > So, turn 'CHECKER_FLAGS' into 'selfcheck-flags' and get rid of > 'CHECKER'. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- Heh, I nearly sent you an email last night, which looked like: diff --git a/Makefile b/Makefile index bd2b089..252e030 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,7 @@ CFLAGS += -Wall -Wwrite-strings LD = $(CC) AR = ar PKG_CONFIG = pkg-config -CHECKER = CHECK=./sparse ./cgcc -no-compile -CHECKER_FLAGS = -Wno-vla +CHECKER_FLAGS ?= -Wno-vla DESTDIR= PREFIX ?= $(HOME) @@ -208,7 +207,7 @@ cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS) %.sc: %.c sparse @echo " CHECK $<" - $(Q) $(CHECKER) $(CHECKER_FLAGS) $(cflags) -c $< + $(Q) CHECK=./sparse ./cgcc -no-compile $(CHECKER_FLAGS) $(cflags) -c $< selfcheck: $(OBJS:.o=.sc) ... but I changed my mind just before hitting send! :-D As you can see, I also dropped CHECKER, by in-lining the macro into the target, but kept CHECKER_FLAGS (even allowing it to be set from the environment). I decided that, although I would use it locally (probably from the local.mk file), it was possible that Uwe (or other packagers) may need to tweak the value for some exotic platform I have no access to. (and packagers seem to have a penchant for setting things from the environment). This presupposes that getting a clean 'selfcheck' is important to packagers, of course. However, I was wasn't feeling too confident about that argument, so hit 'cancel' instead! ;-) [I was also going to try defining 'checker = CHECK=./sparse ...', closer to the target, in order to shorten the command line!] BTW, was the intention to remove the current use of VLAs in the sparse pre-processor, so that we can get rid of '-Wno-vla' in the selfcheck target? ATB, Ramsay Jones > Makefile | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index bd2b089f3..c0c2727b0 100644 > --- a/Makefile > +++ b/Makefile > @@ -11,8 +11,6 @@ CFLAGS += -Wall -Wwrite-strings > LD = $(CC) > AR = ar > PKG_CONFIG = pkg-config > -CHECKER = CHECK=./sparse ./cgcc -no-compile > -CHECKER_FLAGS = -Wno-vla > > DESTDIR= > PREFIX ?= $(HOME) > @@ -99,6 +97,9 @@ cflags += -DGCC_BASE=\"$(GCC_BASE)\" > MULTIARCH_TRIPLET := $(shell $(CC) -print-multiarch 2>/dev/null) > cflags += -DMULTIARCH_TRIPLET=\"$(MULTIARCH_TRIPLET)\" > > + > +selfcheck-flags := -Wno-vla > + > ######################################################################## > # target specificities > > @@ -208,7 +209,7 @@ cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS) > > %.sc: %.c sparse > @echo " CHECK $<" > - $(Q) $(CHECKER) $(CHECKER_FLAGS) $(cflags) -c $< > + $(Q)CHECK=./sparse ./cgcc -no-compile $(selfcheck-flags) $(cflags) -c $< > > selfcheck: $(OBJS:.o=.sc) > >