Skip to content

Commit ec5ad66

Browse files
committed
Merge branch 'mm/makefile-developer-can-be-in-config-mak'
"make DEVELOPER=1" worked as expected; setting DEVELOPER=1 in config.mak didn't. * mm/makefile-developer-can-be-in-config-mak: Makefile: add $(DEVELOPER_CFLAGS) variable Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion
2 parents a8398b9 + 51dd3e8 commit ec5ad66

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,7 @@ GIT-VERSION-FILE: FORCE
375375
# CFLAGS and LDFLAGS are for the users to override from the command line.
376376

377377
CFLAGS = -g -O2 -Wall
378-
LDFLAGS =
379-
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
380-
ALL_LDFLAGS = $(LDFLAGS)
381-
STRIP ?= strip
382-
383-
ifdef DEVELOPER
384-
CFLAGS += -Werror \
378+
DEVELOPER_CFLAGS = -Werror \
385379
-Wdeclaration-after-statement \
386380
-Wno-format-zero-length \
387381
-Wold-style-definition \
@@ -390,7 +384,10 @@ CFLAGS += -Werror \
390384
-Wstrict-prototypes \
391385
-Wunused \
392386
-Wvla
393-
endif
387+
LDFLAGS =
388+
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
389+
ALL_LDFLAGS = $(LDFLAGS)
390+
STRIP ?= strip
394391

395392
# Create as necessary, replace existing, make ranlib unneeded.
396393
ARFLAGS = rcs
@@ -951,6 +948,10 @@ include config.mak.uname
951948
-include config.mak.autogen
952949
-include config.mak
953950

951+
ifdef DEVELOPER
952+
CFLAGS += $(DEVELOPER_CFLAGS)
953+
endif
954+
954955
ifndef sysconfdir
955956
ifeq ($(prefix),/usr)
956957
sysconfdir = /etc

0 commit comments

Comments
 (0)