OTWO-1213 Works around lost encoding in Ruby/C binding layer
[ohcount] / src / hash / generate_headers
1 #!/bin/sh
2
3 # Check for gperf
4 if `type gperf > /dev/null 2> /dev/null`
5 then
6   echo "Found gperf, making headers..."
7 else
8   echo "gperf not found, aborting" >&2
9   exit 1
10 fi
11
12 gperf -L ANSI-C -E -D -K key -H ohcount_hash_language -N ohcount_hash_language_from_name -t languages.gperf > language_hash.c
13 gperf -L ANSI-C -E -D -K key -H ohcount_hash_extension -N ohcount_hash_language_from_ext -t extensions.gperf > extension_hash.h
14 gperf -L ANSI-C -E -D -K key -H ohcount_hash_filename -N ohcount_hash_language_from_filename -t filenames.gperf > filename_hash.h
15 gperf -L ANSI-C -E -D -K key -H ohcount_hash_disambiguatefunc -N ohcount_hash_disambiguate_func_from_id -t disambiguatefuncs.gperf > disambiguatefunc_hash.h
16 gperf -L ANSI-C -E -D -K key -H ohcount_hash_cppheader -N ohcount_hash_is_cppheader -t cppheaders.gperf > cppheader_hash.h
17 gperf -L ANSI-C -E -D -K key -H ohcount_hash_parser -N ohcount_hash_parser_from_language -t parsers.gperf > parser_hash.h
18 gperf -L ANSI-C -E -D -K key -H ohcount_hash_options -N ohcount_hash_command_from_flag -t options.gperf > option_hash.h