blob: ec2ec157d219b965768191830875034e88ba8ee8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/bin/sh -
# $Id$
#
# Build BREW .dsp files.
. RELEASE
SRCFILES=srcfiles.in
s=/tmp/__db_a
t=/tmp/__db_b
trap 'rm -f $s $t; exit 0' 0
trap 'rm -f $s $t; exit 1' 1 2 3 13 15
# Build the bdb_brew.dsp file.
dsp()
{
grep -w brew $SRCFILES | awk '{print $1}' > $s
(cat brew/bdb_brew.dsp;
for i in `cat $s`; do
echo '# Begin Source File
'
echo "SOURCE=../$i
"
echo '# End Source File
'
done | sed 's/\//\\/g'
echo '# End Group
'
echo '# End Target
'
echo '# End Project
') > $t
f=../build_brew/bdb_brew.dsp
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
}
# Build the bdbread.mak applet example file.
mak()
{
(/bin/echo -n 'OBJS =bdbread.o AEEModGen.o AEEAppGen.o'
grep -w brew $SRCFILES |
awk '{print $1}' |
sed -e 's/.*\///' \
-e 's/\.c/\.o/g' |
awk '{printf " %s", $1}'
echo "
") > $s
sed -e '/LIST OF OBJECT FILES/{' \
-e "r $s" \
-e 'd' \
-e '}' < brew/bdbread.mak > $t
for i in `grep -w brew $SRCFILES | awk '{print $1}'`; do
echo "`basename $i .c`.o: ../$i
"
done |
sed 's/\//\\/g' >> $t
f=../build_brew/bdbread.mak
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
}
dsp
mak
exit 0
|