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.8 by greg, Thu Jul 17 15:31:26 2003 UTC vs.
Revision 1.28 by greg, Fri Jun 29 16:18:02 2012 UTC

# Line 11 | Line 11 | if ( $#argv < 1 ) then
11   endif
12   if ( "$1" == library ) then
13          source installib
14 <        cp -f src/*/*.{cal,tab,hex} $ldir
14 >        cp -f src/*/*.{cal,tab,hex,dat} $ldir
15          echo ""
16          echo "Set the environment variable RAYPATH=.:$ldir"
17          echo 'For C-shell users, put the following into ~/.cshrc'
18          echo "  setenv RAYPATH .:$ldir"
19 <        echo 'For Bourne shell users, put the following into $HOME/profile'
19 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
20          echo "  RAYPATH=.:$ldir"
21          echo "  export RAYPATH"
22          echo ""
23          exit 0
24   endif
25 < set srcdirs=( common meta cv gen ot rt px hd util cal )
25 > set srcdirs=( common rt meta cv gen ot px hd util cal )
26   if ( "$1" == install ) then
27          cat << _EOF_
28  
# Line 65 | Line 65 | if ( ! -d $idir ) then
65                  goto again1
66          endif
67   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
68 > set inpath=0
69 > foreach i ( $path )
70 >        if ( "$i" == "$idir" ) then
71 >                set inpath=1
72 >                break
73          endif
74 < endif
74 > end
75   set rmake=$idir/rmake
76   if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then
77          goto gotrmake
78   endif
79   set newrmake
80 < goto skiplicense
81 < cat << _EOF_
82 <
83 <                     RADIANCE LICENSE AGREEMENT
84 <
85 < Radiance is a registered copyright of The Regents of the University of
86 < California ("The Regents"). The Regents grant to you a nonexclusive,
87 < nontransferable license ("License") to use Radiance source code without
88 < fee.  You may not sell or distribute Radiance to others without the
89 < prior express written permission of The Regents.  You may compile and
90 < use this software on any machines to which you have personal access,
91 < and may share its use with others who have access to the same machines.
92 <
93 < NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY
94 < OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
95 < LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS
96 < OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
97 < THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.  By downloading, using
98 < or copying this software, you agree to abide by the intellectual property laws
99 < and all other applicable laws of the United States, and by the terms of this
100 < License Agreement. Ownership of the software shall remain solely in The
101 < Regents.  The Regents shall have the right to terminate this License
102 < immediately by written notice upon your breach of, or noncompliance with, any
103 < of its terms.  You shall be liable for any infringement or damages resulting
104 < from your failure to abide by the terms of this License Agreement.
105 <
106 < _EOF_
80 > more License.txt
81   echo -n "Do you understand and accept the terms of this agreement [n]? "
82   set ans="$<"
83   if ( "$ans" !~ [yY]* ) exit
110 echo -n "Are you a new Radiance user or with a new address [y]? "
111 set ans="$<"
112 if ( "$ans" !~ [nN]* ) then
113        csh -f newuser
114 else
115        echo `cat src/rt/VERSION` compiled by `whoami` | mail [email protected]
116 endif
117 skiplicense:
84   set special=
85   set arch=
86   set opt=
87   set mach=
88   set compat=
89   set extras=
90 + set esuffix=
91   cat << _EOF_
92  
93   Please select your system type from the following list:
94  
95          1)      Sun Solaris
96 <        2)      HP workstation
97 <        3)      Silicon Graphics
98 <        4)      AIX (RS/6000)
99 <        5)      BSDI BSD/386
100 <        6)      Linux
134 <        7)      MacOS X
135 <        8)      FreeBSD
136 <        9)      Other
96 >        2)      Linux
97 >        3)      MacOS X
98 >        4)      FreeBSD
99 >        5)      Cygwin
100 >        6)      Other
101  
102   _EOF_
103   echo -n "Choice? "
# Line 142 | Line 106 | switch ("$arch")
106   case 1:                 # SPARC Station
107          set arch=sun
108          set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
145        set opt="-O -DSPEED=80"
146        set compat="bmalloc.o strcmp.o getpagesize.o"
147        breaksw
148 case 2:                 # HP workstation
149        set mach=""
150        set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE"
151        set compat="bmalloc.o getpagesize.o strcmp.o"
152        set arch=hpux
153        breaksw
154 case 3:                 # Silicon Graphics
155        set arch=sgi
156        switch (`uname -r`)
157        case 3.*:
158                set mach="-noprototypes"
159                set opt="-O -DSPEED=80"
160                set special="sgi"
161                set compat="malloc.o strcmp.o"
162                breaksw
163        case 4.*:
164                set mach=""
165                set opt="-O2 -DSPEED=100"
166                set compat="malloc.o strcmp.o"
167                set extras='"MLIB=-lfastm -lm"'
168                breaksw
169        default:        # 5.x or later
170                ln -s `which wish` $idir/wish4.0
171                set path=($idir $path)
172                set mach="-w"
173                set opt="-O2 -DSPEED=200"
174                set special="ogl"
175                set compat="bmalloc.o strcmp.o"
176                breaksw
177        endsw
178        breaksw
179 case 4:                 # AIX
109          set opt="-O"
110 <        set compat="bmalloc.o erf.o strcmp.o"
182 <        set arch=PowerPC
110 >        set compat="strcmp.o timegm.o"
111          breaksw
112 < case 5:                 # BSDI BSD/386
185 <        set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include"
186 <        set opt="-O -DSPEED=100"
187 <        set arch=IBMPC
188 <        set compat="malloc.o erf.o strcmp.o"
189 <        breaksw
190 < case 6:                 # Linux
112 > case 2:                 # Linux
113          set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
114 <        set opt="-O2 -DSPEED=200"
114 >        set opt="-O2"
115          set arch=IBMPC
116 <        set compat="bmalloc.o erf.o getpagesize.o"
116 >        set compat="erf.o"
117          set extras=CC=gcc
118          breaksw
119 < case 7:                # MacOS X
120 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
121 <        set opt="-O2 -DSPEED=200"
122 <        set arch=PowerPC
123 <        set compat="bmalloc.o"
202 <        set extras="CC=cc CONFIGURE_ARCH=powerpc"
119 > case 3:                 # MacOS X
120 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
121 >        set opt="-O2"
122 >        set arch=Intel
123 >        set extras="CC=cc CONFIGURE_ARCH=i386"
124          set special="ogl"
125 <        breaksw
126 < case 8:                 # FreeBSD
127 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
128 <        set opt="-O -DSPEED=200"
129 <        set compat="bmalloc.o erf.o"
130 <        set extras="CC=cc"
125 >        breaksw
126 > case 4:                 # FreeBSD
127 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
128 >        set opt="-O"
129 >        set compat="erf.o"
130 >        set extras='CC=cc MLIB="-lcompat -lm"'
131          set arch=IBMPC
132 <        breaksw
133 < case 9:                 # Other
132 >        breaksw
133 > case 5:                 # Cygwin
134 >        set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
135 >        set opt="-O2"
136 >        set arch=IBMPC
137 >        set compat="erf.o"
138 >        set extras="CC=gcc"
139 >        set special="ogl"
140 >        set esuffix=".exe"
141 >        breaksw
142 > case 6:                 # Other
143          set opt="-O"
144 <        set compat="bmalloc.o erf.o strcmp.o"
144 >        set compat="erf.o strcmp.o"
145          echo -n "Are you using the GNU C compiler [n]? "
146          if ( "$<" =~ [yY]* ) then
147                  set extras="CC=gcc"
148 +        else
149 +                set compat="$compat timegm.o"
150          endif
151          set arch=other
152          breaksw
# Line 233 | Line 165 | exec make "SPECIAL=$special" \
165          ARCH=$arch "COMPAT=$compat" \
166          INSTDIR=$idir \
167          LIBDIR=$ldir \
168 +        ESUFFIX=$esuffix \
169          $extras "\$@" -f Rmakefile
170   _EOF_
171   chmod 755 $rmake
# Line 271 | Line 204 | else
204          echo "Done."
205   endif
206   cd ..
207 < if (! -d /usr/tmp) then
208 <        ln -s /tmp /usr/tmp
209 <        if ($status) then
210 <                echo ""
211 <                echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'"
212 <                echo ""
213 <        endif
207 > if (! $inpath ) then
208 >        echo ""
209 >        echo "Add $idir to the beginning of your execution path:"
210 >        echo 'For C-shell users, put the following into ~/.cshrc'
211 >        echo "  set path=( $idir "'$path )'
212 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
213 >        echo "  PATH=$idir"':$PATH'
214 >        echo "  export PATH"
215   endif
216   else
217   cd src
# Line 287 | Line 221 | foreach i ( $srcdirs )
221          make -f Rmakefile $*
222          popd
223   end
290 echo "Done."
224   cd ..
292 endif
225   foreach i ( $* )
226          if ( "$i" == clean ) then
227                  echo "Removing library archives..."
228 <                rm -f src/lib/*.[ao]
228 >                rm -f src/lib/*.{a,o,la}
229          endif
230   end
231 + echo "Done."
232 + endif
233   exit 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines