summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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