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 if (-d ../JSOC.LOCAL) then
80 cd src/proj
81 ln -sf ../../../JSOC.LOCAL/configure configure
82 ln -sf ../../../JSOC.LOCAL/make_basic.mk make_basic.mk
83 ln -sf ../../../JSOC.LOCAL/Rules.mk Rules.mk
84 ln -sf ../../../JSOC.LOCAL/target.mk target.mk
85 cd ../..
86 endif
87 echo "done"
88
|
89 arta 1.1 echo -n "Setting links to man pages..."
90 if (!(-d man/man1)) then
91 mkdir -p man/man1
92 endif
93 if (!(-d man/man3)) then
94 mkdir -p man/man3
95 endif
96 cd man/man1
|
97 arta 1.2 find ../.. -path '../../man/man1' -prune -o -path '*/man/man1/*.1' -exec ln -s {} . \;
|
98 arta 1.1 cd ../../man/man3
|
99 arta 1.2 find ../.. -path '../../man/man3' -prune -o -path '*/man/man3/*.3' -exec ln -s {} . \;
|
100 arta 1.1 cd ../..
101 echo "done"
102
103 echo "Setting links to headers..."
104 if (!(-d src/base/include)) then
105 mkdir -p src/base/include
106 endif
107 cd src/base/include
108 find .. -path '../include' -prune -o -name \*.h \( \( -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o -exec echo " " {} " ERROR - couldn't create link" \; \)
109 cd ../../..
110 echo "done"
111 echo
112
113 echo "Setting links to scripts..."
114 if (!(-d scripts)) then
115 mkdir scripts
116 endif
117 cd scripts
|
118 arta 1.3
119 # Sums scripts
120 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" \;
121
122 # Util scripts
123 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" \;
124
|
125 arta 1.4 # Project-specific scripts - these won't show up if you don't have the project source.
126 if (-x ../src/proj/configure) then
127 ../src/proj/configure
128 endif
|
129 arta 1.3
|
130 arta 1.1 cd ..
131 echo "done"
132 echo
133
134 echo "Setting links to jsds..."
135 if (!(-d jsds)) then
136 mkdir jsds
137 endif
138 cd jsds
139 find ../src/base \( -name \*.jsd -exec ln -s {} . \; -a -exec echo " " {} " OK" \; \) -o \( -name \*.jsd -exec echo " " {} " ERROR - couldn't create link" \; \)
140 cd ..
141 echo "done"
142 echo
143
144 # generate links for DSDS/SOI dynamic libraries - only do this if
145 # user's environment has access to /home/soi/CM
146 if (-d /home/soi/CM/include && -d /home/soi/CM/src) then
147 if (-x src/base/local/libs/dsds/scripts/genlinks.csh) then
148 src/base/local/libs/dsds/scripts/genlinks.csh
149 endif
150
151 arta 1.1 if (-x src/base/local/libs/soi/scripts/genlinks.csh) then
152 src/base/local/libs/soi/scripts/genlinks.csh
153 endif
154 endif
155 endif
156 endif
157
158 # Enter required library names and versions here.
159 if ($CHKLIBS == "yes") then
160
161 echo
162 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."
163 echo
164 echo "Example:"
165 echo " cd $JSOCROOT/lib_third_party/"
166 echo " ln -s /usr/local/include include"
167 echo " cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/"
168 echo " ln -s /usr/local/lib/libfftw3f.a libfftw3f.a "
169 echo
170 echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007"
171 echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv"
172 arta 1.1
173 # echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld"
174 # echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld"
175 # if ($JSOC_MACHINE == "linux_x86_64") then
176 # echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld"
177 # else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld"
178 # endif
179
180
181 endif
|