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/<appliance>/ 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/<appliance>
    $ make APPLIANCE=<appliance> stage4
This commit is contained in:
Albert Hopkins 2015-02-28 22:35:45 +00:00
parent c8c9bc1a1f
commit 9562528920
1 changed files with 8 additions and 5 deletions

View File

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