diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /ksvg/scripts/genimpl.sh | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/scripts/genimpl.sh')
-rwxr-xr-x | ksvg/scripts/genimpl.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ksvg/scripts/genimpl.sh b/ksvg/scripts/genimpl.sh new file mode 100755 index 00000000..5a0742d2 --- /dev/null +++ b/ksvg/scripts/genimpl.sh @@ -0,0 +1,49 @@ +# try to find an appropriate awk interpreter +if which mawk > /dev/null 2>&1; then + cmd_awk=`which mawk`; +else + if which awk > /dev/null 2>&1; then + cmd_awk=`which awk`; + else + echo "No suitable AWK interpreter found. Aborting." + exit 1 + fi +fi + +# you cant touch this +touch $1Impl.h +touch $1Impl.cc + +#start with copyright notices +cat ../COPYRIGHTS > $1Impl.h +cat ../COPYRIGHTS > $1Impl.cc + +# add define for multiple include problem +echo "" >> $1Impl.h +echo "#ifndef $1Impl_H" >> $1Impl.h +echo "#define $1Impl_H" >> $1Impl.h + +# namespace +echo "" >> $1Impl.h +echo "namespace KSVG" >> $1Impl.h +echo "{" >> $1Impl.h + +#include in .cc + namespace +echo "" >> $1Impl.cc +echo "#include \"$1Impl.h\"" >> $1Impl.cc +echo "" >> $1Impl.cc +echo "using namespace KSVG;" >> $1Impl.cc +echo "" >> $1Impl.cc + +#go go go +$cmd_awk -f ../makeimpl $1 + +#add end of define +echo "};" >> $1Impl.h +echo "" >> $1Impl.h +echo "#endif" >> $1Impl.h +echo "" >> $1Impl.h +echo "// vim:ts=4:noet" >> $1Impl.h + +echo "// vim:ts=4:noet" >> $1Impl.cc +#done I hope |