blob: 1ec050c11fa3cbbba26c610dfa32787f5a995795 (
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
|
#!/bin/sh
TOP_DIR=.
OBJ_DIR=.
for x in "$@"
do
case x"$x" in
x--srcdir=* | x--topdir=* )
TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
;;
x--builddir=* | x--objdir=* )
OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
;;
esac
done
mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
pushd ${OBJ_DIR}/builds/atari/tmp
cp -pr orig purec
for f in `cd orig && find . -type f`
do
echo filter $f
env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
done
echo '#define FT2_BUILD_LIBRARY' > purec/include/ft2build.h
echo '#include "ATARI.H"' >> purec/include/ft2build.h
env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
env LANG=C diff -ur orig purec > ../purec.diff
popd
rm -rf ${OBJ_DIR}/builds/atari/tmp
|