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