From b25aea33fa314857c8094e09af9654f925fb935f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 18 Jul 2012 10:03:29 +0100 Subject: build: Change how make.sh, packagelist, excludelist are updated. Add proper dependencies for these files, but also use 'cmp' to ensure they only get overwritten if the new files have actually changed, so we don't rebuild the appliance unnecessarily. --- appliance/Makefile.am | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 0a9f7ae3..f106921d 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -42,26 +42,29 @@ superminfs_DATA = \ # This used to be a configure-generated file (as is update.sh still). # However config.status always touches the destination file, which # means the appliance got rebuilt too often. -make.sh: make.sh.in +make.sh: make.sh.in $(top_builddir)/config.log $(top_builddir)/config.status cd $(top_builddir) && \ ./config.status --file=appliance/$@-t:appliance/$< chmod +x $@-t - mv $@-t $@ + cmp -s $@ $@-t || mv $@-t $@ + rm -f $@-t PACKAGELIST_CPP_FLAGS = -D$(DISTRO)=1 if VALGRIND_DAEMON PACKAGELIST_CPP_FLAGS += -DVALGRIND_DAEMON=1 endif -packagelist: packagelist.in +packagelist: packagelist.in Makefile cpp -undef $(PACKAGELIST_CPP_FLAGS) < $< | \ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t - mv $@-t $@ + cmp -s $@ $@-t || mv $@-t $@ + rm -f $@-t -excludelist: excludelist.in +excludelist: excludelist.in Makefile cpp -undef $(PACKAGELIST_CPP_FLAGS) < $< | \ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t - mv $@-t $@ + cmp -s $@ $@-t || mv $@-t $@ + rm -f $@-t supermin.d/base.img supermin.d/hostfiles: stamp-supermin stamp-supermin: make.sh packagelist excludelist -- cgit