Skip to content

Commit 063190a

Browse files
committed
Add in support so that build will at least guess which template file
should be used :)
1 parent 2373302 commit 063190a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ fi
1515

1616
ls template
1717
TEMPLATE=generic
18+
#
19+
# Use the file template/.similar to find an appropriate file
20+
# We get the architecture from the config.guess script.
21+
#
22+
CONFIG=`./config.guess`
23+
GUESS=`grep $CONFIG template/.similar 2>/dev/null`
24+
if [ $GUESS ]; then
25+
TEMPLATE=`echo $GUESS | sed 's/.*=//'`
26+
fi
27+
1828
$ECHO_N "Appropriate template file [$TEMPLATE]: $ECHO_C"
1929
read a
2030
if [ "$a." = " ." ]

src/template/.similar

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sparc-sun-solaris2.5=sparc_solaris-gcc
2+
i386-unknown-freebsd3.0=freebsd

0 commit comments

Comments
 (0)