From 0c0ff5f64b403165e6952dbd37c005d0cb180734 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 26 Jul 1988 19:22:11 +0000 Subject: [PATCH] do not write over distribution files --- first/.distr | 4 ++- first/first | 69 ++++++++++++++++++++++++++++++++----------------- first/fixlexlib | 3 ++- 3 files changed, 51 insertions(+), 25 deletions(-) diff --git a/first/.distr b/first/.distr index dae412de4..bf014cd22 100644 --- a/first/.distr +++ b/first/.distr @@ -4,4 +4,6 @@ first did_first myecho.c fixlexlib -cc.xenix +cc.xenix.src +local.h.src +em_path.h.src diff --git a/first/first b/first/first index 5fafe4fb7..050e4a754 100755 --- a/first/first +++ b/first/first @@ -34,7 +34,7 @@ echo "/tmp and /usr/tmp ok" echo setting ACK HOME Directory in ../h/em_path.h ... rm -f em_path.h HM=`cd ..; pwd` -sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$HM\"@" <../h/em_path.h >em_path.h +sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$HM\"@" em_path.h if cmp ../h/em_path.h em_path.h >/dev/null 2>&1 then : Don't touch ../h/em_path.h, it's already correct @@ -118,6 +118,8 @@ fi : "Take action according to the system used" : 'Prevent the use of the system assembler on for certain systems' : 'prevent the use of ranlib on pdp 11s' +cp ../lib/vax4/descr.src ../lib/vax4/descr +cp ../lib/descr/fe.src ../lib/descr/fe echo "take some actions according to system used ..." case `ack_sys` in pdp_*) RMD="vax4" @@ -134,7 +136,6 @@ do echo "disabling use of local assembler and loader for $i" if grep '^name as$' descr >/dev/null 2>&1 then - cp descr descr.orig ed - descr <<'ABC' /^name as$/;/^end$/d /^name ld$/;/^end$/d @@ -146,7 +147,6 @@ ABC done case `ack_sys` in vax_bsd4_2) ( cd ../lib/vax4 - cp descr descr.orig ed - descr <<'ABC' /CPP_F/s/$/ -D__BSD4_2/ w @@ -155,7 +155,6 @@ ABC ) ;; vax_sysV_2) ( cd ../lib/vax4 - cp descr descr.orig ed - descr <<'ABC' /CPP_F/s/$/ -D__USG/ w @@ -182,7 +181,7 @@ SMALL) ACM=i86 ; BM = 0 ; SYS=SYS_5 ;; *) ACM=m68k2 ; SYS=SYS_5 ;; esac rm -f local.h -sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < ../h/local.h >local.h +sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < local.h.src >local.h if cmp -s ../h/local.h local.h then echo "../h/local.h already correct" @@ -236,7 +235,7 @@ xenix3) echo 'not recognize its own line directives.' echo 'You can remove this "cc" script from the EM bin directory' echo 'when installation is done.' - cp cc.xenix cc.xenix.orig + cp cc.xenix.src cc.xenix ed - cc.xenix <