source: branches/port5/SOURCE_TOOLS/generate_all_links.sh

Last change on this file was 6521, checked in by westram, 15 years ago
  • added COMPILE_ASSERT
  • assert correct pointersizes for PT-server
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 12.4 KB
Line 
1#!/bin/bash
2
3SELF=$ARBHOME/SOURCE_TOOLS/generate_all_links.sh
4
5finderr() {
6    FOUND=`grep -Hn "$1" $SELF`
7    if [ -z $FOUND ]; then
8        echo "$SELF:8: $2 ($1 not located -- search manually)"
9    else
10        echo "$FOUND $2"
11    fi
12    false
13}
14
15symlink_maybe_no_target() {
16    test -h $2 || ln -sf $1 $2 || finderr $2 "Failed to link '$1->$2'"
17}
18
19symlink() {
20    if [ -z $2 ]; then
21        if [ -z $1 ]; then
22            echo "$SELF:22: Missing arguments in call to symlink()"
23            exit 1
24        else
25            finderr $1 "Second argument missing in call to symlink()"
26            exit 1
27        fi
28    fi
29
30    DIR=`dirname $2`
31    if [ -z $DIR ]; then
32        DIR=.
33    fi
34
35    (test -e $DIR/$1 || finderr $1 "Target '$DIR/$1 does not exists (anymore)" ) &&
36    (test -e $2 || (test -h $2 &&
37                    (finderr $2 "Warning Symlink '$2' points to nowhere -- removing wrong link";ls -al $2;rm $2;true)
38                    ) || true) &&
39    symlink_maybe_no_target $1 $2
40}
41
42arbdb_symlink() {
43    symlink ../ARBDB/$1 ARBDBS/$1 &&
44    symlink ../ARBDB/$1 ARBDB2/$1
45}
46
47makedir() {
48    mkdir -p $1 || finderr $1 "Failed to create directory '$1'"
49}
50
51# Generates some directories as well:
52makedir INCLUDE &&
53makedir INCLUDE/GL &&
54
55makedir NAMES_COM/GENC &&
56makedir NAMES_COM/GENH &&
57makedir NAMES_COM/O &&
58
59makedir PROBE_COM/GENC &&
60makedir PROBE_COM/GENH &&
61makedir PROBE_COM/O &&
62
63makedir LIBLINK &&
64makedir MAKEBIN &&
65makedir lib/help &&
66
67(test -d lib/pts || makedir lib/pts) &&
68
69# Liblink
70
71# symlink ../ARBDB/libARBDB.sl LIBLINK/libARBDB.sl
72symlink_maybe_no_target ../ARBDB/libARBDB.so LIBLINK/libARBDB.so &&
73symlink_maybe_no_target ../ARBDB/libARBDB.so.2.0 LIBLINK/libARBDB.so.2.0 &&
74symlink_maybe_no_target ../ARBDB2/libARBDB.a LIBLINK/libARBDO.a &&
75# symlink ../ARBDB2/libARBDB.sl LIBLINK/libARBDO.sl
76symlink_maybe_no_target ../ARBDB2/libARBDB.so LIBLINK/libARBDO.so &&
77symlink_maybe_no_target ../ARBDB2/libARBDB.so.2.0 LIBLINK/libARBDO.so.2.0 &&
78symlink_maybe_no_target ../ARBDBPP/libARBDBPP.a LIBLINK/libARBDBPP.a &&
79# symlink ../ARBDBPP/libARBDBPP.sl LIBLINK/libARBDBPP.sl
80symlink_maybe_no_target ../ARBDBPP/libARBDBPP.so LIBLINK/libARBDBPP.so &&
81symlink_maybe_no_target ../ARBDBPP/libARBDBPP.so.2.0 LIBLINK/libARBDBPP.so.2.0 &&
82symlink_maybe_no_target ../ARBDBS/libARBDB.a LIBLINK/libARBDB.a &&
83symlink_maybe_no_target ../AWT/libAWT.a LIBLINK/libAWT.a &&
84# symlink ../AWT/libAWT.sl LIBLINK/libAWT.sl
85symlink_maybe_no_target ../AWT/libAWT.so LIBLINK/libAWT.so &&
86symlink_maybe_no_target ../AWT/libAWT.so.2.0 LIBLINK/libAWT.so.2.0 &&
87symlink_maybe_no_target ../WINDOW/libAW.a LIBLINK/libAW.a &&
88# symlink ../WINDOW/libAW.sl LIBLINK/libAW.sl
89symlink_maybe_no_target ../WINDOW/libAW.so LIBLINK/libAW.so &&
90symlink_maybe_no_target ../WINDOW/libAW.so.2.0 LIBLINK/libAW.so.2.0 &&
91
92# Motif stuff
93(test -z $MOTIF_LIBPATH || symlink $MOTIF_LIBPATH LIBLINK/libXm.so.3) &&
94
95# Links in bin directory
96( cd bin ; make all; cd .. ) &&
97
98# ...COMS
99
100symlink ../AISC_COM/AISC          NAMES_COM/AISC &&
101symlink ../AISC_COM/C             NAMES_COM/C &&
102
103symlink_maybe_no_target GENH/aisc_com.h           NAMES_COM/names_client.h &&
104symlink_maybe_no_target GENH/aisc_server_proto.h  NAMES_COM/names_prototypes.h &&
105symlink_maybe_no_target GENH/aisc.h               NAMES_COM/names_server.h &&
106
107symlink ../AISC_COM/AISC          PROBE_COM/AISC &&
108symlink ../AISC_COM/C             PROBE_COM/C &&
109
110symlink_maybe_no_target GENH/aisc_com.h           PROBE_COM/PT_com.h &&
111symlink_maybe_no_target GENH/aisc_server_proto.h  PROBE_COM/PT_server_prototypes.h &&
112symlink_maybe_no_target GENH/aisc.h               PROBE_COM/PT_server.h &&
113
114# TEMPLATES directory
115
116symlink ../TEMPLATES/SIG_PF.h INCLUDE/SIG_PF.h &&
117symlink ../TEMPLATES/arb_debug.h INCLUDE/arb_debug.h &&
118symlink ../TEMPLATES/arb_version.h INCLUDE/arb_version.h &&
119symlink ../TEMPLATES/arbtools.h INCLUDE/arbtools.h &&
120symlink ../TEMPLATES/attributes.h INCLUDE/attributes.h &&
121symlink ../TEMPLATES/config_parser.h INCLUDE/config_parser.h &&
122symlink ../TEMPLATES/inline.h INCLUDE/inline.h &&
123symlink ../TEMPLATES/output.h INCLUDE/output.h &&
124symlink ../TEMPLATES/perf_timer.h INCLUDE/perf_timer.h &&
125symlink ../TEMPLATES/smartptr.h INCLUDE/smartptr.h &&
126symlink ../TEMPLATES/static_assert.h INCLUDE/static_assert.h &&
127
128symlink_maybe_no_target ../TEMPLATES/arb_build.h INCLUDE/arb_build.h &&
129symlink_maybe_no_target ../TEMPLATES/svn_revision.h INCLUDE/svn_revision.h &&
130
131# INCLUDE directory
132
133symlink_maybe_no_target ../NAMES_COM/names_client.h         INCLUDE/names_client.h &&
134symlink_maybe_no_target ../NAMES_COM/names_prototypes.h     INCLUDE/names_prototypes.h &&
135symlink_maybe_no_target ../NAMES_COM/names_server.h         INCLUDE/names_server.h &&
136
137symlink_maybe_no_target ../PROBE_COM/PT_com.h               INCLUDE/PT_com.h &&
138symlink_maybe_no_target ../PROBE_COM/PT_server.h            INCLUDE/PT_server.h &&
139symlink_maybe_no_target ../PROBE_COM/PT_server_prototypes.h INCLUDE/PT_server_prototypes.h &&
140
141symlink ../AISC_COM/C/aisc_func_types.h INCLUDE/aisc_func_types.h &&
142symlink ../AISC_COM/C/client.h INCLUDE/client.h &&
143symlink ../AISC_COM/C/client_privat.h INCLUDE/client_privat.h &&
144symlink ../AISC_COM/C/server.h INCLUDE/server.h &&
145symlink ../AISC_COM/C/struct_man.h INCLUDE/struct_man.h &&
146symlink ../AISC_COM/C/aisc_global.h INCLUDE/aisc_global.h &&
147symlink ../ARBDB/adGene.h INCLUDE/adGene.h &&
148symlink ../ARBDB/ad_prot.h INCLUDE/ad_prot.h &&
149symlink ../ARBDB/ad_config.h INCLUDE/ad_config.h &&
150symlink ../ARBDB/ad_t_prot.h INCLUDE/ad_t_prot.h &&
151symlink ../ARBDB/ad_k_prot.h INCLUDE/ad_k_prot.h &&
152symlink ../ARBDB/arb_assert.h INCLUDE/arb_assert.h &&
153symlink ../ARBDB/arbdb.h INCLUDE/arbdb.h &&
154symlink ../ARBDB/arbdb_base.h INCLUDE/arbdb_base.h &&
155symlink ../ARBDB/arbdbt.h INCLUDE/arbdbt.h &&
156symlink ../ARBDBPP/adtools.hxx INCLUDE/adtools.hxx &&
157symlink ../ARBDBPP/arbdb++.hxx INCLUDE/arbdb++.hxx &&
158symlink ../ARB_GDE/gde.hxx INCLUDE/gde.hxx &&
159symlink ../AWT/awt.hxx INCLUDE/awt.hxx &&
160symlink ../AWT/awt_advice.hxx INCLUDE/awt_advice.hxx &&
161symlink ../AWT/awt_asciiprint.hxx INCLUDE/awt_asciiprint.hxx &&
162symlink ../AWT/awt_attributes.hxx INCLUDE/awt_attributes.hxx &&
163symlink ../AWT/awt_canvas.hxx INCLUDE/awt_canvas.hxx &&
164symlink ../AWT/awt_codon_table.hxx INCLUDE/awt_codon_table.hxx &&
165symlink ../AWT/awt_config_manager.hxx INCLUDE/awt_config_manager.hxx &&
166symlink ../AWT/awt_csp.hxx INCLUDE/awt_csp.hxx &&
167symlink ../AWT/awt_dtree.hxx INCLUDE/awt_dtree.hxx &&
168symlink ../AWT/awt_hotkeys.hxx INCLUDE/awt_hotkeys.hxx &&
169symlink ../AWT/awt_input_mask.hxx INCLUDE/awt_input_mask.hxx &&
170symlink ../AWT/awt_item_sel_list.hxx INCLUDE/awt_item_sel_list.hxx &&
171symlink ../AWT/awt_iupac.hxx INCLUDE/awt_iupac.hxx &&
172symlink ../AWT/awt_macro.hxx INCLUDE/awt_macro.hxx &&
173symlink ../AWT/awt_map_key.hxx INCLUDE/awt_map_key.hxx &&
174symlink ../AWT/awt_nds.hxx INCLUDE/awt_nds.hxx &&
175symlink ../AWT/awt_preset.hxx INCLUDE/awt_preset.hxx &&
176symlink ../AWT/awt_pro_a_nucs.hxx INCLUDE/awt_pro_a_nucs.hxx &&
177symlink ../AWT/awt_sel_boxes.hxx INCLUDE/awt_sel_boxes.hxx &&
178symlink ../AWT/awt_seq_colors.hxx INCLUDE/awt_seq_colors.hxx &&
179symlink ../AWT/awt_seq_dna.hxx INCLUDE/awt_seq_dna.hxx &&
180symlink ../AWT/awt_seq_protein.hxx INCLUDE/awt_seq_protein.hxx &&
181symlink ../AWT/awt_seq_simple_pro.hxx INCLUDE/awt_seq_simple_pro.hxx &&
182symlink ../AWT/awt_translate.hxx INCLUDE/awt_translate.hxx &&
183symlink ../AWT/awt_tree.hxx INCLUDE/awt_tree.hxx &&
184symlink ../AWT/awt_tree_cb.hxx INCLUDE/awt_tree_cb.hxx &&
185symlink ../AWT/awt_tree_cmp.hxx INCLUDE/awt_tree_cmp.hxx &&
186symlink ../AWT/awt_www.hxx INCLUDE/awt_www.hxx &&
187symlink ../AWT/awtlocal.hxx INCLUDE/awtlocal.hxx &&
188symlink ../AWTC/awtc_constructSequence.hxx INCLUDE/awtc_constructSequence.hxx &&
189symlink ../AWTC/awtc_next_neighbours.hxx INCLUDE/awtc_next_neighbours.hxx &&
190symlink ../AWTC/awtc_seq_search.hxx INCLUDE/awtc_seq_search.hxx &&
191symlink ../AWTC/awtc_submission.hxx INCLUDE/awtc_submission.hxx &&
192symlink ../AWTI/awti_export.hxx INCLUDE/awti_export.hxx &&
193symlink ../AWTI/awti_import.hxx INCLUDE/awti_import.hxx &&
194symlink ../BUGEX/bugex.h INCLUDE/bugex.h &&
195symlink ../CONSENSUS_TREE/CT_ctree.hxx INCLUDE/CT_ctree.hxx &&
196symlink ../DIST/dist.hxx INCLUDE/dist.hxx &&
197symlink ../EDIT4/ed4_extern.hxx INCLUDE/ed4_extern.hxx &&
198symlink ../GENOM/EXP.hxx INCLUDE/EXP.hxx &&
199symlink ../GENOM/GEN.hxx INCLUDE/GEN.hxx &&
200symlink ../GENOM_IMPORT/GenomeImport.h INCLUDE/GenomeImport.h &&
201symlink ../ISLAND_HOPPING/island_hopping.h INCLUDE/island_hopping.h &&
202symlink ../MERGE/mg_merge.hxx INCLUDE/mg_merge.hxx &&
203symlink ../NTREE/ntree.hxx INCLUDE/ntree.hxx &&
204symlink ../PRIMER_DESIGN/primer_design.hxx INCLUDE/primer_design.hxx &&
205symlink ../PROBE_DESIGN/probe_design.hxx INCLUDE/probe_design.hxx &&
206symlink ../SECEDIT/secedit_extern.hxx INCLUDE/secedit_extern.hxx &&
207symlink ../SERVERCNTRL/servercntrl.h INCLUDE/servercntrl.h &&
208symlink ../SEQ_QUALITY/seq_quality.h INCLUDE/seq_quality.h &&
209symlink ../SL/AW_HELIX/AW_helix.hxx INCLUDE/AW_helix.hxx &&
210symlink ../SL/AW_NAME/AW_rename.hxx INCLUDE/AW_rename.hxx &&
211symlink ../SL/DB_SCANNER/db_scanner.hxx INCLUDE/db_scanner.hxx &&
212symlink ../SL/FAST_ALIGNER/fast_aligner.hxx INCLUDE/fast_aligner.hxx &&
213symlink ../SL/FILE_BUFFER/FileBuffer.h INCLUDE/FileBuffer.h &&
214symlink ../SL/HELIX/BI_helix.hxx INCLUDE/BI_helix.hxx &&
215symlink ../SL/REGEXPR/RegExpr.hxx INCLUDE/RegExpr.hxx &&
216symlink ../SL/TREE_READ/TreeRead.h INCLUDE/TreeRead.h &&
217symlink ../SL/TREE_WRITE/TreeWrite.h INCLUDE/TreeWrite.h &&
218symlink ../STAT/st_window.hxx INCLUDE/st_window.hxx &&
219symlink ../WINDOW/aw_awars.hxx INCLUDE/aw_awars.hxx &&
220symlink ../WINDOW/aw_color_groups.hxx INCLUDE/aw_color_groups.hxx &&
221symlink ../WINDOW/aw_device.hxx INCLUDE/aw_device.hxx &&
222symlink ../WINDOW/aw_global_awars.hxx INCLUDE/aw_global_awars.hxx &&
223symlink ../WINDOW/aw_keysym.hxx INCLUDE/aw_keysym.hxx &&
224symlink ../WINDOW/aw_position.hxx INCLUDE/aw_position.hxx &&
225symlink ../WINDOW/aw_preset.hxx INCLUDE/aw_preset.hxx &&
226symlink ../WINDOW/aw_question.hxx INCLUDE/aw_question.hxx &&
227symlink ../WINDOW/aw_root.hxx INCLUDE/aw_root.hxx &&
228symlink ../WINDOW/aw_window.hxx INCLUDE/aw_window.hxx &&
229symlink ../WINDOW/aw_global.hxx INCLUDE/aw_global.hxx &&
230symlink ../WINDOW/aw_window_Xm_interface.hxx INCLUDE/aw_window_Xm_interface.hxx &&
231symlink ../WINDOW/aw_font_group.hxx INCLUDE/aw_font_group.hxx &&
232symlink ../XML/xml.hxx INCLUDE/xml.hxx &&
233
234# gl stuff
235symlink ../../GL/glpng/glpng.h INCLUDE/GL/glpng.h &&
236symlink ../../GL/glAW/aw_window_ogl.hxx INCLUDE/GL/aw_window_ogl.hxx &&
237
238# arbdb dirs
239
240arbdb_symlink AD_MOBJECTS.h &&
241arbdb_symlink adChangeKey.c &&
242arbdb_symlink adExperiment.c &&
243arbdb_symlink adGene.c &&
244arbdb_symlink adGene.h &&
245arbdb_symlink adRevCompl.c &&
246arbdb_symlink adTest.c &&
247arbdb_symlink ad_config.c &&
248arbdb_symlink ad_config.h &&
249arbdb_symlink ad_core.c &&
250arbdb_symlink ad_load.c &&
251arbdb_symlink ad_lpro.h &&
252arbdb_symlink ad_prot.h &&
253arbdb_symlink ad_save_load.c &&
254arbdb_symlink ad_t_lpro.h &&
255arbdb_symlink ad_t_prot.h &&
256arbdb_symlink adcomm.c &&
257arbdb_symlink adcompr.c &&
258arbdb_symlink adhash.c &&
259arbdb_symlink adhashtools.c &&
260arbdb_symlink adindex.c &&
261arbdb_symlink adlang1.c &&
262arbdb_symlink adlink.c &&
263arbdb_symlink adlmacros.h &&
264arbdb_symlink adlocal.h &&
265arbdb_symlink adlundo.h &&
266arbdb_symlink admalloc.c &&
267arbdb_symlink admap.c &&
268arbdb_symlink admap.h &&
269arbdb_symlink admatch.c &&
270arbdb_symlink admath.c &&
271arbdb_symlink adoptimize.c &&
272arbdb_symlink adperl.c &&
273arbdb_symlink adquery.c &&
274arbdb_symlink adseqcompr.c &&
275arbdb_symlink adsocket.c &&
276arbdb_symlink adsort.c &&
277arbdb_symlink adstring.c &&
278arbdb_symlink adsystem.c &&
279arbdb_symlink adtables.c &&
280arbdb_symlink adtcp.c &&
281arbdb_symlink adtools.c &&
282arbdb_symlink adali.c &&
283arbdb_symlink adcolumns.c &&
284arbdb_symlink adtree.c &&
285arbdb_symlink adname.c &&
286arbdb_symlink aditem.c &&
287arbdb_symlink adtune.c &&
288arbdb_symlink adtune.h &&
289arbdb_symlink arbdb.c &&
290arbdb_symlink arbdb.h &&
291arbdb_symlink arbdbpp.cxx &&
292arbdb_symlink arbdbt.h &&
293
294# small dirs
295
296symlink ../WINDOW/AW_preset.cxx AWT/AWT_preset.cxx &&
297symlink ../WINDOW/aw_def.hxx AWT/aw_def.hxx &&
298
299symlink ../EDIT/edit_naligner.cxx EDIT4/edit_naligner.cxx &&
300symlink ../EDIT/edit_naligner.hxx EDIT4/edit_naligner.hxx &&
301
302symlink ../LIBLINK          NALIGNER/LIBLINK &&
303
304symlink ../LIBLINK          TOOLS/LIBLINK &&
305
306symlink_maybe_no_target ../AISC/aisc             MAKEBIN/aisc &&
307symlink_maybe_no_target ../AISC_MKPTPS/aisc_mkpt MAKEBIN/aisc_mkpt &&
308
309# help files (make sure the file is present in user distribution!)
310
311symlink_maybe_no_target ../help/input_mask_format.hlp     lib/inputMasks/format.readme &&
312symlink ../../GDEHELP                     lib/help/GDEHELP &&
313
314echo "generate_all_links.sh done."
Note: See TracBrowser for help on using the repository browser.