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>
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
@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)