When all this is correct, use the shell script mktree the extract
the distribution from the EM tree.
- sh mktree destination_tree repository_tree > destination_tree/Versions 2>f.attf
+ sh mktree destination_tree repository_tree <distrname> 2>f.attf
+Use the "cvs rtag" command to give the distribution a name first!
Make sure that the destination tree exists and is empty!
Failing to do that will almost certainly result in a welter of
error messages.
: ${CDIR=.}
-if [ $# = 1 ]
-then
- ${DD-:} $CDIR $1
-else
- ${DD-:} $CDIR
-fi
${DF-:} $CDIR .distr
if test ! -r $DESTDIR/$CDIR/.distr
then
-case $1 in
-.) ;;
-*) if [ -d $DESTDIR/$1 ]
- then :
- else mkdir $DESTDIR/$1
- fi
- ;;
-esac
-p=$REPDIR/$1
-dir=$1
-if [ $# = 2 ]
-then
- if [ -f $2 ]
- then
- set `fgrep "$dir " $2`
- fi
-fi
-cd $DESTDIR/$dir
-if [ $# = 2 ]
-then
- RV $p $2 > /dev/null 2>&1
- echo "$dir $2"
-else
- if `CV $p > /dev/null 2>&1`
- then
- echo "$dir `RC -i`"
- else
- echo "-- $dir CV failed for some reason" 1>&2
- fi
-fi
/*) REPDIR=$2 ;;
*) REPDIR=`pwd`/$2 ;;
esac
+# DD=$DDIR/mkd
+# export DD
+mkdir -p $DESTDIR
+CVSROOT=/usr/proj/em/Repositories
+export CVSROOT
+cd $DESTDIR
+case $# in
+3)
+ cvs checkout world -r $3
+ ;;
+2)
+ cvs checkout world
+ ;;
+esac
cd $REPDIR
-DD=$DDIR/mkd
DF=$DDIR/mkf
DA=$DDIR/mka
-export DDIR DESTDIR DD DF DA REPDIR
-$DDIR/dwalk $3
+export DDIR DESTDIR DF DA REPDIR
+
+$DDIR/dwalk
cd $DESTDIR
find . -type d -print | xargs chmod "uog+rx"
-Version.c
proto.make
proto.main
LLlex.c
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK ANSI C compiler Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
GFILES= $(GEN_G) $(SRC_G)
SRC_C = \
- $(SRC_DIR)/Version.c \
$(SRC_DIR)/LLlex.c \
$(SRC_DIR)/LLmessage.c \
$(SRC_DIR)/arith.c \
-Version.c
proto.make
proto.main
LLlex.c
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK C compiler Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
GFILES= $(GEN_G) $(SRC_G)
SRC_C = \
- $(SRC_DIR)/Version.c \
$(SRC_DIR)/LLlex.c \
$(SRC_DIR)/LLmessage.c \
$(SRC_DIR)/arith.c \
BigPars
SmallPars
SYSTEM.h
-Version.c
casestat.C
char.tab
chk_expr.c
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK Modula-2 compiler Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
$(SRC_DIR)/typequiv.c $(SRC_DIR)/node.c $(SRC_DIR)/cstoper.c \
$(SRC_DIR)/chk_expr.c $(SRC_DIR)/options.c $(SRC_DIR)/walk.c \
$(SRC_DIR)/desig.c $(SRC_DIR)/code.c $(SRC_DIR)/lookup.c \
- $(SRC_DIR)/Version.c $(SRC_DIR)/stab.c
+ $(SRC_DIR)/stab.c
GEN_C = tokenfile.c program.c declar.c expression.c statement.c \
symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c next.c
CFILES= $(SRC_C) $(GEN_C)
statement.g
tokenname.c
tokenname.h
-Version.c
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK Modula-2 Makefile generator Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
SRC_C = $(SRC_DIR)/LLlex.c $(SRC_DIR)/LLmessage.c $(SRC_DIR)/error.c \
$(SRC_DIR)/main.c $(SRC_DIR)/lib.c $(SRC_DIR)/tokenname.c \
$(SRC_DIR)/idf.c $(SRC_DIR)/input.c $(SRC_DIR)/misc.c \
- $(SRC_DIR)/options.c $(SRC_DIR)/Version.c
+ $(SRC_DIR)/options.c
GEN_C = tokenfile.c program.c declar.c expression.c statement.c \
symbol2str.c char.c Lpars.c
CFILES= $(SRC_C) $(GEN_C)
proto.make
proto.main
Parameters
-Version.c
body.c
casestat.C
char.tab
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK Pascal compiler Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
skip.c
tokenname.c
cpp.6
-Version.c
+++ /dev/null
-distr:
- echo '#ifndef lint' > Version.c
- echo 'char Version[] = "ACK C preprocessor Version XXX";' | \
- sed "s/XXX/`RC -i`/" >> Version.c
- echo '#endif' >> Version.c
CSRC = $(SRC_DIR)/LLlex.c $(SRC_DIR)/LLmessage.c $(SRC_DIR)/ch7bin.c \
$(SRC_DIR)/ch7mon.c $(SRC_DIR)/domacro.c $(SRC_DIR)/error.c \
$(SRC_DIR)/idf.c $(SRC_DIR)/init.c $(SRC_DIR)/input.c \
- $(SRC_DIR)/main.c $(SRC_DIR)/options.c $(SRC_DIR)/Version.c \
+ $(SRC_DIR)/main.c $(SRC_DIR)/options.c \
$(SRC_DIR)/preprocess.c $(SRC_DIR)/replace.c $(SRC_DIR)/scan.c \
$(SRC_DIR)/skip.c $(SRC_DIR)/tokenname.c $(SRC_DIR)/next.c \
$(SRC_DIR)/expr.c
COBJ = LLlex.$(SUF) LLmessage.$(SUF) ch7bin.$(SUF) ch7mon.$(SUF) \
domacro.$(SUF) error.$(SUF) idf.$(SUF) init.$(SUF) input.$(SUF) \
- main.$(SUF) options.$(SUF) Version.$(SUF) \
+ main.$(SUF) options.$(SUF) \
preprocess.$(SUF) replace.$(SUF) scan.$(SUF) skip.$(SUF) \
tokenname.$(SUF) next.$(SUF) expr.$(SUF)
options.$(SUF): $(SRC_DIR)/class.h
options.$(SUF): ./idfsize.h
options.$(SUF): $(TARGET_HOME)/modules/h/alloc.h
-Version.$(SUF): $(SRC_DIR)/Version.c
- $(CC) -c $(CFLAGS) $(SRC_DIR)/Version.c
preprocess.$(SUF): $(SRC_DIR)/preprocess.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/preprocess.c
preprocess.$(SUF): ./line_prefix.h