Debian Codegraph @

dist/s_vxworks

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`. -
2 # $Id$
3 #
4 # Build the VxWorks files.
5
6 msgc="/* DO NOT EDIT: automatically built by dist/s_vxworks. */"
7
8 . ./RELEASEscip-shell source . . `./RELEASE`.
9
10 s=/tmp/__db_ascip-shell filesystem . . `/tmp/__db_a`.
11 t=/tmp/__db_bscip-shell filesystem . . `/tmp/__db_b`.
12 u=/tmp/__db_cscip-shell filesystem . . `/tmp/__db_c`.
13 vxfilelist=/tmp/__db_dscip-shell filesystem . . `/tmp/__db_d`.
14 vxsmallfiles=/tmp/__db_escip-shell filesystem . . `/tmp/__db_e`.
15
16 trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 0' 0
17 trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 1' 1 2 3 13 15
18
19 # Build the VxWorks db.h.
20 catscip-shell system . . cat. <<ENDOFSEDTEXT > $s
21 /extern "C" {/{
22 n
23 n
24 i\\
25 \\
26 /* Tornado 2 does not provide a standard C pre-processor #define. */\\
27 #ifndef __vxworks\\
28 #define __vxworks\\
29 #endif
30 }
31 /@inttypes_h_decl@/d
32 /@stddef_h_decl@/d
33 /@stdint_h_decl@/d
34 /@unistd_h_decl@/d
35 s/@thread_h_decl@/#include <pthread.h>/
36 s/@u_int8_decl@/typedef unsigned char u_int8_t;/
37 /@int16_decl@/d
38 s/@u_int16_decl@/typedef unsigned short u_int16_t;/
39 /@int32_decl@/d
40 s/@u_int32_decl@/typedef unsigned int u_int32_t;/
41 s/@int64_decl@//
42 s/@u_int64_decl@/typedef unsigned long long u_int64_t;/
43 /@u_char_decl@/d
44 /@u_int_decl@/d
45 /@u_long_decl@/d
46 /@u_short_decl@/d
47 s/@uintmax_t_decl@/typedef unsigned long uintmax_t;/
48 s/@uintptr_t_decl@/typedef unsigned long uintptr_t;/
49 /@FILE_t_decl@/d
50 /@off_t_decl@/d
51 /@pid_t_decl@/d
52 /@size_t_decl@/d
53 /@ssize_t_decl@/d
54 /@time_t_decl@/d
55 s/@db_seq_decl@/typedef int db_seq_t;/
56 s/@db_threadid_t_decl@/typedef uintmax_t db_threadid_t;/
57 s/@DB_VERSION_FAMILY@/$DB_VERSION_FAMILY/
58 s/@DB_VERSION_RELEASE@/$DB_VERSION_RELEASE/
59 s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/
60 s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
61 s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
62 s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
63 s/@DB_VERSION_FULL_STRING@/"$DB_VERSION_FULL_STRING"/
64 s/@DB_VERSION_UNIQUE_NAME@//
65 s/@DB_CONST@//
66 s/@DB_PROTO1@/#undef __P/
67 s/@DB_PROTO2@/#define __P(protos) protos/
68 /@platform_header@/d
69 /@platform_footer@/d
70 ENDOFSEDTEXT
71 (echoscip-shell system . . echo. "$msgc" &&
72 sedscip-shell system . . sed. -f $s ../src/dbinc/db.in &&
73 catscip-shell system . . cat. ../src/dbinc_auto/api_flags.in &&
74 catscip-shell system . . cat. ../src/dbinc_auto/ext_prot.in) > $t
75 testscip-shell system . . test. `egrepscip-shell system . . egrep. '@.*@' $t` && {
76 egrepscip-shell system . . egrep. '@.*@' $t
77 echoscip-shell system . . echo. 'Unexpanded autoconf variables found in VxWorks db.h.'
78 exit 1
79 }
80 f=../build_vxworks/db.h
81 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
82 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
83
84 # Build the VxWorks db_cxx.h.
85 catscip-shell system . . cat. <<ENDOFSEDTEXT > $s
86 s/@cxx_have_stdheaders@/#define HAVE_CXX_STDHEADERS 1/
87 ENDOFSEDTEXT
88 (echoscip-shell system . . echo. "$msgc" && sedscip-shell system . . sed. -f $s ../src/dbinc/db_cxx.in) > $t
89 testscip-shell system . . test. `egrepscip-shell system . . egrep. '@.*@' $t` && {
90 egrepscip-shell system . . egrep. '@.*@' $t
91 echoscip-shell system . . echo. 'Unexpanded autoconf variables found in VxWorks db_cxx.h.'
92 exit 1
93 }
94 f=../build_vxworks/db_cxx.h
95 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
96 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
97
98 # Build the VxWorks db_int.h.
99 catscip-shell system . . cat. <<ENDOFSEDTEXT > $s
100 s/@DB_STRUCT_ALIGN8@//
101 s/@PATH_SEPARATOR@/\/\\\\\\\\/
102 s/@db_int_def@//
103 /#ifdef.*HAVE_SYSTEM_INCLUDE_FILES/i\\
104 #include "vxWorks.h"
105 /#endif.*HAVE_SYSTEM_INCLUDE_FILES/a\\
106 #include "clib_port.h"\\
107 #include "db.h"
108 ENDOFSEDTEXT
109 (echoscip-shell system . . echo. "$msgc" && sedscip-shell system . . sed. -f $s ../src/dbinc/db_int.in) > $t
110 testscip-shell system . . test. `egrepscip-shell system . . egrep. '@.*@' $t` && {
111 egrepscip-shell system . . egrep. '@.*@' $t
112 echoscip-shell system . . echo. 'Unexpanded autoconf variables found in VxWorks db_int.h.'
113 exit 1
114 }
115 f=../build_vxworks/db_int.h
116 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
117 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
118
119 # Build the VxWorks db_config.h.
120 # We don't fail, but we complain if the vx_config.in file isn't up-to-date.
121 check_configscip-shell shell db5.3 5.3.28+dfsg2-11 check_config().()
122 {
123 egrepscip-shell system . . egrep. '^#undef' config.hin | awkscip-shell system . . awk. '{print $2}' | sortscip-shell system . . sort. > $s
124 (egrepscip-shell system . . egrep. '#undef' $1 | awkscip-shell system . . awk. '{print $3}'
125 egrepscip-shell system . . egrep. '^#define' $1 | awkscip-shell system . . awk. '{print $2}') | sortscip-shell system . . sort. > $t
126 cmpscip-shell system . . cmp. $s $t > /dev/nullscip-shell filesystem . . `/dev/null`. || {
127 echoscip-shell system . . echo. "config.hin and $1 differ"
128 echoscip-shell system . . echo. "<<< config.hin >>> $1"
129 diffscip-shell system . . diff. $s $t
130 }
131 }
132 check_configscip-shell shell db5.3 5.3.28+dfsg2-11 check_config(). vx_config.in
133 f=../build_vxworks/db_config.h
134 (echoscip-shell system . . echo. "$msgc" && sedscip-shell system . . sed. "s/__EDIT_DB_VERSION__/$DB_VERSION/" vx_config.in) > $t
135 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
136 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
137
138 # Build the VxWorks db_config_small.h.
139 f=../build_vxworks/db_config_small.h
140 (echoscip-shell system . . echo. "$msgc" &&
141 sedscip-shell system . . sed. -e "s/__EDIT_DB_VERSION__/$DB_VERSION/" \
142 -e "s;^#define.*HAVE_CRYPTO.*1;/* #undef HAVE_CRYPTO */;" \
143 -e "s;^#define.*HAVE_HASH.*1;/* #undef HAVE_HASH */;" \
144 -e "s;^#define.*HAVE_QUEUE.*1;/* #undef HAVE_QUEUE */;" \
145 -e "s;^#define.*HAVE_REPLICATION.*1;/* #undef HAVE_REPLICATION */;" \
146 -e "s;^#define.*HAVE_STATISTICS.*1;/* #undef HAVE_STATISTICS */;" \
147 -e "s;^#define.*HAVE_VERIFY.*1;/* #undef HAVE_VERIFY */;" \
148 vx_config.in) > $t
149 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
150 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
151
152 # Build the VxWorks clib_port.h.
153 catscip-shell system . . cat. <<ENDOFSEDTEXT > $s
154 s/@INT64_FMT@/#define INT64_FMT "%lld"/
155 s/@UINT64_FMT@/#define UINT64_FMT "%llu"/
156 ENDOFSEDTEXT
157 sedscip-shell system . . sed. -f $s clib_port.in > $t
158 testscip-shell system . . test. `egrepscip-shell system . . egrep. '@.*@' $t` && {
159 egrepscip-shell system . . egrep. '@.*@' $t
160 echoscip-shell system . . echo. 'Unexpanded autoconf variables found in VxWorks clib_port.h.'
161 exit 1
162 }
163 f=../build_vxworks/clib_port.h
164 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
165 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
166
167 # Build a sed script that will change a "standard" DB utility into
168 # VxWorks-compatible code.
169 transformscip-shell shell db5.3 5.3.28+dfsg2-11 transform().()
170 {
171 # Build a sed script that will add argument parsing support and
172 # rename all of the functions to be private to this file.
173 catscip-shell system . . cat. <<ENDOFSEDTEXT
174 /^main(argc, argv)$/{
175 i\\
176 $1(args)\\
177 \\ char *args;\\
178 {\\
179 \\ int argc;\\
180 \\ char **argv;\\
181 \\
182 \\ __db_util_arg("$1", args, &argc, &argv);\\
183 \\ return ($1_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);\\
184 }\\
185 \\
186 #include <stdio.h>\\
187 #define ERROR_RETURN ERROR\\
188 \\
189 int\\
190 $1_main(argc, argv)
191 d
192 }
193 /^ while ((ch = getopt/i\\
194 \\ __db_getopt_reset = 1;
195 /^[ ]*extern int optind;/s/;/, __db_getopt_reset;/
196 ENDOFSEDTEXT
197
198 # Convert the ex_access sample into dbdemo for VxWorks.
199 echoscip-shell system . . echo. 's/progname = "ex_access";/progname = "dbdemo";/'
200
201 # The example programs have to load db_int.h, not db.h -- else
202 # they won't have the right Berkeley DB prototypes for getopt
203 # and friends.
204 echoscip-shell system . . echo. '/#include.*db.h/c\scip-shell filesystem . . `/#include.*db.h/c\`.'
205 echoscip-shell system . . echo. '#include <db_config.h>\'
206 echoscip-shell system . . echo. '#include <db_int.h>'
207
208 # Replace all function names with VxWorks safe names.
209 # Function names are:
210 # Tokens starting at the beginning of the line, immediately
211 # followed by an opening parenthesis.
212 # Replace:
213 # Matches preceded by a non-C-token character and immediately
214 # followed by an opening parenthesis.
215 # Matches preceded by a non-C-token character and immediately
216 # followed by " __P".
217 # Matches starting at the beginning of the line, immediately
218 # followed by an opening parenthesis.
219 # Matches tokens starting with a space and ending in a comma
220 # (i.e. ' token,') to cover cases where token is used in a
221 # procedure call. Sequence could occur in a comment line.
222 #
223 # Skip any line that starts with the name we're using as a prefix,
224 # it's a case we can't handle very well here, and it's been done by
225 # hand.
226 sedscip-shell system . . sed. \
227 -e "/^$1/d" \
228 -e 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)(.*$/\1/p' -e d > $u
229 for k in `catscip-shell system . . cat. $u`; do
230 catscip-shell system . . cat. <<ENDOFSEDTEXT
231 s/\([^a-zA-Z0-9_]\)\($k(\)/\1$1_\2/g
232 s/\([^a-zA-Z0-9_]\)\($k[ ]__P\)/\1$1_\2/g
233 s/^\($k(\)/$1_\1/g
234 s/\([ ]\)\($k,\)/\1$1_\2/g
235 ENDOFSEDTEXT
236 done
237 }
238
239 PROGRAM_LIST="\
240 db_archive
241 db_checkpoint
242 db_deadlock
243 db_dump
244 db_hotbackup
245 db_load
246 db_log_verify
247 db_printlog
248 db_recover
249 db_stat
250 db_tuner
251 db_upgrade
252 db_verify
253 ex_access
254 test_micro"
255
256 FILE_LIST="\
257 util/db_archive.c
258 util/db_checkpoint.c
259 util/db_deadlock.c
260 util/db_dump.c
261 util/db_hotbackup.c
262 util/db_load.c
263 util/db_printlog.c
264 util/db_recover.c
265 util/db_stat.c
266 util/db_tuner.c
267 util/db_upgrade.c
268 util/db_verify.c
269 util/db_log_verify.c
270 examples/c/ex_access.c
271 test/micro/source/b_curalloc.c
272 test/micro/source/b_curwalk.c
273 test/micro/source/b_del.c
274 test/micro/source/b_get.c
275 test/micro/source/b_inmem.c
276 test/micro/source/b_latch.c
277 test/micro/source/b_load.c
278 test/micro/source/b_open.c
279 test/micro/source/b_put.c
280 test/micro/source/b_recover.c
281 test/micro/source/b_txn.c
282 test/micro/source/b_txn_write.c
283 test/micro/source/b_uname.c
284 test/micro/source/b_util.c
285 test/micro/source/b_workload.c
286 test/micro/source/b_workload.h
287 test/micro/source/bench.h
288 test/micro/source/test_micro.c"
289
290 # Build VxWorks versions of the files.
291 for i in $FILE_LIST; do
292 # Lots of noise to transform random paths into VxWorks conventions.
293 case $i in
294 *ex_access*)
295 target=dbdemo/dbdemo.c
296 catscip-shell system . . cat. ../$i | transformscip-shell shell db5.3 5.3.28+dfsg2-11 transform(). dbdemo > $s
297 catscip-shell system . . cat. ../$i | sedscip-shell system . . sed. -f $s > $t;;
298 test\/micro*)
299 target=test/micro/`basenamescip-shell system . . basename. $i`
300 catscip-shell system . . cat. ../$i | transformscip-shell shell db5.3 5.3.28+dfsg2-11 transform(). `basenamescip-shell system . . basename. $i .c` > $s
301 catscip-shell system . . cat. ../$i | sedscip-shell system . . sed. -f $s > $t;;
302 *)
303 target="$i"
304 catscip-shell system . . cat. ../$i | transformscip-shell shell db5.3 5.3.28+dfsg2-11 transform(). `basenamescip-shell system . . basename. $i .c` > $s
305 catscip-shell system . . cat. ../$i | sedscip-shell system . . sed. -f $s > $t;;
306 esac
307
308 f=../build_vxworks/$target
309 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
310 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
311 done
312
313 # Output the build lines for a single utility.
314 # $1 == application name
315 util_onescip-shell shell db5.3 5.3.28+dfsg2-11 util_one().()
316 {
317 egrepscip-shell system . . egrep. "app=$1" srcfiles.in |
318 awkscip-shell system . . awk. '{print $1}' |
319 sedscip-shell system . . sed. 's/ex_access/dbdemo/' > $u
320
321 # Build a list of source files.
322 for i in `catscip-shell system . . cat. $u`; do
323 if testscip-shell system . . test. "$1" = "ex_access" -o "$1" = `basenamescip-shell system . . basename. $i .c`; then
324 i=`basenamescip-shell system . . basename. $i`
325 else
326 i="\$(PRJ_DIR)/../../$i"
327 fi
328 o="<BEGIN> FILE_$i"
329
330 echoscip-shell system . . echo. "${o}_dependDone"
331 echoscip-shell system . . echo. "FALSE"
332 echoscip-shell system . . echo. "<END>"
333 echoscip-shell system . . echo.
334 echoscip-shell system . . echo. "${o}_dependencies"
335 echoscip-shell system . . echo. "<END>"
336 echoscip-shell system . . echo.
337 echoscip-shell system . . echo. "${o}_objects"
338 echoscip-shell system . . echo. "`basenamescip-shell system . . basename. $i .c`.o"
339 echoscip-shell system . . echo. "<END>"
340 echoscip-shell system . . echo.
341 echoscip-shell system . . echo. "${o}_tool"
342 echoscip-shell system . . echo. "C/C++ compiler"
343 echoscip-shell system . . echo. "<END>"
344 echoscip-shell system . . echo.
345 done
346 echoscip-shell system . . echo. "<BEGIN> PROJECT_FILES"
347 for i in `catscip-shell system . . cat. $u`; do
348 if testscip-shell system . . test. "$1" = "ex_access" -o "$1" = `basenamescip-shell system . . basename. $i .c`; then
349 i="`basenamescip-shell system . . basename. $i`"
350 else
351 i="../../$i"
352 fi
353 echoscip-shell system . . echo. "\$(PRJ_DIR)/$i"
354 done |
355 sedscip-shell system . . sed. -e '${' \
356 -e 'p' \
357 -e 'd' \
358 -e '}' \
359 -e 's/$/ \\/'
360 echoscip-shell system . . echo. "<END>"
361 echoscip-shell system . . echo.
362 echoscip-shell system . . echo. "<BEGIN> userComments"
363 if testscip-shell system . . test. "$1" = "ex_access"; then
364 echoscip-shell system . . echo. "dbdemo"
365 else
366 echoscip-shell system . . echo. "$1"
367 fi
368 echoscip-shell system . . echo. "<END>"
369 }
370
371 # Build VxWorks Tornado 2.0 project files for the utilities.
372 for i in $PROGRAM_LIST; do
373 case $i in
374 ex_access)
375 target=dbdemo
376 outdir=dbdemo
377 ;;
378 db_*)
379 target=$i
380 outdir=util
381 ;;
382 test_micro)
383 target=$i
384 outdir=test/micro
385 ;;
386 *)
387 target=$i
388 outdir=$i
389 ;;
390 esac
391
392 (sedscip-shell system . . sed. -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in
393 util_onescip-shell shell db5.3 5.3.28+dfsg2-11 util_one(). $i) > $t
394 f=../build_vxworks/$outdir/${target}20.wpj
395 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
396 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
397
398 (sedscip-shell system . . sed. -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.2/wpj.in
399 util_onescip-shell shell db5.3 5.3.28+dfsg2-11 util_one(). $i) > $t
400 f=../build_vxworks/$outdir/${target}22.wpj
401 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
402 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
403 done
404
405 # Build the list of "normal build" files VxWorks knows about.
406 sedscip-shell system . . sed. -e '/^$/dscip-shell filesystem . . `/^$/d`.' -e '/^[ #]/dscip-shell filesystem . . `/^[ #]/d`.' srcfiles.in |
407 egrepscip-shell system . . egrep. -w vx |
408 sedscip-shell system . . sed. 's/[ ].*//' > $vxfilelist
409
410 # Build the list of "small build" files VxWorks knows about.
411 sedscip-shell system . . sed. -e '/^$/dscip-shell filesystem . . `/^$/d`.' -e '/^[ #]/dscip-shell filesystem . . `/^[ #]/d`.' srcfiles.in |
412 egrepscip-shell system . . egrep. -w vxsmall |
413 sedscip-shell system . . sed. 's/[ ].*//' > $vxsmallfiles
414
415 # Build VxWorks Tornado 2.0 project files for the library itself.
416 for v in 0 2 ; do
417 #
418 # Build regular project files
419 #
420 (catscip-shell system . . cat. vx_2.${v}/BerkeleyDB.wpj
421 for i in `catscip-shell system . . cat. $vxfilelist`; do
422 o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
423 echoscip-shell system . . echo. "${o}_dependDone"
424 echoscip-shell system . . echo. "TRUE"
425 echoscip-shell system . . echo. "<END>"
426 echoscip-shell system . . echo.
427 echoscip-shell system . . echo. "${o}_dependencies"
428 echoscip-shell system . . echo. "\$(PRJ_DIR)/db_config.h \\"
429 echoscip-shell system . . echo. " \$(PRJ_DIR)/db_int.h \\"
430 echoscip-shell system . . echo. " \$(PRJ_DIR)/db.h"
431 echoscip-shell system . . echo. "<END>"
432 echoscip-shell system . . echo.
433 echoscip-shell system . . echo. "${o}_objects"
434 echoscip-shell system . . echo. "`basenamescip-shell system . . basename. $i .c`.o"
435 echoscip-shell system . . echo. "<END>"
436 echoscip-shell system . . echo.
437 echoscip-shell system . . echo. "${o}_tool"
438 echoscip-shell system . . echo. "C/C++ compiler"
439 echoscip-shell system . . echo. "<END>"
440 echoscip-shell system . . echo.
441 done
442 echoscip-shell system . . echo. "<BEGIN> PROJECT_FILES"
443 sedscip-shell system . . sed. -e '$!s/$/ \\/' \
444 -e 's/^/$(PRJ_DIR)\/..\//' \
445 -e '1!s/^/ /' < $vxfilelist
446 echoscip-shell system . . echo. "<END>"
447 echoscip-shell system . . echo.
448 echoscip-shell system . . echo. "<BEGIN> userComments"
449 echoscip-shell system . . echo. "BerkeleyDB"
450 echoscip-shell system . . echo. "<END>") > $t
451 #
452 # Build small lib project files
453 #
454 (catscip-shell system . . cat. vx_2.${v}/BerkeleyDBsmall.wpj
455 for i in `catscip-shell system . . cat. $vxsmallfiles`; do
456 o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
457 echoscip-shell system . . echo. "${o}_dependDone"
458 echoscip-shell system . . echo. "TRUE"
459 echoscip-shell system . . echo. "<END>"
460 echoscip-shell system . . echo.
461 echoscip-shell system . . echo. "${o}_dependencies"
462 echoscip-shell system . . echo. "\$(PRJ_DIR)/db_config.h \\"
463 echoscip-shell system . . echo. " \$(PRJ_DIR)/db_int.h \\"
464 echoscip-shell system . . echo. " \$(PRJ_DIR)/db.h"
465 echoscip-shell system . . echo. "<END>"
466 echoscip-shell system . . echo.
467 echoscip-shell system . . echo. "${o}_objects"
468 echoscip-shell system . . echo. "`basenamescip-shell system . . basename. $i .c`.o"
469 echoscip-shell system . . echo. "<END>"
470 echoscip-shell system . . echo.
471 echoscip-shell system . . echo. "${o}_tool"
472 echoscip-shell system . . echo. "C/C++ compiler"
473 echoscip-shell system . . echo. "<END>"
474 echoscip-shell system . . echo.
475 done
476 echoscip-shell system . . echo. "<BEGIN> PROJECT_FILES"
477 sedscip-shell system . . sed. -e '$!s/$/ \\/' \
478 -e 's/^/$(PRJ_DIR)\/..\//' \
479 -e '1!s/^/ /' < $vxsmallfiles
480 echoscip-shell system . . echo. "<END>"
481 echoscip-shell system . . echo.
482 echoscip-shell system . . echo. "<BEGIN> userComments"
483 echoscip-shell system . . echo. "BerkeleyDB"
484 echoscip-shell system . . echo. "<END>") > $u
485 f=../build_vxworks/BerkeleyDB2${v}.wpj
486 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
487 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
488 f=../build_vxworks/BerkeleyDB2${v}small.wpj
489 cmpscip-shell system . . cmp. $u $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
490 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $u $f)
491 done
492
493 # vx6 --
494 # Generate a VxWorks 6.X Makefile.
495 #
496 # $1: list of files
497 vx6scip-shell shell db5.3 5.3.28+dfsg2-11 vx6().()
498 {
499 # Build VxWorks 6x Makefile.
500 catscip-shell system . . cat. vx_6/Makefile.1
501 echoscip-shell system . . echo.
502 sedscip-shell system . . sed. -e 's/\.c$//p' -e d < $1 > $s
503 for i in `catscip-shell system . . cat. $s`; do
504 sedscip-shell system . . sed. "s;__FILENAME__;$i;g" < vx_6/cfile
505 done
506 echoscip-shell system . . echo.
507 sedscip-shell system . . sed. -e 's/\.cpp$//p' -e d < $1 > $s
508 for i in `catscip-shell system . . cat. $s`; do
509 sedscip-shell system . . sed. "s;__FILENAME__;$i;g" < vx_6/cxxfile
510 done
511 echoscip-shell system . . echo.
512 sedscip-shell system . . sed. -e 's/\.c.*//' < $1 > $s
513 /bin/echoscip-shell filesystem . . `/bin/echo`. -n "OBJECTS_bdbvxw ="
514 sep=" \\"
515 for i in `catscip-shell system . . cat. $s`; do
516 echoscip-shell system . . echo. "$sep"
517 /bin/echoscip-shell filesystem . . `/bin/echo`. -n ' bdbvxw/$(MODE_DIR)/Objects/$(BDB_OBJECT_DIR)/'
518 /bin/echoscip-shell filesystem . . `/bin/echo`. -n "$i.o"
519 done
520 echoscip-shell system . . echo.
521 echoscip-shell system . . echo.
522 catscip-shell system . . cat. vx_6/Makefile.2
523 echoscip-shell system . . echo.
524 /bin/echoscip-shell filesystem . . `/bin/echo`. -n "DEP_FILES :="
525 for i in `catscip-shell system . . cat. $s`; do
526 echoscip-shell system . . echo. "$sep"
527 /bin/echoscip-shell filesystem . . `/bin/echo`. -n ' bdbvxw/$(MODE_DIR)/Objects/$(BDB_OBJECT_DIR)/'
528 /bin/echoscip-shell filesystem . . `/bin/echo`. -n "$i.d"
529 done
530 echoscip-shell system . . echo.
531 echoscip-shell system . . echo.
532 catscip-shell system . . cat. vx_6/Makefile.3
533 }
534
535 # Build the list of "normal build" files VxWorks 6x knows about -- it's
536 # the standard Vx list plus some additions.
537 sedscip-shell system . . sed. -e '/^$/dscip-shell filesystem . . `/^$/d`.' -e '/^[ #]/dscip-shell filesystem . . `/^[ #]/d`.' srcfiles.in |
538 egrepscip-shell system . . egrep. -w vx6 |
539 sedscip-shell system . . sed. 's/[ ].*//' >> $vxfilelist
540 vx6scip-shell shell db5.3 5.3.28+dfsg2-11 vx6(). $vxfilelist > $t
541 f=../build_vxworks/Makefile.6x
542 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
543 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)
544
545 # Build the list of "small build" files VxWorks 6x knows about -- it's
546 # the standard vxsmall list.
547 sedscip-shell system . . sed. -e '/^$/dscip-shell filesystem . . `/^$/d`.' -e '/^[ #]/dscip-shell filesystem . . `/^[ #]/d`.' srcfiles.in |
548 egrepscip-shell system . . egrep. -w vxsmall |
549 sedscip-shell system . . sed. 's/[ ].*//' >> $vxfilelist
550 vx6scip-shell shell db5.3 5.3.28+dfsg2-11 vx6(). $vxsmallfiles > $t
551 f=../build_vxworks/Makefile.6x.small
552 cmpscip-shell system . . cmp. $t $f > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
553 (echoscip-shell system . . echo. "Building $f" && rmscip-shell system . . rm. -f $f && cpscip-shell system . . cp. $t $f)