summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-10-22 18:26:09 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-10-22 18:26:09 (EDT)
commit89ff18220fded7667a3a29ea7e2c228264e0a55f (patch)
treedc93056a63d938aa4d6ef2422a78c915a721431b
parentbf41f6833bb60e443ce95671822d97ee2fcc22b8 (diff)
source.mk: Also download toolchain archives
-rw-r--r--source.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/source.mk b/source.mk
index 45968a1..f8948c6 100644
--- a/source.mk
+++ b/source.mk
@@ -8,3 +8,13 @@ $(source_archive):
wget -O '$@' "$(upstream_url)"
source: $(source_archive)
+ set -e; \
+ dir="$$(tar -tzf $(source_archive) | head -n 1 )"; \
+ tar -xzOf $(source_archive) "$${dir%%/*}/Makefile" >Makefile; \
+ printf '\ntoolchain-dl:\n' >>Makefile; \
+ for pkg in GMP MPFR MPC BINUTILS GCC; do \
+ printf '\twget -c -P ../toolchain/ $$(%s_URL)\n' "$${pkg}" \
+ >>Makefile; \
+ done; \
+ make toolchain-dl; \
+ rm Makefile