1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-16 05:08:12 +01:00
libunwind-eh_elf/scripts/make-L-files

19 lines
436 B
Text
Raw Normal View History

#!/bin/sh
for gname in `ls G*.c G*.cxx G*.S 2>/dev/null`; do
lname="L$(expr $gname : '.\(.*\)')"
bk edit $lname >/dev/null 2>&1
ext=$(expr $gname : '[^.]*[.]\(.*\)')
if [ "$ext" = "S" ]; then
include=""
else
include="#include <libunwind.h>"
fi
echo -e "\
#define UNW_LOCAL_ONLY\n\
$include\n\
#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)\n\
#include \"$gname\"\n\
#endif" > $lname
echo created $lname
done