summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ct-ng.in4
-rw-r--r--scripts/crosstool-NG.sh.in3
2 files changed, 7 insertions, 0 deletions
diff --git a/ct-ng.in b/ct-ng.in
index 8a407ba..036f534 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -104,6 +104,7 @@ help-tail::
@echo 'See "man 1 $(notdir $(CT_NG))" for some help as well'
help-build::
+ @echo ' source - Download sources for currently configured toolchain'
@echo ' build[.#] - Build the currently configured toolchain'
help-clean::
@@ -143,6 +144,9 @@ show-tuple: .config.2
$(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showTuple.sh
# Actual build
+source: .config.2
+ $(SILENT)CT_SOURCE=y $(CT_LIB_DIR)/scripts/crosstool-NG.sh
+
build: .config.2
$(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index ab654da..e29dea5 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -524,6 +524,9 @@ if [ -z "${CT_RESTART}" ]; then
[ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
+ # Override 'download only' option
+ [ -n "${CT_SOURCE}" ] && CT_ONLY_DOWNLOAD=y
+
# Now that we've set up $PATH and $CT_CFLAGS_FOR_HOST, sanity test that gcc
# is runnable so that the user can troubleshoot problems if not.
CT_DoStep DEBUG "Checking that we can run gcc -v"