From: David Ahern Date: Sun, 9 May 2021 22:50:18 +0000 (+0000) Subject: config.mk: Rerun configure when it is newer than config.mk X-Git-Tag: v5.14.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c88ed9402650823a88c2974efdc39a320dfe7b;p=thirdparty%2Fiproute2.git 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 Reviewed-by: Petr Vorel Tested-by: Petr Vorel --- diff --git a/Makefile b/Makefile index 19bd163e2..5bc11477a 100644 --- a/Makefile +++ b/Makefile @@ -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 LDLIBS += $(LIBNETLINK) -all: config.mk +all: config @set -e; \ for i in $(SUBDIRS); \ do echo; echo $$i; $(MAKE) -C $$i; done @@ -80,8 +80,10 @@ help: @echo "Make Arguments:" @echo " V=[0|1] - set build verbosity level" -config.mk: - sh configure $(KERNEL_INCLUDE) +config: + @if [ ! -f config.mk -o configure -nt config.mk ]; then \ + sh configure $(KERNEL_INCLUDE); \ + fi install: all install -m 0755 -d $(DESTDIR)$(SBINDIR)