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 if (-d src/proj) then
20 cd src/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.5 cd ../..
34 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 if (-d src/base/include) then
52 cd src/base/include
|
53 arta 1.8 find . -name "*.h" -exec rm {} \;
|
54 arta 1.1 cd ../../..
55 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 if (-x src/base/local/libs/dsds/scripts/rmlinks.csh) then
79 src/base/local/libs/dsds/scripts/rmlinks.csh
80 endif
81
82 if (-x src/base/local/libs/soi/scripts/rmlinks.csh) then
83 src/base/local/libs/soi/scripts/rmlinks.csh
84 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.7 cd src/proj
|
89 arta 1.6 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 arta 1.7 cd ../..
|
94 arta 1.6 else
|
95 arta 1.7 cd src/proj
|
96 arta 1.6 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 arta 1.7 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 if (!(-d src/base/include)) then
120 mkdir -p src/base/include
121 endif
122 cd src/base/include
123 find .. -path '../include' -prune -o -name \*.h \( \( -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o -exec echo " " {} " ERROR - couldn't create link" \; \)
124 cd ../../..
125 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 find ../src/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
137 # Util scripts
138 find ../src/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
|
140 arta 1.4 # Project-specific scripts - these won't show up if you don't have the project source.
141 if (-x ../src/proj/configure) then
142 ../src/proj/configure
143 endif
|
144 arta 1.3
|
145 arta 1.1 cd ..
146 echo "done"
147 echo
148
149 echo "Setting links to jsds..."
150 if (!(-d jsds)) then
151 mkdir jsds
152 endif
153 cd jsds
154 find ../src/base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o \( -name \*.jsd -exec echo " " {} " ERROR - couldn't create link" \; \)
155 cd ..
156 echo "done"
157 echo
158
159 # generate links for DSDS/SOI dynamic libraries - only do this if
160 # user's environment has access to /home/soi/CM
161 if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
162 if (-x src/base/local/libs/dsds/scripts/genlinks.csh) then
163 src/base/local/libs/dsds/scripts/genlinks.csh
164 endif
165
166 arta 1.1 if (-x src/base/local/libs/soi/scripts/genlinks.csh) then
167 src/base/local/libs/soi/scripts/genlinks.csh
168 endif
169 endif
170 endif
171 endif
172
173 # Enter required library names and versions here.
174 if ($CHKLIBS == "yes") then
175
176 echo
177 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."
178 echo
179 echo "Example:"
180 echo " cd $JSOCROOT/lib_third_party/"
181 echo " ln -s /usr/local/include include"
182 echo " cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
183 echo " ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
184 echo
185 echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
186 echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
187 arta 1.1
188 # echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
189 # echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
190 # if ($JSOC_MACHINE == "linux_x86_64") then
191 # echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
192 # else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
193 # endif
194
195
196 endif
|