summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-05-13 18:10:47 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-05-13 18:10:47 (GMT)
commite89072b5a5922a08bcf3f1f10f3bd12806918f23 (patch)
treed48438023543db61b9e8c1efe01127293cf1130a /scripts
parent1c1d672f87c1fbf0428486f0eeb4f2791483570a (diff)
Add a new action: show-tuple
- in a directory containing a crosstool-NG configuration, prints the tuple of the configured target to stdout. -------- diffstat follows -------- /trunk/Makefile.in | 4 3 1 0 +++- /trunk/scripts/showTuple.sh.in | 30 30 0 0 ++++++++++++++++++++++++++++++ /trunk/ct-ng.comp | 2 1 1 0 +- /trunk/ct-ng.in | 10 9 1 0 +++++++++- 4 files changed, 43 insertions(+), 3 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/showTuple.sh.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/showTuple.sh.in b/scripts/showTuple.sh.in
new file mode 100644
index 0000000..c7df08c
--- /dev/null
+++ b/scripts/showTuple.sh.in
@@ -0,0 +1,30 @@
+#!@@CT_bash@@
+
+# What we need:
+# - the .config file
+
+# Parse the tools' paths configuration
+. "${CT_LIB_DIR}/paths.mk"
+
+# We'll need the stdout later, save it
+exec 7>&1
+
+# Parse the common functions
+. "${CT_LIB_DIR}/scripts/functions"
+
+# Don't care about any log file
+exec >/dev/null
+rm -f "${tmp_log_file}"
+
+# Parse the configuration file
+. .config
+
+# Parse architecture and kernel specific functions
+. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
+. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
+
+# Build CT_TARGET
+CT_DoBuildTargetTuple
+
+# All this for this single echo... :-( Sigh, I'll have to re-arrange things...
+echo "${CT_TARGET}" >&7