# ############################################ # Builds the Test folder (Pascal compiler generated from pascal.atg). # Requires GNU Modula-2 (gm2) and the CR binary. ############################################ echo "Building Pascal compiler (Test folder) with GNU Modula-2" cd "$(dirname "$0")/Test" || exit 1 # echo "Regenerating PascalS / PascalP / Pascal from pascal.atg" CRFRAMES="$(pwd)" ../CR -m -C pascal.atg # echo "Deleting all o files" rm -f ./*.o # echo "compiling the needed modules" gm2 -fiso -c FileIO.mod gm2 -fiso -c PascalS.mod gm2 -fiso -c PascalP.mod gm2 -fiso -c Pascal.mod echo "++++++++Modules compiled ++++++++++++++++++++++" # echo "Phase 1: generating the module list" gm2 -fiso -fgen-module-list=modules.lst -o /dev/null \ PascalS.o PascalP.o FileIO.o Pascal.mod # echo "Phase 2: compiling main module and linking using the module list" gm2 -fiso -fuse-list=modules.lst -o Pascal \ PascalS.o PascalP.o FileIO.o Pascal.mod echo "++++++++Pascal compiler built++++++++++++++++++++++"