diff options
author | Ralph Hempel <ralph.hempel@lantiq.com> | 2009-05-31 12:01:05 +0000 |
---|---|---|
committer | Ralph Hempel <ralph.hempel@lantiq.com> | 2009-05-31 12:01:05 +0000 |
commit | 42554ac0fbfbab923a8050dc89e8d32592497306 (patch) | |
tree | 03951d1088e48cabc0abd6a45a97a5e406528e03 | |
parent | 3fc6b41df72c64815dea32cdb2a871f97fe181bd (diff) | |
download | upstream-42554ac0fbfbab923a8050dc89e8d32592497306.tar.gz upstream-42554ac0fbfbab923a8050dc89e8d32592497306.tar.bz2 upstream-42554ac0fbfbab923a8050dc89e8d32592497306.zip |
[package] add dist and distcheck target (to create new source balls)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16230 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | include/package-defaults.mk | 10 | ||||
-rw-r--r-- | include/package.mk | 10 | ||||
-rw-r--r-- | include/subdir.mk | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/include/package-defaults.mk b/include/package-defaults.mk index 700bc5b990..1553f2f0d1 100644 --- a/include/package-defaults.mk +++ b/include/package-defaults.mk @@ -70,7 +70,7 @@ CONFIGURE_VARS = \ LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ CONFIGURE_PATH = . -CONFIGURE_CMD = ./configure +CONFIGURE_CMD = $(CONFIGURE_PATH)/configure replace_script=$(FIND) $(1) -name $(2) | $(XARGS) chmod u+w; $(FIND) $(1) -name $(2) | $(XARGS) -n1 cp $(SCRIPT_DIR)/$(2); @@ -117,3 +117,11 @@ define Build/Install/Default $(MAKE_INSTALL_FLAGS) \ $(1) install; endef + +define Build/Dist/Default + $(call Build/Compile/Default, DESTDIR="$(PKG_BUILD_DIR)/tmp" CC="$(TARGET_CC)" dist) +endef + +define Build/DistCheck/Default + $(call Build/Compile/Default, DESTDIR="$(PKG_BUILD_DIR)/tmp" CC="$(TARGET_CC)" distcheck) +endef diff --git a/include/package.mk b/include/package.mk index a351661428..22808654db 100644 --- a/include/package.mk +++ b/include/package.mk @@ -141,6 +141,8 @@ define Build/DefaultTargets prepare: $(STAMP_PREPARED) configure: $(STAMP_CONFIGURED) + dist: $(STAMP_CONFIGURED) + distcheck: $(STAMP_CONFIGURED) endef define BuildPackage @@ -189,6 +191,8 @@ Build/Prepare=$(call Build/Prepare/Default,) Build/Configure=$(call Build/Configure/Default,) Build/Compile=$(call Build/Compile/Default,) Build/Install=$(if $(PKG_INSTALL),$(call Build/Install/Default,)) +Build/Dist=$(call Build/Dist/Default,) +Build/DistCheck=$(call Build/DistCheck/Default,) $(PACKAGE_DIR): mkdir -p $@ @@ -213,3 +217,9 @@ clean: clean-staging FORCE $(Build/Clean) rm -f $(STAGING_DIR)/packages/$(PKG_NAME).list $(STAGING_DIR_HOST)/packages/$(PKG_NAME).list rm -rf $(PKG_BUILD_DIR) + +dist: + $(Build/Dist) + +distcheck: + $(Build/DistCheck) diff --git a/include/subdir.mk b/include/subdir.mk index be8c308205..d93d40fca7 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -5,7 +5,7 @@ # See /LICENSE for more information. # -SUBTARGETS:=clean download prepare compile install update refresh prereq +SUBTARGETS:=clean download prepare compile install update refresh prereq dist distcheck subtarget-default = $(filter-out ., \ $(if $($(1)/builddirs-$(2)),$($(1)/builddirs-$(2)), \ |