(file) Return to configure CVS log (file) (dir) Up to [Development] / JSOC

  1 arta  1.1 #! /bin/csh -f
  2           
  3 arta  1.26 # set up $JSOC_MACHINE
  4            set JSOC_MACHINE = `build/jsoc_machine.csh`
  5            echo "Machine type is $JSOC_MACHINE"
  6            echo ""
  7 arta  1.24 
  8 arta  1.1  set CLEAN = "no"
  9            set CHKLIBS = "no"
 10            set CCMD = "c"
 11            set LCMD = "l"
 12            
 13            foreach ARG ($argv)
 14                set FLAG = `echo $ARG | awk '{print substr($0, 2)}'`
 15                if ($FLAG == $CCMD) then
 16                  set CLEAN = "yes"
 17                else if ($FLAG == $LCMD) then
 18                  set CHKLIBS = "yes"
 19                endif
 20            end
 21            
 22            if ($CHKLIBS == "no") then
 23 arta  1.5      echo -n "Remove links for local project configuration..."
 24 arta  1.10     if (-d proj) then
 25            	cd proj
 26 arta  1.8  	if (-e configure) then
 27            	    rm configure
 28            	endif
 29            	if (-e make_basic.mk) then
 30            	    rm make_basic.mk
 31            	endif
 32            	if (-e Rules.mk) then
 33            	    rm Rules.mk
 34            	endif
 35            	if (-e target.mk) then
 36            	    rm target.mk
 37            	endif
 38 arta  1.10 	cd ..
 39 arta  1.5      endif
 40                echo "done"
 41            
 42 arta  1.1      echo -n "Remove links to man pages..."
 43 arta  1.13     if (-e man) then
 44            	rm -rf man
 45 arta  1.12     endif
 46 arta  1.1      echo "done"
 47            
 48                echo -n "Removing links to headers..."
 49 arta  1.10     if (-d base/include) then
 50            	cd base/include
 51 arta  1.8  	find . -name "*.h" -exec rm {} \;
 52 arta  1.10 	cd ../..
 53 arta  1.1      endif
 54 arta  1.19 
 55                if (-d include) then
 56            	cd include
 57            	find . -name "*.h" -exec rm {} \;
 58            	cd ..
 59                endif
 60 arta  1.1      echo "done"
 61            
 62                echo -n "Removing links to scripts..."
 63                if (-d scripts) then
 64            	cd scripts
 65 arta  1.8  	find . -name "*" -exec rm {} \;
 66 arta  1.1  	cd ..
 67                endif
 68                echo "done"
 69            
 70                echo -n "Removing links to jsds..."
 71                if (-d jsds) then
 72            	cd jsds
 73 arta  1.8  	find . -name "*" -exec rm {} \;
 74 arta  1.1  	cd ..
 75                endif
 76                echo "done"
 77            
 78 arta  1.14     echo -n "Removing links to third-party libraries..."
 79                if (-d lib_third_party) then
 80            	rm -rf lib_third_party
 81                endif
 82                echo "done"
 83            
 84 arta  1.1      echo
 85            
 86                if ($CLEAN == "yes") then
 87 arta  1.10 	if (-x base/local/libs/dsds/scripts/rmlinks.csh) then
 88            	    base/local/libs/dsds/scripts/rmlinks.csh
 89 arta  1.1  	endif
 90            
 91 arta  1.10 	if (-x base/local/libs/soi/scripts/rmlinks.csh) then
 92            	    base/local/libs/soi/scripts/rmlinks.csh
 93 arta  1.1  	endif
 94                else
 95 arta  1.5  	echo -n "Setting links for local project configuration..."
 96 arta  1.6  	if (-e suflag.txt) then
 97 arta  1.10 	    cd proj
 98            	    ln -sf ../projconf/su/configure configure
 99            	    ln -sf ../projconf/su/make_basic.mk make_basic.mk
100            	    ln -sf ../projconf/su/Rules.mk Rules.mk
101            	    ln -sf ../projconf/su/target.mk target.mk
102            	    cd ..
103 arta  1.6  	else
104 arta  1.10 	    cd proj
105            	    ln -sf ../projconf/ex/configure configure
106            	    ln -sf ../projconf/ex/make_basic.mk make_basic.mk
107            	    ln -sf ../projconf/ex/Rules.mk Rules.mk
108            	    ln -sf ../projconf/ex/target.mk target.mk
109            	    cd ..
110 arta  1.5  	endif
111            	echo "done"
112            
113 arta  1.13 	echo "Setting links to man pages..."
114            	if (-d /home/jsoc/man) then
115            	    if (!(-e man)) then
116            		ln -s /home/jsoc/man man
117            	    endif
118            	endif
119 arta  1.1  	echo "done"
120            
121            	echo "Setting links to headers..."
122 arta  1.10 	if (!(-d base/include)) then
123            	    mkdir -p base/include
124 arta  1.1  	endif
125 arta  1.10 	cd base/include
126 arta  1.1  	find .. -path '../include' -prune -o -name \*.h  \( \( -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \; \)
127 arta  1.10 	cd ../..
128 arta  1.19 
129            	if (!(-d include)) then
130            	    mkdir -p include
131            	endif
132            	cd include
133            	if (-d ../base/include) then
134            	    find ../base/include -name \*.h -exec ln -s {} . \;
135            	endif
136            	cd ..
137 arta  1.1  	echo "done"
138            	echo
139            	
140            	echo "Setting links to scripts..."
141                    if (!(-d scripts)) then
142            	    mkdir scripts
143            	endif
144            	cd scripts
145 arta  1.3  
146            	# Sums scripts
147 arta  1.10 	find ../base/sums/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;
148 arta  1.3  
149            	# Util scripts
150 arta  1.10 	find ../base/util/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;
151 arta  1.3  
152 arta  1.9  	# DRMS / IDL-interface scripts
153 arta  1.10 	find ../base/drms/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;
154 arta  1.9  
155 arta  1.4  	# Project-specific scripts - these won't show up if you don't have the project source.
156 arta  1.10 	if (-x ../proj/configure) then
157            	    ../proj/configure
158 arta  1.4  	endif
159 arta  1.3  
160 arta  1.1  	cd ..
161            	echo "done"
162            	echo
163            
164            	echo "Setting links to jsds..."
165            	if (!(-d jsds)) then
166            	    mkdir jsds
167            	endif
168            	cd jsds
169 arta  1.10 	find ../base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o \( -name \*.jsd -exec echo "  " {} " ERROR - couldn't create link" \; \)
170 arta  1.1  	cd ..
171            	echo "done"
172            	echo
173 arta  1.14 	# Set links to third-party libraries
174            	echo "Setting links to third-party libraries"
175 arta  1.15 	if (!(-d lib_third_party)) then
176            	    mkdir lib_third_party
177 arta  1.14 	endif
178            	cd lib_third_party
179            
180            	if (-e ../suflag.txt) then
181 arta  1.27             if (!(-d include)) then
182                            mkdir include
183                        endif
184            
185                        if (!(-d lib)) then
186                            mkdir lib
187                        endif
188            
189                        # Don't make a link directly from include/lib to a directory, else
190                        # all includes files/libs must reside in one directory.
191            
192                        cd include
193                        # Standard location for all of JSOC's includes
194                        find /home/jsoc/include -maxdepth 1 -name "*.h" -exec ln -sfv {} \;
195                        find /home/jsoc/include -mindepth 1 -type d -exec ln -sfv {} \;
196                        cd ..
197            
198                        cd lib
199                        # Standard locations for all of JSOC's libraries - x86_64
200                        if (!(-d linux_x86_64)) then
201                            mkdir linux_x86_64
202 arta  1.27             endif
203            
204                        cd linux_x86_64
205                            find /home/jsoc/lib/linux_x86_64/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \;
206                        cd ..
207            
208                        # Standard locations for all of JSOC's libraries - ia32
209                        if (!(-d linux_ia32)) then
210                            mkdir linux_ia32
211                        endif
212            
213                        cd linux_ia32
214                            find /home/jsoc/lib/linux_ia32/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \;
215                        cd ..
216            
217                        cd ..
218 arta  1.14 	else
219 rick  1.18 # Non-Stanford users: edit these lines to reflect the location of required
220            #  3rd party libs: cfitsio.a
221            	    ln -sfv /usr/local/include include
222 arta  1.29             if (!(-d lib)) mkdir lib
223            	    ln -sfv /usr/local/lib lib/$JSOC_MACHINE
224 arta  1.14 	endif
225            
226            	set TPWARN = 0
227            
228 arta  1.16 	# Libraries required by all
229 arta  1.20 	if ($JSOC_MACHINE == "linux_x86_64") then
230            	    if (!(-e lib/linux_x86_64/libcfitsio.a)) then
231            		echo "Can't find required library: lib/linux_x86_64/libcfitsio.a"
232            		set TPWARN = 1
233            	    endif
234 arta  1.14 	endif
235            
236 arta  1.20 	if ($JSOC_MACHINE == "linux_ia32") then
237            	    if (!(-e lib/linux_ia32/libcfitsio.a)) then
238            		echo "Can't find required library: lib/linux_ia32/libcfitsio.a"
239            		set TPWARN = 1
240            	    endif
241 arta  1.14 	endif
242            
243 arta  1.21 	if ($JSOC_MACHINE == "mac_osx") then
244            	    if (!(-e lib/mac_osx/libcfitsio.a)) then
245            		echo "Can't find required library: lib/mac_osx/libcfitsio.a"
246            		set TPWARN = 1
247            	    endif
248            	endif
249            
250 arta  1.16 	if (-e ../suflag.txt) then
251            	    # Stanford users' required libs.
252 arta  1.22 	    if ($JSOC_MACHINE == "linux_x86_64") then
253 arta  1.31                 if (!(-e lib/linux_x86_64/libcfitsio_gcc.a)) then
254                                echo "Can't find required library: lib/linux_x86_64/libcfitsio_gcc.a"
255                                set TPWARN = 1
256                            endif
257 arta  1.22 		if (!(-e lib/linux_x86_64/libfftw3f.a)) then
258 arta  1.28 		    echo "Can't find required library: lib/linux_x86_64/libfftw3f.a"
259 arta  1.22 		    set TPWARN = 1
260            		endif
261 arta  1.23 		if (!(-e lib/linux_x86_64/libgsl.a)) then
262 arta  1.28 		    echo "Can't find required library: lib/linux_x86_64/libgsl.a"
263 arta  1.23 		    set TPWARN = 1
264            		endif
265            		if (!(-e lib/linux_x86_64/libgslcblas.a)) then
266 arta  1.28 		    echo "Can't find required library: lib/linux_x86_64/libgslcblas.a"
267 arta  1.23 		    set TPWARN = 1
268            		endif
269 arta  1.16 	    endif
270            
271 arta  1.22 	    if ($JSOC_MACHINE == "linux_ia32") then
272            		if (!(-e lib/linux_ia32/libfftw3f.a)) then
273 arta  1.28 		    echo "Can't find required library: lib/linux_ia32/libfftw3f.a"
274 arta  1.22 		    set TPWARN = 1
275            		endif
276 arta  1.23 		if (!(-e lib/linux_ia32/libgsl.a)) then
277 arta  1.28 		    echo "Can't find required library: lib/linux_ia32/libgsl.a"
278 arta  1.23 		    set TPWARN = 1
279            		endif
280            		if (!(-e lib/linux_ia32/libgslcblas.a)) then
281 arta  1.28 		    echo "Can't find required library: lib/linux_ia32/libgslcblas.a"
282 arta  1.23 		    set TPWARN = 1
283            		endif
284 arta  1.22 	    endif
285            
286            	    if ($JSOC_MACHINE == "mac_osx") then
287            		if (!(-e lib/mac_osx/libfftw3f.a)) then
288 arta  1.28 		    echo "Can't find required library: lib/mac_osx/libfftw3f.a"
289 arta  1.22 		    set TPWARN = 1
290            		endif
291 arta  1.16 	    endif
292            	else
293            	    # Non-Stanford users' required libs.
294 arta  1.14 	endif
295            
296            	if ($TPWARN) then
297 arta  1.28 	    echo "Did you update configure to create links to installed third-party libraries?"
298 arta  1.14 	endif
299            
300            	cd ..
301 arta  1.31         
302                    # Set custom make file to tell the make system that the gcc cfitsio library is called
303                    # libcfitsio_gcc.a
304                    if (-e suflag.txt) then
305                        echo "CFITSIOFNAME_GCC_X86_64 = cfitsio_gcc" > custom.mk
306                    endif
307            
308 arta  1.14 	echo "done"
309            	echo
310            
311 arta  1.1  	# generate links for DSDS/SOI dynamic libraries - only do this if 
312            	# user's environment has access to /home/soi/CM
313            	if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
314 arta  1.10 	    if (-x base/local/libs/dsds/scripts/genlinks.csh) then
315            		base/local/libs/dsds/scripts/genlinks.csh
316 arta  1.1  	    endif
317            
318 arta  1.10 	    if (-x base/local/libs/soi/scripts/genlinks.csh) then
319            		base/local/libs/soi/scripts/genlinks.csh
320 arta  1.1  	    endif
321            	endif
322                endif
323            endif
324            
325            # Enter required library names and versions here.
326            if ($CHKLIBS == "yes") then
327            
328                echo
329                echo "JSOC expects all third-party library header files to be located at $JSOCROOT/lib_third_party/include/ and all third-party libraries to be located at $JSOCROOT/lib_third_party/$JSOC_MACHINE/.  If you wish to build a target that uses one of the following third-paty libraries, please install the required library version and create a link from from $JSOCROOT/lib_third_party/include/ and $JSOCROOT/lib_third_party/$JSOC_MACHINE/ to the installed library headers and binary files, respectively."
330                echo
331                echo "Example:"
332                echo "  cd $JSOCROOT/lib_third_party/"
333                echo "  ln -s /usr/local/include include"
334                echo "  cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
335                echo "  ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
336                echo
337                echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
338                echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
339            
340            #    echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
341 arta  1.1  #    echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
342            #    if ($JSOC_MACHINE == "linux_x86_64") then 
343            #	echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
344            #    else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
345            #    endif
346            
347            
348            endif 

Karen Tian
Powered by
ViewCVS 0.9.4