From 95625289208d437e247abedf17bfe1251534858a Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Sat, 28 Feb 2015 22:35:45 +0000 Subject: [PATCH] stage4: Remove "build_stage4" and don't force stage4 to build every time The stage4 target, specifically the STAGE4_TARBALL target now depends on the portage/ directory, the appliances// directory and the stage3 tarball. It will not be rebuild if these are up-to-date. Therefore other targets that depend on stage4 (e.g. RAW_IMAGE) won't force stage4 to be rebuilt if it is up to date. If you want to force a stage4 rebuild, for example if the appliance pulls from a live VCS, then the recommended way to do this is: $ touch appliances/ $ make APPLIANCE= stage4 --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1f36f7c..6e94847 100644 --- a/Makefile +++ b/Makefile @@ -310,16 +310,19 @@ $(VMDK_IMAGE): $(RAW_IMAGE) vmdk: $(VMDK_IMAGE) -build_stage4: $(SOFTWARE) $(KERNEL) configs/rsync-excludes $(GRUB) +$(STAGE4_TARBALL): $(PORTAGE) stage3-$(ARCH)-latest.tar.bz2 appliances/$(APPLIANCE) configs/rsync-excludes + $(MAKE) $(STAGE3) + $(MAKE) $(PREPROOT) + $(MAKE) $(SOFTWARE) + $(MAKE) $(KERNEL) + $(MAKE) $(GRUB) @scripts/echo Creating stage4 tarball: $(STAGE4_TARBALL) mkdir -p $(IMAGES) tar -acf "$(STAGE4_TARBALL).tmp.xz" --numeric-owner $(COPY_ARGS) -C $(CHROOT) --one-file-system . mv "$(STAGE4_TARBALL).tmp.xz" "$(STAGE4_TARBALL)" + $(MAKE) clean -stage4: build_stage4 clean - - -$(STAGE4_TARBALL): stage4 +stage4: $(STAGE4_TARBALL) eclean: $(COMPILE_OPTIONS)