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 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#
# Use to build the .c and .h source based on static information
# in libdwarf.h.in and dwarf_errmsg_list.h and the dwarfdump *.list files.
# If you change any of those you should run this script
# (which, for non-linux non-unix may mean some changes of this script
# or of scripts/libbuild.sh or scripts/ddbuild.sh or baseconfig.h)
#
# This script is by David Anderson and hereby put into the public domain
# for anyone to use in any way.
#
cp scripts/baseconfig.h config.h
if [ $? -ne 0 ]
then
echo "FAIL getting base config.h for .c .h builing.Runningfrom wrong place?"
exit 1
fi
cd libdwarf
if [ $? -ne 0 ]
then
echo "FAIL cd to libdwarf. Running buildstandardsource.sh from the wrong place"
exit 1
fi
cp libdwarf.h.in libdwarf.h
sed 's/struct Elf/struct _Elf/g' <libdwarf.h.in >ub_temp
cmp ub_temp generated_libdwarf.h.in
if [ $? -ne 0 ]
then
# Since cmake does not copy ; sensibly we will
# provide a unique version for _Elf platforms.
# libdwarf.h.in differs from generated_libdwarf.h.in:
# update the latter.
mv ub_temp generated_libdwarf.h.in
fi
rm ub_temp
sh ../scripts/libbuild.sh
if [ $? -ne 0 ]
then
echo "FAIL libbuild.sh. "
exit 1
fi
cd ..
if [ $? -ne 0 ]
then
echo "FAIL cd back to top-level"
exit 1
fi
cd dwarfdump
if [ $? -ne 0 ]
then
echo "FAIL cd to dwarfdump. Running buildstandardsource.sh from the wrong place"
exit 1
fi
sh ../scripts/ddbuild.sh
if [ $? -ne 0 ]
then
echo "FAIL building dwarfdump .c .h source"
exit 1
fi
cd ..
if [ $? -ne 0 ]
then
echo "FAIL second cd back to top-level"
exit 1
fi
rm -f config.h
rm -f libdwarf/libdwarf.h
echo "PASS. The .c and .h files are built"
exit 0
|