diff --git a/bin/cc-and-mkdep.ack b/bin/cc-and-mkdep.ack index fb7103eb8..78119d8e7 100755 --- a/bin/cc-and-mkdep.ack +++ b/bin/cc-and-mkdep.ack @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Compile and make dependencies. First argument is the file on which the diff --git a/bin/cc-and-mkdep.all b/bin/cc-and-mkdep.all index 3a5271ef6..c95fe300b 100755 --- a/bin/cc-and-mkdep.all +++ b/bin/cc-and-mkdep.all @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Compile and make dependencies. First argument is the file on which the @@ -16,5 +17,5 @@ do ;; esac done -$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n +$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n 2>/dev/null exec $CC $* diff --git a/bin/cc-and-mkdep.sun b/bin/cc-and-mkdep.sun index 0245b9cf6..f5b3e93a6 100755 --- a/bin/cc-and-mkdep.sun +++ b/bin/cc-and-mkdep.sun @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Compile and make dependencies. First argument is the file on which the diff --git a/bin/do_deps b/bin/do_deps index 51418c741..a90d2034b 100755 --- a/bin/do_deps +++ b/bin/do_deps @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Produce dependencies for all argument files diff --git a/bin/do_resolve b/bin/do_resolve index 064bcbedf..020774075 100755 --- a/bin/do_resolve +++ b/bin/do_resolve @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Resolve name clashes in the files on the argument list. If these diff --git a/bin/lint-lib.ack b/bin/lint-lib.ack index b851ac270..304b5ef2f 100755 --- a/bin/lint-lib.ack +++ b/bin/lint-lib.ack @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Create a lint library file. The name of the library file is constructed diff --git a/bin/lint-lib.unix b/bin/lint-lib.unix index eb20c2625..dda4d9f5d 100755 --- a/bin/lint-lib.unix +++ b/bin/lint-lib.unix @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : Create a lint library file. The name of the library file is constructed diff --git a/bin/mk_manpage b/bin/mk_manpage index 6b7d95302..254b88b4c 100755 --- a/bin/mk_manpage +++ b/bin/mk_manpage @@ -1,3 +1,5 @@ +#!/bin/sh + num=`expr $1 : '.*\.\([1-8]\)'` if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi diff --git a/bin/rm_deps b/bin/rm_deps index 6a136f132..a343bebb0 100755 --- a/bin/rm_deps +++ b/bin/rm_deps @@ -1,3 +1,4 @@ +#!/bin/sh : $Id$ : remove dependencies from a makefile, write result on standard output. diff --git a/distr/dwalk b/distr/dwalk index 6db9f0e02..1a869f105 100755 --- a/distr/dwalk +++ b/distr/dwalk @@ -1,3 +1,5 @@ +#!/bin/sh + : ${CDIR=.} ${DF-:} $CDIR .distr if test ! -r $DESTDIR/$CDIR/.distr diff --git a/distr/mk_distr_syms b/distr/mk_distr_syms index 2075f7597..8263c1181 100755 --- a/distr/mk_distr_syms +++ b/distr/mk_distr_syms @@ -1,3 +1,4 @@ +#!/bin/sh : Utility to make a tree of symbolic links to source tree. : Mount the source tree read-only, use this script, and then try installation. case $# in diff --git a/distr/mka b/distr/mka index 21f738cb6..1581e662b 100755 --- a/distr/mka +++ b/distr/mka @@ -1,3 +1,5 @@ +#!/bin/sh + set -e for i in `tail +2 $DESTDIR/$1/LIST` do diff --git a/distr/mkf b/distr/mkf index 6ba970378..c7f572f91 100755 --- a/distr/mkf +++ b/distr/mkf @@ -1,3 +1,5 @@ +#!/bin/sh + if [ -f $DESTDIR/$1/$2 ] then : diff --git a/first/cp_dir b/first/cp_dir index 3bc1b28a7..a5c66906f 100755 --- a/first/cp_dir +++ b/first/cp_dir @@ -1,3 +1,5 @@ +#!/bin/sh + set -e trap "rm -f /tmp/xx$$" 0 1 2 3 15 case $2 in diff --git a/first/create_dir b/first/create_dir index e805fd6e7..4f60bfba0 100755 --- a/first/create_dir +++ b/first/create_dir @@ -1,3 +1,5 @@ +#!/bin/sh + if ( cd $1 ) 2>/dev/null then : diff --git a/first/first b/first/first index 0bd2d5c83..0d06efba0 100755 --- a/first/first +++ b/first/first @@ -1,4 +1,5 @@ #! /bin/sh + case $0 in */first) FDIR=`expr $0 : '\(.*\)/first'` diff --git a/first/get_answer b/first/get_answer index b610e24f6..672deccd2 100755 --- a/first/get_answer +++ b/first/get_answer @@ -1,3 +1,5 @@ +#!/bin/sh + if read ANS then echo else echo "Sorry, got EOF when reading your answer" diff --git a/first/get_makepars b/first/get_makepars index 36da886cd..cadbf31c9 100755 --- a/first/get_makepars +++ b/first/get_makepars @@ -1,3 +1,5 @@ +#!/bin/sh + know_target=0 case $SYSNAME in vax*|i386|sun*|sparc*|m68_sysV_0|m68020|mantra|pmds4|m68k4) diff --git a/first/get_sys b/first/get_sys index 0ff18596a..c2358e4d2 100755 --- a/first/get_sys +++ b/first/get_sys @@ -1,3 +1,5 @@ +#!/bin/sh + rm -f em_path.h echo "You will now be asked for the root directory of the ACK sources. This directory will not be changed by the installation process. diff --git a/first/get_sysvax b/first/get_sysvax index eee8f1271..ed92a123c 100755 --- a/first/get_sysvax +++ b/first/get_sysvax @@ -1,3 +1,5 @@ +#!/bin/sh + while : do echo $E_FLAG "Which system-call library do you want to install for the VAX? diff --git a/first/install_tail b/first/install_tail index 5e644ce8a..bcd6d3957 100644 --- a/first/install_tail +++ b/first/install_tail @@ -1,3 +1,5 @@ +#!/bin/sh + set -e PATH=::$CONFIG/bin:$UTIL_HOME/bin:/usr/ccs/bin:/usr/ucb:$PATH @@ -6,8 +8,15 @@ export PATH $SRC_HOME/first/create_dir $CONFIG $SRC_HOME/first/create_dir $CONFIG/bin -echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH" > $CONFIG/bin/TakeAction -cat $SRC_HOME/TakeAction >> $CONFIG/bin/TakeAction +( + # Slight complication here to ensure that the #! magic at the + # beginning of TakeAction is preserved correctly. + + head -1 $SRC_HOME/TakeAction + echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH" + tail +2 $SRC_HOME/TakeAction +) > $CONFIG/bin/TakeAction + sed '/^#PARAMS/r make_macros' < $SRC_HOME/first/mk_makefile > $CONFIG/bin/mk_makefile cp $SRC_HOME/first/create_dir $CONFIG/bin/create_dir cp $SRC_HOME/first/cp_dir $CONFIG/bin/cp_dir diff --git a/first/limit_enquire b/first/limit_enquire index 8d9173d0b..e93e19db3 100644 --- a/first/limit_enquire +++ b/first/limit_enquire @@ -1,3 +1,5 @@ +#!/bin/sh + while : do echo "The libraries will end up in the machine-independent part of the diff --git a/first/limit_impl b/first/limit_impl index 2314ab7a0..284f2c15e 100755 --- a/first/limit_impl +++ b/first/limit_impl @@ -1,3 +1,5 @@ +#!/bin/sh + for i in $DISABLE_LANG do ed -s $CONFIG/Action < $CONFIG/bin/ack_sys +echo "#!/bin/sh" > $CONFIG/bin/ack_sys +echo "echo $SYSNAME" >> $CONFIG/bin/ack_sys chmod +x $CONFIG/bin/ack_sys cd $SRC_HOME diff --git a/first/mk_makefile b/first/mk_makefile index 97435474b..ae0946bf1 100755 --- a/first/mk_makefile +++ b/first/mk_makefile @@ -1,3 +1,4 @@ +#!/bin/sh : '$Id$' : This shell script inserts make macros after a line diff --git a/first/mk_target b/first/mk_target index 1bc50252c..8ab62a4b6 100755 --- a/first/mk_target +++ b/first/mk_target @@ -1,3 +1,5 @@ +#!/bin/sh + set -e : machine-dependant stuff diff --git a/first/target_comp b/first/target_comp index bd95b42a0..db980dcfc 100644 --- a/first/target_comp +++ b/first/target_comp @@ -1,3 +1,4 @@ +#!/bin/sh # compiler set for target machine CC=cc# # compiler to be used for compiling ACK diff --git a/first/util_comp b/first/util_comp index 377d04664..8f046f627 100644 --- a/first/util_comp +++ b/first/util_comp @@ -1,4 +1,4 @@ - +#!/bin/sh # compiler set for producing runnable binaries (possibly using $(UTIL_HOME)). # This must describe the compiler with which $(UTIL_HOME) has been compiled. # If $(TARGET_HOME) is identical to $(UTIL_HOME), which usually will be diff --git a/lang/basic/src/maketokentab b/lang/basic/src/maketokentab index bfdbc70b2..3c8b76f45 100755 --- a/lang/basic/src/maketokentab +++ b/lang/basic/src/maketokentab @@ -1,3 +1,5 @@ +#!/bin/sh + ed -s Lpars.h <<'+' 1d 1,$s/# *define // diff --git a/lang/cem/cemcom.ansi/make.allocd b/lang/cem/cemcom.ansi/make.allocd index 2289a4d51..9f98e79f9 100755 --- a/lang/cem/cemcom.ansi/make.allocd +++ b/lang/cem/cemcom.ansi/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/lang/cem/cemcom.ansi/make.hfiles b/lang/cem/cemcom.ansi/make.hfiles index f53fdca18..53cbdc1dd 100755 --- a/lang/cem/cemcom.ansi/make.hfiles +++ b/lang/cem/cemcom.ansi/make.hfiles @@ -1,3 +1,4 @@ +#!/bin/sh : Update Files from database PATH=/bin:/usr/bin diff --git a/lang/cem/cemcom/make.allocd b/lang/cem/cemcom/make.allocd index 08492fad1..a6240a213 100755 --- a/lang/cem/cemcom/make.allocd +++ b/lang/cem/cemcom/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/lang/cem/cemcom/make.hfiles b/lang/cem/cemcom/make.hfiles index f53fdca18..53cbdc1dd 100755 --- a/lang/cem/cemcom/make.hfiles +++ b/lang/cem/cemcom/make.hfiles @@ -1,3 +1,4 @@ +#!/bin/sh : Update Files from database PATH=/bin:/usr/bin diff --git a/lang/cem/cpp.ansi/make.allocd b/lang/cem/cpp.ansi/make.allocd index 08492fad1..a6240a213 100755 --- a/lang/cem/cpp.ansi/make.allocd +++ b/lang/cem/cpp.ansi/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/lang/cem/cpp.ansi/make.hfiles b/lang/cem/cpp.ansi/make.hfiles index f53fdca18..53cbdc1dd 100755 --- a/lang/cem/cpp.ansi/make.hfiles +++ b/lang/cem/cpp.ansi/make.hfiles @@ -1,3 +1,4 @@ +#!/bin/sh : Update Files from database PATH=/bin:/usr/bin diff --git a/lang/m2/comp/make.allocd b/lang/m2/comp/make.allocd index c4dd3e17c..e3077691d 100755 --- a/lang/m2/comp/make.allocd +++ b/lang/m2/comp/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/lang/m2/comp/make.hfiles b/lang/m2/comp/make.hfiles index f53fdca18..53cbdc1dd 100755 --- a/lang/m2/comp/make.hfiles +++ b/lang/m2/comp/make.hfiles @@ -1,3 +1,4 @@ +#!/bin/sh : Update Files from database PATH=/bin:/usr/bin diff --git a/lang/pc/comp/make.allocd b/lang/pc/comp/make.allocd index c4dd3e17c..e3077691d 100755 --- a/lang/pc/comp/make.allocd +++ b/lang/pc/comp/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/lang/pc/comp/make.hfiles b/lang/pc/comp/make.hfiles index f53fdca18..53cbdc1dd 100755 --- a/lang/pc/comp/make.hfiles +++ b/lang/pc/comp/make.hfiles @@ -1,3 +1,4 @@ +#!/bin/sh : Update Files from database PATH=/bin:/usr/bin