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.27 by greg, Wed Apr 25 22:21:06 2012 UTC vs.
Revision 1.31 by greg, Wed Feb 16 18:56:32 2022 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'
# Line 22 | Line 23 | if ( "$1" == library ) then
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_
# Line 113 | Line 131 | 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"
133          set arch=IBMPC
134 <        set compat="erf.o"
134 >        set compat="strlcpy.o"
135          set extras=CC=gcc
136          breaksw
137   case 3:                 # MacOS X
# Line 134 | Line 152 | 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"
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 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"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines