From 2b90dffa6faa79b6af57bcdde3e243aa77be26d4 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 22 Aug 2011 18:31:45 +0300 Subject: [PATCH] don't override targets for no reason --- image.in/Makefile | 15 +++++++-------- sub.in/stage1/Makefile | 8 +++----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/image.in/Makefile b/image.in/Makefile index f442ae0e..a19e9ffa 100644 --- a/image.in/Makefile +++ b/image.in/Makefile @@ -32,16 +32,18 @@ else GLOBAL_HSH_APT_CONFIG = $(APTCONF) endif +# Metadata/ needed only for installers (and not for e.g. syslinux.iso) +ifneq "$(STAGE1_KFLAVOUR)$(KFLAVOURS)" "" +METADATA = metadata +endif + include $(MKIMAGE_PREFIX)/targets.mk all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \ $(GLOBAL_CLEAN_WORKDIR) -# Metadata/ needed only for installer (and not for e.g. syslinux.iso) -ifeq "$(STAGE1_KFLAVOUR)$(KFLAVOURS)" "" -metadata: - @echo "** skipping metadata target, no stage1 kernel installed" -else +prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) $(IMAGEDIR) + metadata: dot-base @mkdir -p files/Metadata @rm -f files/Metadata/pkg-groups.tar @@ -50,14 +52,11 @@ metadata: dot-base $$(echo $(call list,$(GROUPS) .base) \ $(call group,$(GROUPS)) \ | sed 's,$(PKGDIR)/*,,g') -endif dot-base: @echo -e "# auto-added in image.in/Makefile" >> $(call list,.base) @echo "$(call kpackages,$(KMODULES),$(KFLAVOURS))" >> $(call list,.base) -prep: $(GLOBAL_DEBUG) dot-disk metadata $(IMAGEDIR) - $(IMAGEDIR): mkdir -p "$(IMAGEDIR)" diff --git a/sub.in/stage1/Makefile b/sub.in/stage1/Makefile index 9114844a..4cc2acfa 100644 --- a/sub.in/stage1/Makefile +++ b/sub.in/stage1/Makefile @@ -27,10 +27,8 @@ include $(MKIMAGE_PREFIX)/targets.mk STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS)) # propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso) -ifeq "$(STAGE1_KFLAVOUR)" "" -build-propagator: - @echo "** skipping build-propagator target, no kernel installed" -else +ifneq "$(STAGE1_KFLAVOUR)" "" +BUILD_PROPAGATOR = build-propagator CHROOT_PACKAGES_REGEXP := $(call kpackages,$(STAGE1_KMODULES_REGEXP),$(STAGE1_KFLAVOUR)) INFO_STAGE1_KFLAVOUR := $(STAGE1_KFLAVOUR) endif @@ -40,7 +38,7 @@ CHROOT_PACKAGES = $(STAGE1_PACKAGES) $(COMMON_PACKAGES) # scripts prepare bootloader configuration, too # NB: we pass tested squashfs options for ../install2/Makefile -all: | debug prepare-workdir copy-tree run-scripts build-propagator \ +all: | debug prepare-workdir copy-tree run-scripts $(BUILD_PROPAGATOR) \ copy-$(BOOTLOADER) $(COPY_SQUASHCFG) pack-image $(GLOBAL_CLEAN_WORKDIR) @if test -s $(OUTDIR)/squashcfg.mk; then \ cp $(OUTDIR)/squashcfg.mk $(GLOBAL_BUILDDIR)/; \