summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-20 23:40:02 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-20 23:40:02 +0000
commit36551bb1f65bd6f59d241fabd5424a49e27fbbe5 (patch)
tree3d911ab3f6d8bc35f71a7424e4e303b3c2b5cd12
parent9cff4857fce61eadff4e4291f0b9613754f5b4b1 (diff)
add package/download target
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4028 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/Makefile5
-rw-r--r--package/rules.mk21
2 files changed, 18 insertions, 8 deletions
diff --git a/package/Makefile b/package/Makefile
index 7548e069a..2b7f0db76 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -3,12 +3,16 @@ include $(TOPDIR)/rules.mk
include $(TOPDIR)/.config
include $(TOPDIR)/.pkgdeps
+SOURCE_PACKAGES:=$(patsubst %,%-source,$(package-y) $(package-m))
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
$(STAMP_DIR) $(TARGET_DIR):
mkdir -p $@
+%-source: $(STAMP_DIR) $(TARGET_DIR)
+ $(MAKE) -C $(patsubst %-source,%,$@) source MAKEFLAGS="$(BUILD_MAKEFLAGS)"
+
%-prepare: $(STAMP_DIR) $(TARGET_DIR)
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)"
@@ -29,6 +33,7 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
all: compile
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
+download: $(SOURCE_PACKAGES)
compile-targets: $(COMPILE_PACKAGES)
compile:
$(MAKE) -j$(CONFIG_JLEVEL) compile-targets
diff --git a/package/rules.mk b/package/rules.mk
index 40e07f839..82298b024 100644
--- a/package/rules.mk
+++ b/package/rules.mk
@@ -19,7 +19,8 @@ define Build/DefaultTargets
endif
endif
- $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+
+ $(PKG_BUILD_DIR)/.prepared:
@-rm -rf $(PKG_BUILD_DIR)
@mkdir -p $(PKG_BUILD_DIR)
$(call Build/Prepare)
@@ -199,11 +200,6 @@ define BuildPackage
endef
-ifneq ($(strip $(PKG_SOURCE)),)
- $(DL_DIR)/$(PKG_SOURCE):
- $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
-endif
-
ifneq ($(strip $(PKG_CAT)),)
define Build/Prepare/Default
@if [ "$(PKG_CAT)" = "unzip" ]; then \
@@ -273,11 +269,20 @@ ifneq ($(DUMP),)
dumpinfo: FORCE
@$(DUMPINFO)
else
-
$(PACKAGE_DIR):
mkdir -p $@
+
+ ifneq ($(strip $(PKG_SOURCE)),)
+ source: $(DL_DIR)/$(PKG_SOURCE)
+
+ $(DL_DIR)/$(PKG_SOURCE):
+ mkdir -p $(DL_DIR)
+ $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
+
+ $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+ endif
- source: $(DL_DIR)/$(PKG_SOURCE)
+ source:
prepare: $(PKG_BUILD_DIR)/.prepared
configure: $(PKG_BUILD_DIR)/.configured