ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/makeall
(Generate patch)

Comparing ray/makeall (file contents):
Revision 1.18 by greg, Tue Jul 26 15:33:13 2005 UTC vs.
Revision 1.30 by greg, Fri Sep 11 20:38:46 2020 UTC

# Line 7 | Line 7 | if ( $#argv < 1 ) then
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'
19          echo "  setenv RAYPATH .:$ldir"
20 <        echo 'For Bourne shell users, put the following into $HOME/profile'
20 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
21          echo "  RAYPATH=.:$ldir"
22          echo "  export RAYPATH"
23          echo ""
24          exit 0
25   endif
26 + if ( "$1" == test ) then
27 +        cd test
28 +        set fails=()
29 +        foreach d (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_
# Line 65 | Line 83 | if ( ! -d $idir ) then
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
# Line 84 | Line 95 | if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) 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
# Line 100 | Line 111 | cat << _EOF_
111   Please select your system type from the following list:
112  
113          1)      Sun Solaris
114 <        2)      HP workstation
115 <        3)      Silicon Graphics
116 <        4)      AIX (RS/6000)
117 <        5)      BSDI BSD/386
118 <        6)      Linux
108 <        7)      MacOS X
109 <        8)      FreeBSD
110 <        9)      Cygwin
111 <        10)     Other
114 >        2)      Linux
115 >        3)      MacOS X
116 >        4)      FreeBSD
117 >        5)      Cygwin
118 >        6)      Other
119  
120   _EOF_
121   echo -n "Choice? "
# Line 117 | Line 124 | switch ("$arch")
124   case 1:                 # SPARC Station
125          set arch=sun
126          set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
120        set opt="-O -DSPEED=80"
121        set compat="strcmp.o"
122        breaksw
123 case 2:                 # HP workstation
124        set mach=""
125        set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE"
126        set compat="strcmp.o"
127        set arch=hpux
128        breaksw
129 case 3:                 # Silicon Graphics
130        set arch=sgi
131        switch (`uname -r`)
132        case 3.*:
133                set mach="-noprototypes"
134                set opt="-O -DSPEED=80"
135                set special="sgi"
136                set compat="strcmp.o"
137                breaksw
138        case 4.*:
139                set mach=""
140                set opt="-O2 -DSPEED=100"
141                set compat="strcmp.o"
142                set extras='"MLIB=-lfastm -lm"'
143                breaksw
144        default:        # 5.x or later
145                ln -s `which wish` $idir/wish4.0
146                set path=($idir $path)
147                set mach="-w"
148                set opt="-O2 -DSPEED=200"
149                set special="ogl"
150                set compat="strcmp.o"
151                breaksw
152        endsw
153        breaksw
154 case 4:                 # AIX
127          set opt="-O"
128 <        set compat="erf.o strcmp.o"
157 <        set arch=PowerPC
128 >        set compat="strcmp.o timegm.o"
129          breaksw
130 < case 5:                 # BSDI BSD/386
160 <        set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include"
161 <        set opt="-O -DSPEED=100"
162 <        set arch=IBMPC
163 <        set compat="erf.o strcmp.o"
164 <        breaksw
165 < case 6:                 # Linux
130 > case 2:                 # Linux
131          set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
132 <        set opt="-O2 -DSPEED=200"
132 >        set opt="-O2"
133          set arch=IBMPC
134 <        set compat="erf.o"
134 >        set compat="strlcpy.o"
135          set extras=CC=gcc
136          breaksw
137 < case 7:                 # MacOS X
137 > case 3:                 # MacOS X
138          set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
139 <        set opt="-O2 -DSPEED=200"
140 <        set arch=PowerPC
141 <        set extras="CC=cc CONFIGURE_ARCH=powerpc"
139 >        set opt="-O2"
140 >        set arch=Intel
141 >        set extras="CC=cc CONFIGURE_ARCH=i386"
142          set special="ogl"
143          breaksw
144 < case 8:                 # FreeBSD
144 > case 4:                 # FreeBSD
145          set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
146 <        set opt="-O -DSPEED=200"
146 >        set opt="-O"
147          set compat="erf.o"
148          set extras='CC=cc MLIB="-lcompat -lm"'
149          set arch=IBMPC
150          breaksw
151 < case 9:                 # Cygwin
151 > case 5:                 # Cygwin
152          set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
153 <        set opt="-O2 -DSPEED=200"
153 >        set opt="-O2"
154          set arch=IBMPC
155 <        set compat="erf.o"
155 >        set compat="erf.o strlcpy.o"
156          set extras="CC=gcc"
157          set special="ogl"
158          set esuffix=".exe"
159          breaksw
160 < case 10:                        # Other
160 > case 6:                 # Other
161          set opt="-O"
162 <        set compat="erf.o strcmp.o"
162 >        set compat="erf.o strcmp.o strlcpy.o"
163          echo -n "Are you using the GNU C compiler [n]? "
164          if ( "$<" =~ [yY]* ) then
165                  set extras="CC=gcc"
166 +        else
167 +                set compat="$compat timegm.o"
168          endif
169          set arch=other
170          breaksw
# Line 260 | Line 227 | if (! $inpath ) then
227          echo "Add $idir to the beginning of your execution path:"
228          echo 'For C-shell users, put the following into ~/.cshrc'
229          echo "  set path=( $idir "'$path )'
230 <        echo 'For Bourne shell users, put the following into $HOME/profile'
230 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
231          echo "  PATH=$idir"':$PATH'
232          echo "  export PATH"
233   endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines