21 |
|
|
22 |
|
if ($CHKLIBS == "no") then |
23 |
|
echo -n "Remove links for local project configuration..." |
24 |
< |
rm -f proj/configure proj/make_basic.mk proj/Rules.mk proj/target.mk |
24 |
> |
if (-d proj) then |
25 |
> |
cd proj |
26 |
> |
if (-e configure) then |
27 |
> |
rm configure |
28 |
> |
endif |
29 |
> |
if (-e make_basic.mk) then |
30 |
> |
rm make_basic.mk |
31 |
> |
endif |
32 |
> |
if (-e Rules.mk) then |
33 |
> |
rm Rules.mk |
34 |
> |
endif |
35 |
> |
if (-e target.mk) then |
36 |
> |
rm target.mk |
37 |
> |
endif |
38 |
> |
cd .. |
39 |
> |
endif |
40 |
|
echo "done" |
41 |
|
|
42 |
|
echo -n "Remove links to man pages..." |
43 |
< |
rm -rf man |
43 |
> |
if (-e man) then |
44 |
> |
rm -rf man |
45 |
> |
endif |
46 |
|
echo "done" |
47 |
|
|
48 |
|
echo -n "Removing links to headers..." |
49 |
|
if (-d base/include) then |
50 |
< |
find base/include -name "*.h" -exec rm {} \; |
50 |
> |
cd base/include |
51 |
> |
find . -name "*.h" -exec rm {} \; |
52 |
> |
cd ../.. |
53 |
|
endif |
54 |
|
|
55 |
|
if (-d include) then |
56 |
< |
find include -name "*.h" -exec rm {} \; |
56 |
> |
cd include |
57 |
> |
find . -name "*.h" -exec rm {} \; |
58 |
> |
cd .. |
59 |
|
endif |
60 |
|
echo "done" |
61 |
|
|
62 |
|
echo -n "Removing links to scripts..." |
63 |
|
if (-d scripts) then |
64 |
< |
find scripts -name "*" -exec rm {} \; |
64 |
> |
cd scripts |
65 |
> |
find . -name "*" -exec rm {} \; |
66 |
> |
cd .. |
67 |
|
endif |
68 |
|
echo "done" |
69 |
|
|
70 |
|
echo -n "Removing links to jsds..." |
71 |
|
if (-d jsds) then |
72 |
< |
find jsds -name "*" -exec rm {} \; |
72 |
> |
cd jsds |
73 |
> |
find . -name "*" -exec rm {} \; |
74 |
> |
cd .. |
75 |
|
endif |
76 |
|
echo "done" |
77 |
|
|
126 |
|
find .. -path '../include' -prune -o -name \*.h \( \( -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o -exec echo " " {} " ERROR - couldn't create link" \; \) |
127 |
|
cd ../.. |
128 |
|
|
129 |
< |
mkdir -p include |
129 |
> |
if (!(-d include)) then |
130 |
> |
mkdir -p include |
131 |
> |
endif |
132 |
|
cd include |
133 |
|
if (-d ../base/include) then |
134 |
|
find ../base/include -name \*.h -exec ln -s {} . \; |
138 |
|
echo |
139 |
|
|
140 |
|
echo "Setting links to scripts..." |
141 |
< |
mkdir -p scripts |
141 |
> |
if (!(-d scripts)) then |
142 |
> |
mkdir scripts |
143 |
> |
endif |
144 |
|
cd scripts |
145 |
|
|
146 |
|
# Sums scripts |
162 |
|
echo |
163 |
|
|
164 |
|
echo "Setting links to jsds..." |
165 |
< |
if (!(-d jsds)) mkdir jsds |
165 |
> |
if (!(-d jsds)) then |
166 |
> |
mkdir jsds |
167 |
> |
endif |
168 |
|
cd jsds |
169 |
|
find ../base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o \( -name \*.jsd -exec echo " " {} " ERROR - couldn't create link" \; \) |
170 |
|
cd .. |
172 |
|
echo |
173 |
|
# Set links to third-party libraries |
174 |
|
echo "Setting links to third-party libraries" |
175 |
< |
if (!(-d lib_third_party)) mkdir lib_third_party |
175 |
> |
if (!(-d lib_third_party)) then |
176 |
> |
mkdir lib_third_party |
177 |
> |
endif |
178 |
|
cd lib_third_party |
179 |
|
|
180 |
|
if (-e ../suflag.txt) then |
181 |
< |
if (!(-d include)) mkdir include |
182 |
< |
|
183 |
< |
if (!(-d lib)) mkdir lib |
181 |
> |
if (!(-d include)) then |
182 |
> |
mkdir include |
183 |
> |
endif |
184 |
> |
|
185 |
> |
if (!(-d lib)) then |
186 |
> |
mkdir lib |
187 |
> |
endif |
188 |
|
|
189 |
|
# Don't make a link directly from include/lib to a directory, else |
190 |
|
# all includes files/libs must reside in one directory. |
197 |
|
|
198 |
|
cd lib |
199 |
|
# Standard locations for all of JSOC's libraries - x86_64 |
200 |
< |
if (!(-d linux_x86_64)) mkdir linux_x86_64 |
200 |
> |
if (!(-d linux_x86_64)) then |
201 |
> |
mkdir linux_x86_64 |
202 |
> |
endif |
203 |
|
|
204 |
|
cd linux_x86_64 |
205 |
|
find /home/jsoc/lib/linux_x86_64/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \; |
206 |
|
cd .. |
207 |
|
|
208 |
|
# Standard locations for all of JSOC's libraries - ia32 |
209 |
< |
if (!(-d linux_ia32)) mkdir linux_ia32 |
209 |
> |
if (!(-d linux_ia32)) then |
210 |
> |
mkdir linux_ia32 |
211 |
> |
endif |
212 |
|
|
213 |
|
cd linux_ia32 |
214 |
|
find /home/jsoc/lib/linux_ia32/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \; |
313 |
|
set TPWARN = 0 |
314 |
|
|
315 |
|
# Libraries required by all |
316 |
< |
if (!(-e "lib_third_party/lib/$JSOC_MACHINE/libcfitsio.a")) then |
317 |
< |
echo |
318 |
< |
echo "Can't find required library: lib_third_party/lib/$JSOC_MACHINE/libcfitsio.a" |
319 |
< |
set TPWARN = 1 |
316 |
> |
if ($JSOC_MACHINE == "linux_x86_64") then |
317 |
> |
if (!(-e lib_third_party/lib/linux_x86_64/libcfitsio.a)) then |
318 |
> |
echo |
319 |
> |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libcfitsio.a" |
320 |
> |
set TPWARN = 1 |
321 |
> |
endif |
322 |
|
endif |
323 |
|
|
324 |
< |
# special required libraries for particular architectures |
325 |
< |
|
326 |
< |
if (-e ../suflag.txt) then |
327 |
< |
# Stanford users' required libs. |
324 |
> |
if ($JSOC_MACHINE == "linux_ia32") then |
325 |
> |
if (!(-e lib_third_party/lib/linux_ia32/libcfitsio.a)) then |
326 |
> |
echo |
327 |
> |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libcfitsio.a" |
328 |
> |
set TPWARN = 1 |
329 |
> |
endif |
330 |
> |
endif |
331 |
|
|
332 |
< |
if (!(-e "lib_third_party/lib/$JSOC_MACHINE/libfftw3f.a")) then |
332 |
> |
if ($JSOC_MACHINE == "mac_osx") then |
333 |
> |
if (!(-e lib_third_party/lib/mac_osx/libcfitsio.a)) then |
334 |
|
echo |
335 |
< |
echo "Can't find required library: lib_third_party/lib/$JSOC_MACHINE/libfftw3f.a" |
336 |
< |
set TPWARN = 1 |
335 |
> |
echo "Can't find required library: lib_third_party/lib/mac_osx/libcfitsio.a" |
336 |
> |
set TPWARN = 1 |
337 |
|
endif |
338 |
+ |
endif |
339 |
|
|
340 |
< |
# special required libraries for particular architectures |
340 |
> |
if (-e ../suflag.txt) then |
341 |
> |
# Stanford users' required libs. |
342 |
|
if ($JSOC_MACHINE == "linux_x86_64") then |
343 |
|
if (!(-e lib_third_party/lib/linux_x86_64/libcfitsio_gcc.a)) then |
344 |
|
echo |
345 |
|
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libcfitsio_gcc.a" |
346 |
|
set TPWARN = 1 |
347 |
|
endif |
348 |
+ |
if (!(-e lib_third_party/lib/linux_x86_64/libfftw3f.a)) then |
349 |
+ |
echo |
350 |
+ |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libfftw3f.a" |
351 |
+ |
set TPWARN = 1 |
352 |
+ |
endif |
353 |
|
if (!(-e lib_third_party/lib/linux_x86_64/libgsl.a)) then |
354 |
|
echo |
355 |
|
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libgsl.a" |
363 |
|
endif |
364 |
|
|
365 |
|
if ($JSOC_MACHINE == "linux_ia32") then |
366 |
+ |
if (!(-e lib_third_party/lib/linux_ia32/libfftw3f.a)) then |
367 |
+ |
echo |
368 |
+ |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libfftw3f.a" |
369 |
+ |
set TPWARN = 1 |
370 |
+ |
endif |
371 |
|
if (!(-e lib_third_party/lib/linux_ia32/libgsl.a)) then |
372 |
|
echo |
373 |
|
echo "Can't find required library: lib_third_party/lib/linux_ia32/libgsl.a" |
380 |
|
endif |
381 |
|
endif |
382 |
|
|
383 |
< |
if ($JSOC_MACHINE == "mac_osx_ppc") then |
384 |
< |
endif |
385 |
< |
|
386 |
< |
if ($JSOC_MACHINE == "mac_osx_ia32") then |
383 |
> |
if ($JSOC_MACHINE == "mac_osx") then |
384 |
> |
if (!(-e lib_third_party/lib/mac_osx/libfftw3f.a)) then |
385 |
> |
echo |
386 |
> |
echo "Can't find required library: lib_third_party/lib/mac_osx/libfftw3f.a" |
387 |
> |
set TPWARN = 1 |
388 |
> |
endif |
389 |
|
endif |
390 |
|
endif |
391 |
|
|
392 |
|
if ($TPWARN) then |
393 |
|
echo "Did you update config.local to create links to installed third-party libraries?" |
394 |
|
endif |
334 |
– |
|
335 |
– |
foreach CCTST (icc gcc cc) |
336 |
– |
set CCC = `which $CCTST` |
337 |
– |
if ($status) continue |
338 |
– |
echo "COMPILER = $CCC" >> custom.mk |
339 |
– |
break |
340 |
– |
end |
341 |
– |
|
342 |
– |
foreach CCTST (ifort gfortran g95) |
343 |
– |
set CCC = `which $CCTST` |
344 |
– |
if ($status) continue |
345 |
– |
echo "F77 = $CCC" >> custom.mk |
346 |
– |
break |
347 |
– |
end |
348 |
– |
|
349 |
– |
if (-e config.local) then |
350 |
– |
set PGPTH = `grep "^POSTGRES_INCS" config.local | awk '{print $2}'` |
351 |
– |
echo "PGIPATH = $PGPTH" >> custom.mk |
352 |
– |
endif |
353 |
– |
|
354 |
– |
# 2009/03/23 : jhourcle : fixing logic errors / simplifying code |
355 |
– |
# 2009/04/08 : jhourcle : cleaning up compiler assignment logic |
356 |
– |
# 2009/04/20 : rbogart : additional simplification |
357 |
– |
|