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

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

Karen Tian
Powered by
ViewCVS 0.9.4