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

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

Karen Tian
Powered by
ViewCVS 0.9.4