summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-02-22 08:25:36 (GMT)
committerAlexey Neyman <stilor@att.net>2018-04-07 19:03:17 (GMT)
commit69df9ae9ddb806b42d962ae8a0b2b8f7b31f480e (patch)
tree5e23600df2ad384e15b1c6131e3e235993a6d4b6
parentdbe3877285549d1cdc549826673cdf8f07cf154c (diff)
Remove the need for configure substitutions in scripts
... so that scripts/ directory can be installed verbatim. Signed-off-by: Alexey Neyman <stilor@att.net>
-rw-r--r--config/global/build-behave.in3
-rw-r--r--ct-ng.in7
-rw-r--r--scripts/.gitignore3
-rw-r--r--scripts/crosstool-NG.sh (renamed from scripts/crosstool-NG.sh.in)4
-rw-r--r--scripts/saveSample.sh (renamed from scripts/saveSample.sh.in)0
-rw-r--r--scripts/scripts.mk (renamed from scripts/scripts.mk.in)8
6 files changed, 14 insertions, 11 deletions
diff --git a/config/global/build-behave.in b/config/global/build-behave.in
index d3298ea..4a50428 100644
--- a/config/global/build-behave.in
+++ b/config/global/build-behave.in
@@ -13,7 +13,8 @@ config PARALLEL_JOBS
Enter 1 to have only one job at a time.
- Enter 0 to set automatically based on how many processors the host has.
+ Enter 0 to set automatically based on how many processors the build
+ machine has.
config LOAD
string
diff --git a/ct-ng.in b/ct-ng.in
index 7e0368d..761b885 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -22,6 +22,10 @@ export CT_DOC_DIR:=@docdir@
# This is crosstool-NG version string
export CT_VERSION:=@PACKAGE_VERSION@
+# Download agents used by scripts.mk
+CT_WGET := @wget@
+CT_CURL := @curl@
+
# Paths found by ./configure
include $(CT_LIB_DIR)/paths.mk
@@ -203,7 +207,8 @@ source: .config
$(SILENT)CT_SOURCE=y $(bash) $(CT_LIB_DIR)/scripts/crosstool-NG.sh
build: .config
- $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/crosstool-NG.sh
+ $(SILENT)BUILD_NCPUS=`@@CT_cpucount@@ 2>/dev/null || echo 0` \
+ $(bash) $(CT_LIB_DIR)/scripts/crosstool-NG.sh
build.%:
$(SILENT)$(MAKE) -rf $(CT_NG) build CT_JOBS=$*
diff --git a/scripts/.gitignore b/scripts/.gitignore
deleted file mode 100644
index 553a363..0000000
--- a/scripts/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-crosstool-NG.sh
-saveSample.sh
-scripts.mk
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh
index 878681a..4d79e48 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh
@@ -563,8 +563,8 @@ if [ -z "${CT_RESTART}" ]; then
CT_PARALLEL_JOBS="${CT_JOBS}"
fi
# Use the number of processors+1 when automatically setting the number of
- # parallel jobs. Fall back to 1 if the host doesn't use GLIBC.
- AUTO_JOBS=$((`@@CT_cpucount@@ 2>/dev/null || echo 0` + 1))
+ # parallel jobs.
+ AUTO_JOBS=$[ BUILD_NCPUS + 1 ]
[ ${CT_PARALLEL_JOBS} -eq 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
[ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh
index 5fab6d9..5fab6d9 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh
diff --git a/scripts/scripts.mk.in b/scripts/scripts.mk
index 99b9d76..d77f1a7 100644
--- a/scripts/scripts.mk.in
+++ b/scripts/scripts.mk
@@ -31,11 +31,11 @@ ifneq ($(strip $(V)),2)
curl_silent_opt = --silent
endif
-ifneq (@@CT_wget@@,)
-download_cmd = wget --passive-ftp $(wget_silent_opt) -O $@
+ifneq ($(CT_wget),)
+download_cmd = $(CT_wget) --passive-ftp $(wget_silent_opt) -O $@
else
-ifneq (@@CT_curl@@,)
-download_cmd = curl --ftp-pasv $(curl_silent_opt) -o $@
+ifneq ($(CT_curl),)
+download_cmd = $(CT_curl) --ftp-pasv $(curl_silent_opt) -o $@
else
download_cmd = $(error wget or curl needed for downloads)
endif