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)"
all: compile
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
+download: $(SOURCE_PACKAGES)
compile-targets: $(COMPILE_PACKAGES)
compile:
$(MAKE) -j$(CONFIG_JLEVEL) compile-targets
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)
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 \
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