summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-04-06 04:43:28 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-04-06 04:43:28 +0000
commit063190a5fa15d1f392cd7c5c314b342df7adec75 (patch)
tree8feffd6c17a715764f31543bd6d22a565879dc73 /src
parent23733026eeacb5126054c50110ccdc7f37e6c741 (diff)
Add in support so that build will at least guess which template file
should be used :)
Diffstat (limited to 'src')
-rw-r--r--src/build10
-rw-r--r--src/template/.similar2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/build b/src/build
index e1b83df907b..4cce793f857 100644
--- a/src/build
+++ b/src/build
@@ -15,6 +15,16 @@ fi
ls template
TEMPLATE=generic
+#
+# Use the file template/.similar to find an appropriate file
+# We get the architecture from the config.guess script.
+#
+CONFIG=`./config.guess`
+GUESS=`grep $CONFIG template/.similar 2>/dev/null`
+if [ $GUESS ]; then
+ TEMPLATE=`echo $GUESS | sed 's/.*=//'`
+fi
+
$ECHO_N "Appropriate template file [$TEMPLATE]: $ECHO_C"
read a
if [ "$a." = " ." ]
diff --git a/src/template/.similar b/src/template/.similar
new file mode 100644
index 00000000000..53176f5a85e
--- /dev/null
+++ b/src/template/.similar
@@ -0,0 +1,2 @@
+sparc-sun-solaris2.5=sparc_solaris-gcc
+i386-unknown-freebsd3.0=freebsd