(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                if (-d man/man1) then
 39            	cd man/man1
 40 arta  1.8  	find . -name "*.*" -exec rm {} \;
 41 arta  1.1  	cd ../..
 42                endif
 43                if (-d man/man3) then
 44            	cd man/man3
 45 arta  1.8  	find . -name "*.*" -exec rm {} \;
 46 arta  1.1  	cd ../..
 47                endif
 48                echo "done"
 49            
 50                echo -n "Removing links to headers..."
 51 arta  1.10     if (-d base/include) then
 52            	cd base/include
 53 arta  1.8  	find . -name "*.h" -exec rm {} \;
 54 arta  1.10 	cd ../..
 55 arta  1.1      endif
 56                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                echo
 75            
 76                if ($CLEAN == "yes") then
 77            
 78 arta  1.10 	if (-x base/local/libs/dsds/scripts/rmlinks.csh) then
 79            	    base/local/libs/dsds/scripts/rmlinks.csh
 80 arta  1.1  	endif
 81            
 82 arta  1.10 	if (-x base/local/libs/soi/scripts/rmlinks.csh) then
 83            	    base/local/libs/soi/scripts/rmlinks.csh
 84 arta  1.1  	endif
 85                else
 86 arta  1.5  	echo -n "Setting links for local project configuration..."
 87 arta  1.6  	if (-e suflag.txt) then
 88 arta  1.10 	    cd proj
 89            	    ln -sf ../projconf/su/configure configure
 90            	    ln -sf ../projconf/su/make_basic.mk make_basic.mk
 91            	    ln -sf ../projconf/su/Rules.mk Rules.mk
 92            	    ln -sf ../projconf/su/target.mk target.mk
 93            	    cd ..
 94 arta  1.6  	else
 95 arta  1.10 	    cd proj
 96            	    ln -sf ../projconf/ex/configure configure
 97            	    ln -sf ../projconf/ex/make_basic.mk make_basic.mk
 98            	    ln -sf ../projconf/ex/Rules.mk Rules.mk
 99            	    ln -sf ../projconf/ex/target.mk target.mk
100            	    cd ..
101 arta  1.5  	endif
102            	echo "done"
103            
104 arta  1.1  	echo -n "Setting links to man pages..."
105            	if (!(-d man/man1)) then
106            	    mkdir -p man/man1
107            	endif
108            	if (!(-d man/man3)) then
109            	    mkdir -p man/man3
110            	endif
111            	cd man/man1
112 arta  1.2  	find ../.. -path '../../man/man1' -prune -o -path '*/man/man1/*.1' -exec ln -s {} . \;
113 arta  1.1  	cd ../../man/man3
114 arta  1.2  	find ../.. -path '../../man/man3' -prune -o -path '*/man/man3/*.3' -exec ln -s {} . \;
115 arta  1.1  	cd ../..
116            	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.1  	echo "done"
126            	echo
127            	
128            	echo "Setting links to scripts..."
129                    if (!(-d scripts)) then
130            	    mkdir scripts
131            	endif
132            	cd scripts
133 arta  1.3  
134            	# Sums scripts
135 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" \;
136 arta  1.3  
137            	# Util scripts
138 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" \;
139 arta  1.3  
140 arta  1.9  	# DRMS / IDL-interface scripts
141 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" \;
142 arta  1.9  
143 arta  1.4  	# Project-specific scripts - these won't show up if you don't have the project source.
144 arta  1.10 	if (-x ../proj/configure) then
145            	    ../proj/configure
146 arta  1.4  	endif
147 arta  1.3  
148 arta  1.1  	cd ..
149            	echo "done"
150            	echo
151            
152            	echo "Setting links to jsds..."
153            	if (!(-d jsds)) then
154            	    mkdir jsds
155            	endif
156            	cd jsds
157 arta  1.10 	find ../base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o \( -name \*.jsd -exec echo "  " {} " ERROR - couldn't create link" \; \)
158 arta  1.1  	cd ..
159            	echo "done"
160            	echo
161            
162            	# generate links for DSDS/SOI dynamic libraries - only do this if 
163            	# user's environment has access to /home/soi/CM
164            	if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
165 arta  1.10 	    if (-x base/local/libs/dsds/scripts/genlinks.csh) then
166            		base/local/libs/dsds/scripts/genlinks.csh
167 arta  1.1  	    endif
168            
169 arta  1.10 	    if (-x base/local/libs/soi/scripts/genlinks.csh) then
170            		base/local/libs/soi/scripts/genlinks.csh
171 arta  1.1  	    endif
172            	endif
173                endif
174            endif
175            
176            # Enter required library names and versions here.
177            if ($CHKLIBS == "yes") then
178            
179                echo
180                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."
181                echo
182                echo "Example:"
183                echo "  cd $JSOCROOT/lib_third_party/"
184                echo "  ln -s /usr/local/include include"
185                echo "  cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
186                echo "  ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
187                echo
188                echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
189                echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
190            
191            #    echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
192 arta  1.1  #    echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
193            #    if ($JSOC_MACHINE == "linux_x86_64") then 
194            #	echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
195            #    else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
196            #    endif
197            
198            
199            endif 

Karen Tian
Powered by
ViewCVS 0.9.4