aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-14 23:37:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-14 23:37:40 +0000
commit351d0d4b07fe39e6fad5d14fc18f176298a96143 (patch)
tree5a865e0b5fe3ac25b2e12aac47700b789d119b48
parentfd9477a18f6cea564acd9c6801d844411b8bd9e8 (diff)
downloadupstream-351d0d4b07fe39e6fad5d14fc18f176298a96143.tar.gz
upstream-351d0d4b07fe39e6fad5d14fc18f176298a96143.tar.bz2
upstream-351d0d4b07fe39e6fad5d14fc18f176298a96143.zip
Fix config checks for Image Builder and SDK - only build them when requested. Clear all packages from bin/packages at the beginning of package/compile when the Image Builder is selected, because the Image Builder can't handle multiple versions of the same package.
SVN-Revision: 6102
-rw-r--r--package/Makefile2
-rw-r--r--target/Makefile10
-rw-r--r--target/imagebuilder/Makefile4
-rw-r--r--target/sdk/Makefile5
4 files changed, 15 insertions, 6 deletions
diff --git a/package/Makefile b/package/Makefile
index eafd8cbe6e..cd4304e667 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -50,7 +50,9 @@ prereq: $(PREREQ_PACKAGES)
download: $(DOWNLOAD_PACKAGES)
compile-targets: $(COMPILE_PACKAGES)
compile:
+ @-rm -f $(PACKAGE_DIR)/*.ipk
$(MAKE) compile-targets
+
install-targets: $(INSTALL_PACKAGES)
install:
rm -rf $(BUILD_DIR)/root
diff --git a/target/Makefile b/target/Makefile
index 4853e3fbd2..3f97b9a14d 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -20,7 +20,15 @@ IMAGE_DIR:=linux/$(BOARD)-$(KERNEL)/image
download: $(patsubst %,%-download,$(TARGETS-y))
prepare: linux-prepare
compile: linux-compile image_compile
-install: image_clean linux-install sdk_install image_install imagebuilder_install
+install: image_clean linux-install image_install
+
+ifeq ($(CONFIG_SDK),y)
+install: sdk_install
+endif
+ifeq ($(CONFIG_IB),y)
+install: imagebuilder_install
+endif
+
clean: linux-clean sdk-clean imagebuilder-clean image_clean
prereq: FORCE
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 439a103428..b59b265adc 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -18,7 +18,7 @@ IB_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
all: compile
-$(BIN_DIR)/$(IB_NAME).tar.bz2: FORCE
+$(BIN_DIR)/$(IB_NAME).tar.bz2: clean
rm -rf $(IB_BUILD_DIR)
mkdir -p $(IB_BUILD_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(IB_BUILD_DIR)/staging_dir_$(ARCH)/bin $(IB_BUILD_DIR)/target/linux
$(CP) \
@@ -43,5 +43,5 @@ prepare:
compile: $(BIN_DIR)/$(IB_NAME).tar.bz2
install: compile
-clean:
+clean: FORCE
rm -rf $(IB_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.bz2
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 56a6c97ecd..d65b934c95 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -18,8 +18,7 @@ SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
all: compile
-$(BIN_DIR)/$(SDK_NAME).tar.bz2:
- rm -rf $(SDK_BUILD_DIR)
+$(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
$(CP) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
$(TAR) -cf - -C $(TOPDIR) --exclude=ccache/ staging_dir_$(ARCH) | \
@@ -45,7 +44,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2:
download:
prepare:
compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
-install:
+install: compile
clean:
rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2