msgpack/preprocess
Takatoshi Kondo 06930616b2 Added cmake files.
https://github.com/msgpack/msgpack-c/pull/20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.

Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.

Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.

If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
2014-06-05 20:49:15 +00:00

18 lines
314 B
Bash
Executable File

#!/bin/sh
preprocess() {
ruby -r erb -e 'puts ERB.new(ARGF.read).result' $1.erb > $1.tmp
if [ "$?" != 0 ]; then
echo ""
echo "** preprocess failed **"
echo ""
exit 1
else
mv $1.tmp $1
fi
}
preprocess src/msgpack/type/tuple.hpp
preprocess src/msgpack/type/define.hpp
preprocess src/msgpack/zone.hpp