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

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

Karen Tian
Powered by
ViewCVS 0.9.4