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