summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-03-27 21:40:00 -0400
committerJakob Kaivo <jkk@ung.org>2022-03-27 21:40:00 -0400
commitb1eb46e70bfa0b159c25f26f00a589d4545beba0 (patch)
treed8ab62c2554a3dfa336846bba0c3196f4eaa7a38
parent08669ad15cc35be6cb6d022460e90d2dbc635f3b (diff)
remove need for hostinfo and .host
-rw-r--r--.gitignore1
-rw-r--r--Makefile3
-rwxr-xr-xhostinfo5
-rwxr-xr-xquotehostinfo11
4 files changed, 8 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 4679a9d..5acbeb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,3 @@ fdate
mira
miralib/menudriver
miralib/preludx
-.host
diff --git a/Makefile b/Makefile
index 2d509e0..4f941fe 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ YACC = byacc #Berkeley yacc, gnu yacc not compatible
# -Dsparc7 needed for Solaris 2.7
# -Dsparc8 needed for Solaris 2.8 or later
mira: big.o cmbnms.o data.o lex.o reduce.o steer.o trans.o types.o utf8.o y.tab.o \
- version.c miralib/.version fdate .host Makefile
+ version.c miralib/.version fdate Makefile
$(CC) $(CFLAGS) -DVERS=`cat miralib/.version` -DVDATE="\"`./revdate`\"" \
-DHOST="`./quotehostinfo`" version.c cmbnms.o y.tab.o data.o lex.o \
big.o reduce.o steer.o trans.o types.o utf8.o -lm -o mira
@@ -46,7 +46,6 @@ cleanup:
-rm -rf *.o fdate miralib/menudriver mira$(EX)
./unprotect
-rm -f miralib/preludx miralib/stdenv.x miralib/ex/*.x #miralib/ex/*/*.x
- ./hostinfo > .host
install:
make -s all
cp mira$(EX) /$(BIN)
diff --git a/hostinfo b/hostinfo
deleted file mode 100755
index ff1c433..0000000
--- a/hostinfo
+++ /dev/null
@@ -1,5 +0,0 @@
-echo host: `uname -m` `uname -s` `uname -r`
-fil=/tmp/hostinfo$$
-gcc -v 2> $fil
-tail -1 $fil
-rm $fil
diff --git a/quotehostinfo b/quotehostinfo
index cd060ec..c014e28 100755
--- a/quotehostinfo
+++ b/quotehostinfo
@@ -1,7 +1,10 @@
-#!/bin/bash
+#!/bin/sh
fil=/tmp/quotehostinfo$$
-echo compiled: `date` > $fil
+echo compiled: $(date) > $fil
make -s tellcc >> $fil
-cat .host >> $fil
-echo \"`cat $fil | sed 's/.*/&\\\\n/'`\" | sed 's/\\n /\\n/g'
+
+echo host: $(uname -m) $(uname -s) $(uname -r) >> $fil
+gcc -v 2>&1 | tail -1 >> $fil
+
+echo \"$(cat $fil | sed 's/.*/&\\\\n/')\" | sed 's/\\n /\\n/g'
rm $fil