From: ceriel Date: Thu, 14 Nov 1991 09:35:36 +0000 (+0000) Subject: Many changes in installation mechanism X-Git-Tag: release-5-5~633 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=13a0dec2f629b289b219bc56e479286f6f512315;p=ack.git Many changes in installation mechanism --- diff --git a/first/first b/first/first index 58d99d171..8e6bf5355 100755 --- a/first/first +++ b/first/first @@ -48,24 +48,24 @@ BM=1 OLDACM=$ACM OLDSYS=$SYS case $SYSNAME in -vax_bsd4_1a) ACM=vax4 ; SYS=BSD4_1 ; BYTE_ORDER=0123 ;; -vax_bsd4_2) ACM=vax4 ; SYS=BSD4_2 ; BYTE_ORDER=0123 ;; -vax_sysV_2) ACM=vax4 ; SYS=SYS_5 ; BYTE_ORDER=0123 ;; -i386) ACM=i386 ; SYS=SYS_5 ; BYTE_ORDER=0123 ;; -sun3) ACM=sun3 ; SYS=BSD4_2; BYTE_ORDER=3210 ;; -sun2) ACM=sun2 ; SYS=BSD4_2; BYTE_ORDER=3210 ;; -m68_unisoft|m68k2) ACM=m68k2 ; SYS=V7; BYTE_ORDER=3210 ;; -m68_sysV_0|mantra) ACM=mantra ; SYS=SYS_5; BYTE_ORDER=3210 ;; -m68020) ACM=m68020 ; SYS=SYS_5; BYTE_ORDER=3210 ;; -sparc) ACM=sparc ; SYS=BSD4_2; BYTE_ORDER=3210 ;; -i86) ACM=i86 ; SYS=SYS_5; BYTE_ORDER=0123 ;; -xenix3) ACM=xenix3 ; SYS=SYS_5; BYTE_ORDER=0123 ;; -minix) ACM=minix ; SYS=V7; BYTE_ORDER=0123 ;; -pmds) ACM=pmds ; SYS=V7; BYTE_ORDER=3210 ;; -pmds4) ACM=pmds4 ; SYS=V7; BYTE_ORDER=3210 ;; -minixST) ACM=minixST ; SYS=V7; BYTE_ORDER=3210 ;; -m68k4) ACM=m68k4 ; SYS=V7; BYTE_ORDER=3210 ;; -*) ACM=XXX ; SYS=XXX ; BYTE_ORDER=XXX ;; +vax_bsd4_1a) ACM=vax4 ; SYS=BSD4_1 ; BYTE_ORDER=0123 ; MACH=vax4 ;; +vax_bsd4_2) ACM=vax4 ; SYS=BSD4_2 ; BYTE_ORDER=0123 ; MACH=vax4 ;; +vax_sysV_2) ACM=vax4 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=vax4 ;; +i386) ACM=i386 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=i386 ;; +sun3) ACM=sun3 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68020 ;; +sun2) ACM=sun2 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68k4 ;; +m68_unisoft|m68k2) ACM=m68k2 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;; +m68_sysV_0|mantra) ACM=mantra ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68k4 ;; +m68020) ACM=m68020 ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68020 ;; +sparc) ACM=sparc ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=sparc ;; +i86) ACM=i86 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;; +xenix3) ACM=xenix3 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;; +minix) ACM=minix ; SYS=V7; BYTE_ORDER=0123 ; MACH=i86 ;; +pmds) ACM=pmds ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;; +pmds4) ACM=pmds4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;; +minixST) ACM=minixST ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;; +m68k4) ACM=m68k4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;; +*) ACM=XXX ; SYS=XXX ; BYTE_ORDER=XXX ; MACH=XXX ;; esac : do not change the order in MACH_LIST. check limit_enquire first. @@ -186,6 +186,7 @@ echo "DISABLE_SUP=\"$DISABLE_SUP\"; export DISABLE_SUP" >> macros echo "DO_MACHINE_INDEP=\"$DO_MACHINE_INDEP\"; export DO_MACHINE_INDEP" >> macros echo "MACH_LIST=\"$MACH_LIST\"; export MACH_LIST" >> macros echo "SYSVAX=\"$SYSVAX\"; export SYSVAX" >> macros +echo "MACH=\"$MACH\"; export MACH" >> macros echo "WS=\"$WS\"; export WS" >> macros echo "PS=\"$PS\"; export PS" >> macros diff --git a/first/get_makepars b/first/get_makepars index d28960ab9..bd39e9c52 100755 --- a/first/get_makepars +++ b/first/get_makepars @@ -53,6 +53,9 @@ UTIL_HOME = $UTIL_HOME # Machine independent part created? DO_MACHINE_INDEP = $DO_MACHINE_INDEP + +# Target machine, only needed for fast compilers +MACH = $MACH " > make_macros if [ $TARGET_HOME = $UTIL_HOME ] diff --git a/first/install_tail b/first/install_tail index 2162ec6fd..36788fa51 100644 --- a/first/install_tail +++ b/first/install_tail @@ -1,9 +1,20 @@ set -e -PATH=::$SRC_HOME/first:$UTIL_HOME/bin:/bin:/usr/bin:/usr/ucb +PATH=::$CONFIG/bin:$UTIL_HOME/bin:/bin:/usr/bin:/usr/ucb export PATH -mk_config `pwd`/make_macros +$SRC_HOME/first/create_dir $CONFIG +$SRC_HOME/first/create_dir $CONFIG/bin + +cat macros $SRC_HOME/first/mk_config > $CONFIG/bin/mk_config +cat macros $SRC_HOME/first/mk_target > $CONFIG/bin/mk_target +cat macros $SRC_HOME/first/limit_impl > $CONFIG/bin/limit_impl + +sed '/^#PARAMS/r make_macros' < $SRC_HOME/first/mk_makefile > $CONFIG/bin/mk_makefile +chmod +x $CONFIG/bin/* +cp $SRC_HOME/first/create_dir $CONFIG/bin/create_dir + +mk_config mk_target @@ -11,7 +22,7 @@ limit_impl case $SYSNAME in i386) - ed - $TARGET_HOME/lib/descr/fe << ABC + ed - $TARGET_HOME/lib/descr/fe << 'ABC' 1,$s/-D{NAME}/-D{NAME} -DNO_PROTOTYPE/ w q diff --git a/first/limit_impl b/first/limit_impl index a3184e28b..bf0f19501 100755 --- a/first/limit_impl +++ b/first/limit_impl @@ -148,7 +148,7 @@ if [ $DO_MACHINE_INDEP = n ] then for i in $CONFIG/mach/*/Action do - for j in libem libend libfp libdb libsys libmon libbsd4_2 libbsd4_1a libsysV_2 + for j in libem libend libfp libdb libsys libmon libbsd4_2 libbsd4_1a libsysV_2 libce do if grep -s $j $i then diff --git a/first/mk_config b/first/mk_config index 1049513e3..b477a068a 100755 --- a/first/mk_config +++ b/first/mk_config @@ -1,13 +1,5 @@ set -e -MACROS=$1 - -if [ -f $MACROS ] -then : -else echo "$0: $MACROS not found" 1>&2 - exit 3 -fi - create_dir $CONFIG cd $SRC_HOME @@ -22,9 +14,13 @@ done for i in `cat dir_list` do create_dir $i - rm -f $i/NoAction + rm -f $i/No* + if [ -f $i/Makefile ] + then + ( cd $i ; if make clean ; then exit 0 ; else exit 0 ; fi ) > /dev/null 2>&1 + fi if [ -f $SRC_HOME/$i/proto.make ] - then mk_makefile $MACROS $SRC_HOME/$i/proto.make > $i/Makefile + then mk_makefile $SRC_HOME/$i/proto.make > $i/Makefile fi if [ -f $SRC_HOME/$i/Action ] then @@ -38,7 +34,7 @@ done cd $SRC_HOME/util/ceg/util for i in make_* do - mk_makefile $MACROS $i > $CONFIG/util/ceg/util/$i + mk_makefile $i > $CONFIG/util/ceg/util/$i done cd $CONFIG @@ -62,25 +58,25 @@ do if [ -d $i/as ] then cd $i/as - mk_makefile $MACROS $SRC_HOME/mach/proto/as/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile + mk_makefile $SRC_HOME/mach/proto/as/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile cd ../.. fi if [ -d $i/top ] then cd $i/top - mk_makefile $MACROS $SRC_HOME/mach/proto/top/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile + mk_makefile $SRC_HOME/mach/proto/top/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile cd ../.. fi if [ -d $i/cg ] then cd $i/cg - mk_makefile $MACROS $SRC_HOME/mach/proto/cg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile + mk_makefile $SRC_HOME/mach/proto/cg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile cd ../.. fi if [ -d $i/ncg ] then cd $i/ncg - mk_makefile $MACROS $SRC_HOME/mach/proto/ncg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile + mk_makefile $SRC_HOME/mach/proto/ncg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile if [ -f $SRC_HOME/mach/$i/ncg/table_dir ] then ed - Makefile < Makefile + mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile cd ../.. fi done @@ -105,7 +101,7 @@ EOF if [ -d $i/$j ] then cd $i/$j - mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.libsys | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" -e "s/libsys/$j/g" > Makefile + mk_makefile $SRC_HOME/mach/proto/libg/proto.libsys | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" -e "s/libsys/$j/g" > Makefile cd ../.. fi done @@ -113,7 +109,7 @@ EOF do create_dir $i/$j cd $i/$j - mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile + mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile cd ../.. done if [ $i = vax4 ] @@ -123,7 +119,7 @@ EOF else create_dir $i/libsys cd $i/libsys - mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.sysmon | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile + mk_makefile $SRC_HOME/mach/proto/libg/proto.sysmon | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile cd ../.. fi fi diff --git a/first/mk_makefile b/first/mk_makefile index 052eee164..1b5f81d2a 100755 --- a/first/mk_makefile +++ b/first/mk_makefile @@ -1,15 +1,25 @@ : '$Header$' -: This shell script inserts the file "make_macros" after a line +: This shell script inserts make macros after a line : starting with #PARAMS in "make_proto", and produces the result on : standard output. +trap "rm -f /tmp/mk_mak$$" 0 1 2 3 15 case $# in -2) ;; -*) echo "Usage: $0 " 1>&2 +1) ;; +*) echo "Usage: $0 " 1>&2 exit 1 ;; esac -sed -e "/^#PARAMS/r $1" $2 +cp $1 /tmp/mk_mak$$ + +ed - /tmp/mk_mak$$ << 'EOF' +/^#PARAMS/c +#PARAMS do not remove this line! +. +w +q +EOF +cat /tmp/mk_mak$$ exit 0 diff --git a/first/mk_target b/first/mk_target index be79a55d5..be17d7ac6 100755 --- a/first/mk_target +++ b/first/mk_target @@ -31,13 +31,11 @@ create_dir $TARGET_HOME/etc create_dir $TARGET_HOME/h create_dir $TARGET_HOME/include create_dir $TARGET_HOME/doc -create_dir $TARGET_HOME/man cp $SRC_HOME/etc/ip_spec.t $TARGET_HOME/etc/ip_spec.t ( cd $SRC_HOME/lib ; tar cf - . ) | ( cd $TARGET_HOME/lib ; tar xf - ) ( cd $SRC_HOME/include ; tar cf - . ) | ( cd $TARGET_HOME/include ; tar xf - ) ( cd $SRC_HOME/h ; tar cf - . ) | ( cd $TARGET_HOME/h ; tar xf - ) -( cd $SRC_HOME/man ; tar cf - . ) | ( cd $TARGET_HOME/man ; tar xf - ) ( cd $SRC_HOME/doc ; tar cf - . ) | ( cd $TARGET_HOME/doc ; tar xf - ) cd $TARGET_HOME