Skip to content

Commit

Permalink
Implement 'ct-ng source'.
Browse files Browse the repository at this point in the history
Provides a simpler alternative to editing config to enable
CT_ONLY_DOWNLOAD, doing ct-ng build and then restoring .config.

Signed-off-by: Alexey Neyman <stilor@att.net>
  • Loading branch information
stilor committed Oct 30, 2015
1 parent 55d8497 commit 319023c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ct-ng.in
Expand Up @@ -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::
Expand Down Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions scripts/crosstool-NG.sh.in
Expand Up @@ -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"
Expand Down

0 comments on commit 319023c

Please sign in to comment.