]> granicus.if.org Git - postgresql/commitdiff
Add in support so that build will at least guess which template file
authorMarc G. Fournier <scrappy@hub.org>
Sun, 6 Apr 1997 04:43:28 +0000 (04:43 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 6 Apr 1997 04:43:28 +0000 (04:43 +0000)
should be used :)

src/build
src/template/.similar [new file with mode: 0644]

index e1b83df907bb003e2f4f0ca7ce510af922f479e9..4cce793f8578c9d30885e4a08c5e8400a64dd443 100644 (file)
--- 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 (file)
index 0000000..53176f5
--- /dev/null
@@ -0,0 +1,2 @@
+sparc-sun-solaris2.5=sparc_solaris-gcc
+i386-unknown-freebsd3.0=freebsd