# HG changeset patch # User Volker Grabsch # Date 1245182245 -7200 # Node ID bb2b329f85d383bbd17c93f57eea83d5f09769c3 # Parent e5d8bae9ec6a8bc465f1d92fcb775ee6fe78a8cb new command "make download" diff -r e5d8bae9ec6a -r bb2b329f85d3 Makefile --- a/Makefile Sat Jun 13 00:27:06 2009 +0200 +++ b/Makefile Tue Jun 16 21:57:25 2009 +0200 @@ -69,18 +69,25 @@ .PHONY: all all: $(PKG_RULES) +.PHONY: download +download: $(addprefix download-,$(PKG_RULES)) + define PKG_RULE -.PHONY: $(1) -$(1): $(PREFIX)/installed-$(1) -$(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk \ - $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ - $(addprefix $(PREFIX)/installed-,$($(1)_DEPS)) - [ -d '$(PREFIX)' ] || mkdir -p '$(PREFIX)' +.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)' $(if $(value $(1)_BUILD), rm -rf '$(2)' mkdir -p '$(2)' diff -r e5d8bae9ec6a -r bb2b329f85d3 doc/index.html --- a/doc/index.html Sat Jun 13 00:27:06 2009 +0200 +++ b/doc/index.html Tue Jun 16 21:57:25 2009 +0200 @@ -377,6 +377,10 @@

Almost all packages are updated to their latest version.

+ +

+ The command "make download" is implemented. +

Old Releases
@@ -530,6 +534,10 @@

Usage

+

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

+
make
@@ -563,6 +571,28 @@ 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