home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-03 | 3.7 KB | 138 lines | [TEXT/ttxt] |
- #!/bin/tcsh -f
- # 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] compile_to_c.make
- echo "Compile compile command"
- set cmd="./compile -c_code -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"
- /bin/rm -f compile_to_c.make
- 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
- ###################################################################
- ./clean same_files >& /dev/null
- /bin/rm -f same_files
- ./compile same_files -boost -o same_files -O2 >& /dev/null
- if (!(-f same_files)) then
- echo "Cannot Compile same_files"
- exit 1
- endif
- set diff="./same_files"
- if (-f /usr/bin/bdiff) then
- set diff="/usr/bin/bdiff"
- endif
- set cmd="${diff} compile_to_c2 compile_to_c3"
- echo $cmd
- $cmd
- 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."
- ${SmallEiffel}/lib_msg/self_test
- echo "Install New Version."
- cd ${SmallEiffel}/bin_c
- /bin/rm -f ${SmallEiffel}/bin_c/*
- cp ../bin/loadpath.se .
- # Small commands :
- foreach cmd (compile finder clean)
- echo Compiling $cmd
- ../bin/compile_to_c -o $cmd $cmd make -boost -no_split -O2 >! /dev/null
- if (!(-f ${cmd}.make)) then
- echo Error when compiling ${cmd}
- exit 1
- endif
- end
- # Big commands :
- foreach cmd (compile_to_c eval pretty)
- echo Compiling $cmd
- ../bin/compile_to_c -o $cmd $cmd make -boost -no_split -O3 >! /dev/null
- if (!(-f ${cmd}.make)) then
- echo Error when compiling ${cmd}
- exit 1
- endif
- mv ${cmd}.make ${cmd}.big
- ../bin/compile_to_c -o $cmd $cmd make -boost -O2 >! /dev/null
- if (!(-f ${cmd}.make)) then
- echo Error when compiling ${cmd}
- exit 1
- endif
- end
- /bin/rm -f loadpath.se
- echo "New Version Installed."
-