config.mk: Rerun configure when it is newer than config.mk

config.mk needs to be re-generated any time configure is changed.
Rename the existing make target and add a check that the config.mk
file needs to exist and must be newer than configure script.

Signed-off-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Tested-by: Petr Vorel <petr.vorel@gmail.com>
This commit is contained in:
David Ahern 2021-05-09 22:50:18 +00:00
parent 49437375b6
commit 62c88ed940
1 changed files with 5 additions and 3 deletions

View File

@ -60,7 +60,7 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
LDLIBS += $(LIBNETLINK) LDLIBS += $(LIBNETLINK)
all: config.mk all: config
@set -e; \ @set -e; \
for i in $(SUBDIRS); \ for i in $(SUBDIRS); \
do echo; echo $$i; $(MAKE) -C $$i; done do echo; echo $$i; $(MAKE) -C $$i; done
@ -80,8 +80,10 @@ help:
@echo "Make Arguments:" @echo "Make Arguments:"
@echo " V=[0|1] - set build verbosity level" @echo " V=[0|1] - set build verbosity level"
config.mk: config:
sh configure $(KERNEL_INCLUDE) @if [ ! -f config.mk -o configure -nt config.mk ]; then \
sh configure $(KERNEL_INCLUDE); \
fi
install: all install: all
install -m 0755 -d $(DESTDIR)$(SBINDIR) install -m 0755 -d $(DESTDIR)$(SBINDIR)