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 echo -n "Remove links to man pages..."
19 if (-d man/man1) then
20 cd man/man1
21 rm -f *.*
22 arta 1.1 cd ../..
23 endif
24 if (-d man/man3) then
25 cd man/man3
26 rm -f *.*
27 cd ../..
28 endif
29 echo "done"
30
31 echo -n "Removing links to headers..."
32 if (-d src/base/include) then
33 cd src/base/include
34 rm -f *.h
35 cd ../../..
36 endif
37 echo "done"
38
39 echo -n "Removing links to scripts..."
40 if (-d scripts) then
41 cd scripts
42 rm -f *
43 arta 1.1 cd ..
44 endif
45 echo "done"
46
47 echo -n "Removing links to jsds..."
48 if (-d jsds) then
49 cd jsds
50 rm -f *
51 cd ..
52 endif
53 echo "done"
54
55 echo
56
57 if ($CLEAN == "yes") then
58
59 if (-x src/base/local/libs/dsds/scripts/rmlinks.csh) then
60 src/base/local/libs/dsds/scripts/rmlinks.csh
61 endif
62
63 if (-x src/base/local/libs/soi/scripts/rmlinks.csh) then
64 arta 1.1 src/base/local/libs/soi/scripts/rmlinks.csh
65 endif
66 else
67 echo -n "Setting links to man pages..."
68 if (!(-d man/man1)) then
69 mkdir -p man/man1
70 endif
71 if (!(-d man/man3)) then
72 mkdir -p man/man3
73 endif
74 cd man/man1
75 find ../.. -path '../../man/man1' -prune -o -path '*/man/man1/*' -exec ln -s {} . \;
76 cd ../../man/man3
77 find ../.. -path '../../man/man3' -prune -o -path '*/man/man3/*' -exec ln -s {} . \;
78 cd ../..
79 echo "done"
80
81 echo "Setting links to headers..."
82 if (!(-d src/base/include)) then
83 mkdir -p src/base/include
84 endif
85 arta 1.1 cd src/base/include
86 find .. -path '../include' -prune -o -name \*.h \( \( -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o -exec echo " " {} " ERROR - couldn't create link" \; \)
87 cd ../../..
88 echo "done"
89 echo
90
91 echo "Setting links to scripts..."
92 if (!(-d scripts)) then
93 mkdir scripts
94 endif
95 cd scripts
96 find ../src/base/sums/scripts -mindepth 1 \( -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o -exec echo " " {} " ERROR - couldn't create link" \;
97 cd ..
98 echo "done"
99 echo
100
101 echo "Setting links to jsds..."
102 if (!(-d jsds)) then
103 mkdir jsds
104 endif
105 cd jsds
106 arta 1.1 find ../src/base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o \( -name \*.jsd -exec echo " " {} " ERROR - couldn't create link" \; \)
107 cd ..
108 echo "done"
109 echo
110
111 # generate links for DSDS/SOI dynamic libraries - only do this if
112 # user's environment has access to /home/soi/CM
113 if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
114 if (-x src/base/local/libs/dsds/scripts/genlinks.csh) then
115 src/base/local/libs/dsds/scripts/genlinks.csh
116 endif
117
118 if (-x src/base/local/libs/soi/scripts/genlinks.csh) then
119 src/base/local/libs/soi/scripts/genlinks.csh
120 endif
121 endif
122 endif
123 endif
124
125 # Enter required library names and versions here.
126 if ($CHKLIBS == "yes") then
127 arta 1.1
128 echo
129 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."
130 echo
131 echo "Example:"
132 echo " cd $JSOCROOT/lib_third_party/"
133 echo " ln -s /usr/local/include include"
134 echo " cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
135 echo " ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
136 echo
137 echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
138 echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
139
140 # echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
141 # echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
142 # if ($JSOC_MACHINE == "linux_x86_64") then
143 # echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
144 # else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
145 # endif
146
147
148 arta 1.1 endif
|