--- ray/makeall 2003/07/12 08:38:44 1.7 +++ ray/makeall 2003/11/25 18:23:11 1.10 @@ -1,9 +1,6 @@ #!/bin/csh -f -# RCSid $Id: makeall,v 1.7 2003/07/12 08:38:44 schorsch Exp $ +# RCSid $Id: makeall,v 1.10 2003/11/25 18:23:11 greg Exp $ # -#Added macosX 2001-04-11 by Jean Brange -#Deleted obsolete systems 2001-04-18 by Greg Ward -# # Make all the Radiance programs # if ( $#argv < 1 ) then @@ -14,6 +11,7 @@ if ( $#argv < 1 ) then endif if ( "$1" == library ) then source installib + cp -f src/*/*.{cal,tab,hex} $ldir echo "" echo "Set the environment variable RAYPATH=.:$ldir" echo 'For C-shell users, put the following into ~/.cshrc' @@ -74,6 +72,13 @@ if ( ! -d $idir/dev ) then goto again1 endif endif +set inpath=0 +foreach i ( $path ) + if ( "$i" == "$idir" ) then + set inpath=1 + break + endif +end set rmake=$idir/rmake if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then goto gotrmake @@ -123,6 +128,7 @@ set opt= set mach= set compat= set extras= +set esuffix= cat << _EOF_ Please select your system type from the following list: @@ -133,9 +139,10 @@ Please select your system type from the following list 4) AIX (RS/6000) 5) BSDI BSD/386 6) Linux - 7) MacOS X + 7) MacOS X 8) FreeBSD - 9) Other + 9) Cygwin + 10) Other _EOF_ echo -n "Choice? " @@ -196,22 +203,31 @@ case 6: # Linux set compat="bmalloc.o erf.o getpagesize.o" set extras=CC=gcc breaksw -case 7: # MacOS X - set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" - set opt="-O2 -DSPEED=200" - set arch=PowerPC - set compat="bmalloc.o" - set extras="CC=cc CONFIGURE_ARCH=powerpc" +case 7: # MacOS X + set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" + set opt="-O2 -DSPEED=200" + set arch=PowerPC + set compat="bmalloc.o" + set extras="CC=cc CONFIGURE_ARCH=powerpc" set special="ogl" - breaksw + breaksw case 8: # FreeBSD - set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" - set opt="-O -DSPEED=200" - set compat="bmalloc.o erf.o" - set extras="CC=cc" + set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" + set opt="-O -DSPEED=200" + set compat="bmalloc.o erf.o" + set extras="CC=cc" set arch=IBMPC - breaksw -case 9: # Other + breaksw +case 9: # Cygwin + set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO" + set opt="-O2 -DSPEED=200" + set arch=IBMPC + set compat="bmalloc.o erf.o getpagesize.o" + set extras="CC=gcc" + set special="ogl" + set esuffix=".exe" + breaksw +case 10: # Other set opt="-O" set compat="bmalloc.o erf.o strcmp.o" echo -n "Are you using the GNU C compiler [n]? " @@ -235,6 +251,7 @@ exec make "SPECIAL=$special" \ ARCH=$arch "COMPAT=$compat" \ INSTDIR=$idir \ LIBDIR=$ldir \ + ESUFFIX=$esuffix \ $extras "\$@" -f Rmakefile _EOF_ chmod 755 $rmake @@ -273,12 +290,20 @@ else echo "Done." endif cd .. +if (! $inpath ) then + echo "" + echo "Add $idir to the beginning of your execution path:" + echo 'For C-shell users, put the following into ~/.cshrc' + echo " set path=( $idir "'$path )' + echo 'For Bourne shell users, put the following into $HOME/profile' + echo " PATH=$idir"':$PATH' + echo " export PATH" +endif if (! -d /usr/tmp) then ln -s /tmp /usr/tmp if ($status) then echo "" echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'" - echo "" endif endif else @@ -289,13 +314,13 @@ foreach i ( $srcdirs ) make -f Rmakefile $* popd end -echo "Done." cd .. -endif foreach i ( $* ) if ( "$i" == clean ) then echo "Removing library archives..." rm -f src/lib/*.[ao] endif end +echo "Done." +endif exit 0