From 4899bba06bfc637dd9ff7f5a20c528f660555153 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 5 Feb 2016 21:06:46 +0100 Subject: [PATCH] Call libite configure script if local libite is used The new libite uses autotools to build, and since we use it as a GIT submodule we have to call its autogen.sh before we call the configure script, from within the Finit configure script. We may have to move to use autotools even for Finit ... Also, make sure to only call clean/distclean on libite if the local version is selected at configure time. Signed-off-by: Joachim Nilsson --- Makefile | 4 ++++ configure | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5282ec03..f51d33ed 100644 --- a/Makefile +++ b/Makefile @@ -144,13 +144,17 @@ uninstall: uninstall-exec uninstall-data uninstall-dev clean: +$(MAKE) -C plugins $@ +ifndef LIBITE +$(MAKE) -C libite $@ +endif +$(MAKE) -C libuev $@ -@$(RM) $(OBJS) $(DEPS) $(EXEC) 2>/dev/null distclean: clean +$(MAKE) -C plugins $@ +ifndef LIBITE +$(MAKE) -C libite $@ +endif +$(MAKE) -C libuev $@ -@$(RM) $(JUNK) config.mk config.h unittest *.o *.html 2>/dev/null diff --git a/configure b/configure index 67866505..0fa86654 100755 --- a/configure +++ b/configure @@ -325,7 +325,6 @@ done # If no arguments given to configure script, use defaults defaults -result ############################################################################## echo "# Generated by finit configure script." > config.mk @@ -449,3 +448,16 @@ echo "#define RUNLEVEL $runlevel" >> config.h echo >> config.h echo "#endif /* FINIT_CONFIG_H_ */" >> config.h + +# Call configure in local libite if --with-libite is not selected +if [ x"$libite" = x"" ]; then + set -e + cd libite + test -e Makefile && make distclean >/dev/null + ./autogen.sh + ./configure + set +e +fi + +# Show resulting config +result