| 7 | 
  | 
        echo "Usage: makeall install [clean] [make options]" | 
| 8 | 
  | 
        echo "   or: makeall clean" | 
| 9 | 
  | 
        echo "   or: makeall library" | 
| 10 | 
+ | 
        echo "   or: makeall test" | 
| 11 | 
  | 
        exit 1 | 
| 12 | 
  | 
endif | 
| 13 | 
  | 
if ( "$1" == library ) then | 
| 14 | 
  | 
        source installib | 
| 15 | 
< | 
        cp -f src/*/*.{cal,tab,hex} $ldir | 
| 15 | 
> | 
        cp -f src/*/*.{cal,tab,hex,dat} $ldir | 
| 16 | 
  | 
        echo "" | 
| 17 | 
  | 
        echo "Set the environment variable RAYPATH=.:$ldir" | 
| 18 | 
  | 
        echo 'For C-shell users, put the following into ~/.cshrc' | 
| 23 | 
  | 
        echo "" | 
| 24 | 
  | 
        exit 0 | 
| 25 | 
  | 
endif | 
| 26 | 
+ | 
if ( "$1" == test ) then | 
| 27 | 
+ | 
        cd test | 
| 28 | 
+ | 
        set fails=() | 
| 29 | 
+ | 
        foreach d (cv cal gen util px renders) | 
| 30 | 
+ | 
                cd $d | 
| 31 | 
+ | 
                make -k clean all && make clean | 
| 32 | 
+ | 
                if ($status) set fails=($fails $d) | 
| 33 | 
+ | 
                cd .. | 
| 34 | 
+ | 
        end | 
| 35 | 
+ | 
        if ($#fails) then | 
| 36 | 
+ | 
                echo "Unit tests failed in $#fails directories" | 
| 37 | 
+ | 
                echo "Run 'make' manually in test/ subfolders: $fails" | 
| 38 | 
+ | 
                exit 1 | 
| 39 | 
+ | 
        endif | 
| 40 | 
+ | 
        echo "All tests passed successfully." | 
| 41 | 
+ | 
        exit 0 | 
| 42 | 
+ | 
endif | 
| 43 | 
  | 
set srcdirs=( common rt meta cv gen ot px hd util cal ) | 
| 44 | 
  | 
if ( "$1" == install ) then | 
| 45 | 
  | 
        cat << _EOF_ | 
| 83 | 
  | 
                goto again1 | 
| 84 | 
  | 
        endif | 
| 85 | 
  | 
endif | 
| 68 | 
– | 
if ( ! -d $idir/dev ) then | 
| 69 | 
– | 
        mkdir $idir/dev | 
| 70 | 
– | 
        if ( $status ) then | 
| 71 | 
– | 
                echo "Cannot create subdirectory, please reenter" | 
| 72 | 
– | 
                goto again1 | 
| 73 | 
– | 
        endif | 
| 74 | 
– | 
endif | 
| 86 | 
  | 
set inpath=0 | 
| 87 | 
  | 
foreach i ( $path ) | 
| 88 | 
  | 
        if ( "$i" == "$idir" ) then | 
| 95 | 
  | 
        goto gotrmake | 
| 96 | 
  | 
endif | 
| 97 | 
  | 
set newrmake | 
| 98 | 
< | 
more src/common/copyright.h | 
| 98 | 
> | 
more License.txt | 
| 99 | 
  | 
echo -n "Do you understand and accept the terms of this agreement [n]? " | 
| 100 | 
  | 
set ans="$<" | 
| 101 | 
  | 
if ( "$ans" !~ [yY]* ) exit | 
| 110 | 
  | 
 | 
| 111 | 
  | 
Please select your system type from the following list: | 
| 112 | 
  | 
 | 
| 113 | 
< | 
        1)      Sun Solaris | 
| 114 | 
< | 
        2)      Linux | 
| 115 | 
< | 
        3)      MacOS X | 
| 116 | 
< | 
        4)      FreeBSD | 
| 117 | 
< | 
        5)      Cygwin | 
| 107 | 
< | 
        6)      Other | 
| 113 | 
> | 
        1)      Linux | 
| 114 | 
> | 
        2)      MacOS X | 
| 115 | 
> | 
        3)      FreeBSD | 
| 116 | 
> | 
        4)      Cygwin | 
| 117 | 
> | 
        5)      Other | 
| 118 | 
  | 
 | 
| 119 | 
  | 
_EOF_ | 
| 120 | 
  | 
echo -n "Choice? " | 
| 121 | 
  | 
set arch="$<" | 
| 122 | 
  | 
switch ("$arch") | 
| 123 | 
< | 
case 1:                 # SPARC Station | 
| 114 | 
< | 
        set arch=sun | 
| 115 | 
< | 
        set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO" | 
| 116 | 
< | 
        set opt="-O" | 
| 117 | 
< | 
        set compat="strcmp.o timegm.o" | 
| 118 | 
< | 
        breaksw | 
| 119 | 
< | 
case 2:                 # Linux | 
| 123 | 
> | 
case 1:                 # Linux | 
| 124 | 
  | 
        set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO" | 
| 125 | 
  | 
        set opt="-O2" | 
| 126 | 
  | 
        set arch=IBMPC | 
| 127 | 
< | 
        set compat="erf.o" | 
| 127 | 
> | 
        set compat="strnstr.o strlcpy.o" | 
| 128 | 
  | 
        set extras=CC=gcc | 
| 129 | 
  | 
        breaksw | 
| 130 | 
< | 
case 3:                 # MacOS X | 
| 130 | 
> | 
case 2:                 # MacOS X | 
| 131 | 
  | 
        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" | 
| 132 | 
  | 
        set opt="-O2" | 
| 133 | 
  | 
        set arch=Intel | 
| 134 | 
  | 
        set extras="CC=cc CONFIGURE_ARCH=i386" | 
| 135 | 
  | 
        set special="ogl" | 
| 136 | 
  | 
        breaksw | 
| 137 | 
< | 
case 4:                 # FreeBSD | 
| 137 | 
> | 
case 3:                 # FreeBSD | 
| 138 | 
  | 
        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" | 
| 139 | 
  | 
        set opt="-O" | 
| 140 | 
  | 
        set compat="erf.o" | 
| 141 | 
  | 
        set extras='CC=cc MLIB="-lcompat -lm"' | 
| 142 | 
  | 
        set arch=IBMPC | 
| 143 | 
  | 
        breaksw | 
| 144 | 
< | 
case 5:                 # Cygwin | 
| 144 | 
> | 
case 4:                 # Cygwin | 
| 145 | 
  | 
        set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO" | 
| 146 | 
  | 
        set opt="-O2" | 
| 147 | 
  | 
        set arch=IBMPC | 
| 148 | 
< | 
        set compat="erf.o" | 
| 148 | 
> | 
        set compat="erf.o strnstr.o strlcpy.o" | 
| 149 | 
  | 
        set extras="CC=gcc" | 
| 150 | 
  | 
        set special="ogl" | 
| 151 | 
  | 
        set esuffix=".exe" | 
| 152 | 
  | 
        breaksw | 
| 153 | 
< | 
case 6:                 # Other | 
| 153 | 
> | 
case 5:                 # Other | 
| 154 | 
  | 
        set opt="-O" | 
| 155 | 
< | 
        set compat="erf.o strcmp.o" | 
| 155 | 
> | 
        set compat="erf.o strcmp.o strnstr.o strlcpy.o" | 
| 156 | 
  | 
        echo -n "Are you using the GNU C compiler [n]? " | 
| 157 | 
  | 
        if ( "$<" =~ [yY]* ) then | 
| 158 | 
  | 
                set extras="CC=gcc" |