5172
|
1 |
#!/bin/sh
|
|
2 |
|
|
3 |
TOP_DIR=.
|
|
4 |
OBJ_DIR=.
|
|
5 |
|
|
6 |
for x in "$@"
|
|
7 |
do
|
|
8 |
case x"$x" in
|
|
9 |
x--srcdir=* | x--topdir=* )
|
|
10 |
TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
|
11 |
;;
|
|
12 |
x--builddir=* | x--objdir=* )
|
|
13 |
OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
|
14 |
;;
|
|
15 |
esac
|
|
16 |
done
|
|
17 |
|
|
18 |
mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
|
|
19 |
|
|
20 |
( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
|
|
21 |
( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
|
|
22 |
cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
|
|
23 |
|
|
24 |
pushd ${OBJ_DIR}/builds/atari/tmp
|
|
25 |
|
|
26 |
cp -pr orig purec
|
|
27 |
for f in `cd orig && find . -type f`
|
|
28 |
do
|
|
29 |
echo filter $f
|
|
30 |
env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
|
|
31 |
done
|
|
32 |
|
|
33 |
echo '#define FT2_BUILD_LIBRARY' > purec/include/ft2build.h
|
|
34 |
echo '#include "ATARI.H"' >> purec/include/ft2build.h
|
|
35 |
env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
|
|
36 |
|
|
37 |
env LANG=C diff -ur orig purec > ../purec.diff
|
|
38 |
|
|
39 |
popd
|
|
40 |
rm -rf ${OBJ_DIR}/builds/atari/tmp
|