Renamed bcheck to botcheck to avoid conflict with the "batch interface to

the Runtime Checking (RTC) feature of dbx(1)".

Mmake:
	modifications to visit the new subdirectory util.

Mmake.common:
	modification to reflect the new name of the system module io_rt.
This commit is contained in:
Zoltan Somogyi
1995-05-06 07:25:09 +00:00
parent e1d505e3e6
commit 630b56da1f
3 changed files with 227 additions and 5 deletions

17
Mmake
View File

@@ -12,9 +12,9 @@ include Mmake.common
#-----------------------------------------------------------------------------#
SUBDIRS = scripts runtime boehm_gc library compiler doc
SUBDIRS = scripts util runtime boehm_gc library compiler doc
SUBDIR_MMAKE = PATH=../scripts:$$PATH \
SUBDIR_MMAKE = PATH=../scripts:../util:$$PATH \
MMAKE_VPATH=. \
MMAKE_VARS=../scripts/Mmake.vars \
MMAKE_RULES=../scripts/Mmake.rules \
@@ -77,13 +77,17 @@ library: dep_library scripts
cd library && $(SUBDIR_MMAKE)
.PHONY: compiler
compiler: dep_compiler scripts runtime boehm_gc library
compiler: dep_compiler scripts util runtime boehm_gc library
cd compiler && $(SUBDIR_MMAKE)
.PHONY: doc
doc: scripts
cd doc && $(SUBDIR_MMAKE)
.PHONY: util
util: scripts
cd util && $(SUBDIR_MMAKE)
#-----------------------------------------------------------------------------#
# Generally you should do a `mmake realclean' before doing `mmake tar'.
@@ -96,6 +100,7 @@ tar:
cd compiler && $(SUBDIR_MMAKE) depend
cd compiler && $(SUBDIR_MMAKE) ints cs
cd scripts && mmake -s realclean
cd util && mmake realclean
cd .. && (tar -cf - mercury | gzip > mercury.tar.gz)
#-----------------------------------------------------------------------------#
@@ -165,7 +170,7 @@ stage_4:
#-----------------------------------------------------------------------------#
.PHONY: install
install: all install_scripts install_runtime install_boehm_gc \
install: all install_scripts install_util install_runtime install_boehm_gc \
install_library install_compiler install_doc \
install_runtime_grades install_library_grades
@@ -173,6 +178,10 @@ install: all install_scripts install_runtime install_boehm_gc \
install_scripts: scripts
cd scripts && $(SUBDIR_MMAKE) install
.PHONY: install_util
install_util: util
cd util && $(SUBDIR_MMAKE) install
.PHONY: install_runtime
install_runtime: runtime
cd runtime && $(SUBDIR_MMAKE) install

View File

@@ -88,7 +88,7 @@ BOEHM_GC_DIR = $(MERCURY_DIR)/boehm_gc
SYS_MODS = \
$(RUNTIME_DIR)/engine.mod \
$(RUNTIME_DIR)/io.mod \
$(RUNTIME_DIR)/io_rt.mod \
$(RUNTIME_DIR)/wrapper.mod \
$(RUNTIME_DIR)/call.mod \
$(RUNTIME_DIR)/solutions.mod

213
tools/bootcheck Executable file
View File

@@ -0,0 +1,213 @@
#!/bin/sh
set -x
usage="bcheck [-jN] [-o filename]"
jfactor=""
mmake_opts="-k"
outfile=""
while getopts j:m:o: flag
do
case $flag in
j) jfactor="-j$OPTARG" ;;
m) mmake_opts="$mmake_opts $OPTARG" ;;
o) outfile=$OPTARG ;;
\\?) echo $usage;
exit 1 ;;
esac
done
shift `expr "$OPTIND" - 1`
if [ $# -ne 0 ]
then
echo $usage
exit 1
fi
if mmake $mmake_opts $jfactor all
then
echo "building of stage 1 successful"
else
echo "building of stage 1 not successful"
exit 1
fi
root=`/bin/pwd`
# .pp files are not necessary
[ -d stage2 ] || mkdir stage2
/bin/rm -fr stage2/*
mkdir stage2/compiler
mkdir stage2/library
cp compiler/*.m stage2/compiler
cp compiler/Mmake* stage2/compiler
cp library/*.m stage2/library
cp library/Mmake* stage2/library
ln -s $root/boehm_gc stage2/boehm_gc
ln -s $root/doc stage2/doc
ln -s $root/runtime stage2/runtime
ln -s $root/scripts stage2/scripts
ln -s $root/util stage2/util
cp Mmake* stage2
MERCURY_COMPILER=$root/compiler/mercury_compile
export MERCURY_COMPILER
MERCURY_INT_DIR=$root/stage2/library
export MERCURY_INT_DIR
if (cd stage2 ; mmake $mmake_opts depend)
then
echo "building of stage 2 dependencies successful"
else
echo "building of stage 2 dependencies not successful"
exit 1
fi
MMAKE_VPATH=.
export MMAKE_VPATH
MMAKE_VARS=../scripts/Mmake.vars
export MMAKE_VARS
MMAKE_RULES=../scripts/Mmake.rules
export MMAKE_RULES
if (cd stage2/library ; mmake $mmake_opts $jfactor ints)
then
echo "building of stage 2 library ints successful"
else
echo "building of stage 2 library ints not successful"
exit 1
fi
if (cd stage2/library ; mmake $mmake_opts $jfactor libmercury)
then
echo "building of stage 2 library successful"
else
echo "building of stage 2 library not successful"
exit 1
fi
if (cd stage2/compiler ; mmake $mmake_opts $jfactor ints)
then
echo "building of stage 2 compiler ints successful"
else
echo "building of stage 2 compiler ints not successful"
exit 1
fi
if (cd stage2/compiler ; mmake $mmake_opts $jfactor mercury_compile)
then
echo "building of stage 2 compiler successful"
else
echo "building of stage 2 compiler not successful"
exit 1
fi
unset MMAKE_VPATH
unset MMAKE_VARS
unset MMAKE_RULES
if (cd stage2 ; mmake $mmake_opts $jfactor all)
then
echo "building of stage 2 successful"
else
echo "building of stage 2 not successful"
exit 1
fi
# .pp files are not necessary
[ -d stage3 ] || mkdir stage3
/bin/rm -fr stage3/*
mkdir stage3/compiler
mkdir stage3/library
cp compiler/*.m stage3/compiler
cp compiler/Mmake* stage3/compiler
cp library/*.m stage3/library
cp library/Mmake* stage3/library
ln -s $root/boehm_gc stage3/boehm_gc
ln -s $root/doc stage3/doc
ln -s $root/runtime stage3/runtime
ln -s $root/scripts stage3/scripts
ln -s $root/util stage3/util
cp Mmake* stage3
MERCURY_COMPILER=$root/stage2/compiler/mercury_compile
export MERCURY_COMPILER
MERCURY_INT_DIR=$root/stage3/library
export MERCURY_INT_DIR
if (cd stage3 ; mmake $mmake_opts depend)
then
echo "building of stage 3 dependencies successful"
else
echo "building of stage 3 dependencies not successful"
exit 1
fi
MMAKE_VPATH=.
export MMAKE_VPATH
MMAKE_VARS=../scripts/Mmake.vars
export MMAKE_VARS
MMAKE_RULES=../scripts/Mmake.rules
export MMAKE_RULES
if (cd stage3/library ; mmake $mmake_opts $jfactor ints)
then
echo "building of stage 3 library ints successful"
else
echo "building of stage 3 library ints not successful"
exit 1
fi
if (cd stage3/library ; mmake $mmake_opts $jfactor libmercury)
then
echo "building of stage 3 library successful"
else
echo "building of stage 3 library not successful"
exit 1
fi
if (cd stage3/compiler ; mmake $mmake_opts $jfactor ints)
then
echo "building of stage 3 compiler ints successful"
else
echo "building of stage 3 compiler ints not successful"
exit 1
fi
if (cd stage3/compiler ; mmake $mmake_opts $jfactor mercury_compile)
then
echo "building of stage 3 compiler successful"
else
echo "building of stage 3 compiler not successful"
exit 1
fi
unset MMAKE_VPATH
unset MMAKE_VARS
unset MMAKE_RULES
if (cd stage3 ; mmake $mmake_opts $jfactor all)
then
echo "building of stage 3 successful"
else
echo "building of stage 3 not successful"
exit 1
fi
if [ -n "$outfile" ]
then
diff stage2/library stage3/library > "$outfile"
diff stage2/compiler stage3/compiler >> "$outfile"
else
diff stage2/library stage3/library
diff stage2/compiler stage3/compiler
fi
exit 0