From cbebadf30138395df7874dad8c3b2eedc6c041cc Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Tue, 16 Jun 2009 21:57:25 +0200 Subject: new command "make download" --- Makefile | 17 ++++++++++++----- doc/index.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4398b58..5564796 100644 --- a/Makefile +++ b/Makefile @@ -69,18 +69,25 @@ DOWNLOAD_PKG_ARCHIVE = \ .PHONY: all all: $(PKG_RULES) +.PHONY: download +download: $(addprefix download-,$(PKG_RULES)) + define PKG_RULE +.PHONY: download-$(1) +download-$(1): $(TOP_DIR)/src/$(1).mk $(addprefix download-,$($(1)_DEPS)) + [ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)' + if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ + $(call DOWNLOAD_PKG_ARCHIVE,$(1)); \ + $(call CHECK_PKG_ARCHIVE,$(1)) || { echo 'Wrong checksum!'; exit 1; }; \ + fi + .PHONY: $(1) $(1): $(PREFIX)/installed-$(1) $(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk \ + download-$(1) \ $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ $(addprefix $(PREFIX)/installed-,$($(1)_DEPS)) [ -d '$(PREFIX)' ] || mkdir -p '$(PREFIX)' - [ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)' - if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ - $(call DOWNLOAD_PKG_ARCHIVE,$(1)); \ - $(call CHECK_PKG_ARCHIVE,$(1)) || { echo 'Wrong checksum!'; exit 1; }; \ - fi $(if $(value $(1)_BUILD), rm -rf '$(2)' mkdir -p '$(2)' diff --git a/doc/index.html b/doc/index.html index b56daa5..2162e22 100644 --- a/doc/index.html +++ b/doc/index.html @@ -377,6 +377,10 @@ AR=$(CROSS)ar

Almost all packages are updated to their latest version.

+ +

+ The command "make download" is implemented. +

Old Releases
@@ -530,6 +534,10 @@ pfexec python setup.py install

Usage

+

+ All build commands also download the packages if necessary. +

+
make
@@ -563,6 +571,28 @@ pfexec python setup.py install each with up to 2 compiler processes running in parallel +
make download
+ +
+ download all packages, + non-parallel, + such that subsequent builds work without internet access +
+ +
make download-foo download-bar
+ +
+ download packages "foo", "bar" and their dependencies, + non-parallel +
+ +
make download-foo download-bar -j 4
+ +
+ download packages "foo", "bar" and their dependencies, + where up to 4 packages are downloaded in parallel +
+
make strip
-- cgit v0.12