home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 2.9 KB | 104 lines | [TEXT/EDIT] |
- # !/bin/csh
- # Boostrapping script.
- #
- # Usage : bootstrap [args_for_compile]
- #
- # For example to try a bootstrap on a small machine using gcc :
- #
- # bootstrap -gcc -boost
- #
- # For example to try a bootstrap on a big machine using cc :
- #
- # bootstrap -cc -check_all
- #
- ###################################################################
- #set verbose=1
- cd ${SmallEiffel}/bin
- /bin/rm -f compile_to_c[1-3]
- echo "Compile compile command"
- set cmd="./compile -o compile.new $* COMPILE make"
- echo $cmd
- $cmd
- if (!(-f compile.new)) then
- echo "Cannot Compile compile"
- exit 1
- else
- mv -f compile.new compile
- endif
- ###################################################################
- echo "Try to compute compile_to_c1 with compile"
- set cmd="compile -c_code -o compile_to_c1 $* COMPILE_TO_C make"
- echo $cmd
- $cmd
- if (!(-f compile_to_c1)) then
- echo "Bad bootstrap (cannot produce compile_to_c1)."
- exit 1
- endif
- ###################################################################
- echo "Try to compute compile_to_c2 with compile_to_c1"
- /bin/rm -f compile_to_c.make
- set cmd="compile_to_c1 -o compile_to_c2 $* COMPILE_TO_C make"
- echo $cmd
- $cmd
- if (!(-f compile_to_c.make)) then
- echo "Bad bootstrap (cannot produce compile_to_c.make)."
- exit 1
- endif
- set verbose=1
- source compile_to_c.make
- unset verbose
- if (!(-f compile_to_c2)) then
- echo "Bad bootstrap (cannot produce compile_to_c2)."
- exit 1
- endif
- ###################################################################
- echo "Try to compute compile_to_c3 with compile_to_c2"
- /bin/rm -f compile_to_c.make
- set cmd="compile_to_c2 -o compile_to_c3 $* COMPILE_TO_C make"
- echo $cmd
- $cmd
- if (!(-f compile_to_c.make)) then
- echo "Bad bootstrap (cannot produce compile_to_c.make)."
- exit 1
- endif
- set verbose=1
- source compile_to_c.make
- unset verbose
- if (!(-f compile_to_c3)) then
- echo "Bad bootstrap (cannot produce compile_to_c3)."
- exit 1
- endif
- ###################################################################
- bdiff compile_to_c2 compile_to_c3 > /dev/null
- if ($status) then
- echo "Bootstrap not correct (compile_to_c2/compile_to_c3)."
- exit 1
- endif
- echo "Bootstrap correct."
- echo "compile_to_c2 seems to be a good one."
- #######################################
- echo "Basic test of the new version."
- mv -f compile_to_c compile_to_c.old
- mv -f compile_to_c2 compile_to_c
- echo "Compute misc/self_test in file 'self_test.out'."
- ${SmallEiffel}/misc/self_test >! self_test.out
- diff self_test.out ${SmallEiffel}/misc/self_test.good_output
- if ($status) then
- mv -f compile_to_c.old compile_to_c
- echo "Bad self_test."
- exit 1
- endif
- /bin/rm -f compile_to_c.old
- echo "Good Self Test."
- echo "Install New Version."
- cd ${SmallEiffel}/bin_c
- /bin/rm -f ${SmallEiffel}/bin_c/*
- cp ../bin/loadpath.se .
- foreach cmd (compile compile_to_c eval finder pretty)
- ../bin/compile_to_c -o $cmd $cmd make -boost -O2
- /bin/rm -f ${SmallEiffel}/bin/${cmd}.make
- /bin/rm -f ${SmallEiffel}/bin/${cmd}.[hco]
- end
- /bin/rm -f loadpath.se
- echo "New Version Installed."
-