(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            
154 arta  1.14 	# Set links to third-party libraries
155            	echo "Setting links to third-party libraries"
156 arta  1.15 	if (!(-d lib_third_party)) then
157            	    mkdir lib_third_party
158 arta  1.14 	endif
159            	cd lib_third_party
160            
161            	if (-e ../suflag.txt) then
162 arta  1.17 	    ln -sfv /home/jsoc/include include
163            	    ln -sfv /home/jsoc/lib lib
164 arta  1.14 	else
165 arta  1.16 	    # Non-Stanford users.
166 arta  1.14 	endif
167            
168            	set TPWARN = 0
169            
170 arta  1.16 	# Libraries required by all
171 arta  1.14 	if (!(-e lib/linux_x86_64/libcfitsio.a)) then
172            	    echo "D'OH! - Can't find required library: lib/linux_x86_64/libcfitsio.a"
173            	    set TPWARN = 1
174            	endif
175            
176 arta  1.16 	if (!(-e lib/linux_ia32/libcfitsio.a)) then
177            	    echo "D'OH! - Can't find required library: lib/linux_ia32/libcfitsio.a"
178 arta  1.14 	    set TPWARN = 1
179            	endif
180            
181 arta  1.16 	if (-e ../suflag.txt) then
182            	    # Stanford users' required libs.
183            	    if (!(-e lib/linux_x86_64/libfftw3f.a)) then
184            		echo "D'OH! - Can't find required library: $JSOCROOT/lib/linux_x86_64/libfftw3f.a"
185            		set TPWARN = 1
186            	    endif
187            
188            	    if (!(-e lib/linux_ia32/libfftw3f.a)) then
189            		echo "D'OH! - Can't find required library: $JSOCROOT/lib/linux_ia32/libfftw3f.a"
190            		set TPWARN = 1
191            	    endif
192            	else
193            	    # Non-Stanford users' required libs.
194 arta  1.14 	endif
195            
196            	if ($TPWARN) then
197            	    echo "Did you update $JSOCROOT/configure to create links to installed third-party libraries?"
198            	endif
199            
200            	cd ..
201            	echo "done"
202            	echo
203            
204 arta  1.1  	# generate links for DSDS/SOI dynamic libraries - only do this if 
205            	# user's environment has access to /home/soi/CM
206            	if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
207 arta  1.10 	    if (-x base/local/libs/dsds/scripts/genlinks.csh) then
208            		base/local/libs/dsds/scripts/genlinks.csh
209 arta  1.1  	    endif
210            
211 arta  1.10 	    if (-x base/local/libs/soi/scripts/genlinks.csh) then
212            		base/local/libs/soi/scripts/genlinks.csh
213 arta  1.1  	    endif
214            	endif
215                endif
216            endif
217            
218            # Enter required library names and versions here.
219            if ($CHKLIBS == "yes") then
220            
221                echo
222                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."
223                echo
224                echo "Example:"
225                echo "  cd $JSOCROOT/lib_third_party/"
226                echo "  ln -s /usr/local/include include"
227                echo "  cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
228                echo "  ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
229                echo
230                echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
231                echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
232            
233            #    echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
234 arta  1.1  #    echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
235            #    if ($JSOC_MACHINE == "linux_x86_64") then 
236            #	echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
237            #    else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
238            #    endif
239            
240            
241            endif 

Karen Tian
Powered by
ViewCVS 0.9.4