From b1eb46e70bfa0b159c25f26f00a589d4545beba0 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 27 Mar 2022 21:40:00 -0400 Subject: remove need for hostinfo and .host --- .gitignore | 1 - Makefile | 3 +-- hostinfo | 5 ----- quotehostinfo | 11 +++++++---- 4 files changed, 8 insertions(+), 12 deletions(-) delete mode 100755 hostinfo 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 -- cgit v1.2.1