gen-public-types.sh 326 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh

set -e

echo '/* This file was generated by gen-plublic-types.sh, do not edit it. */
'

for var in "$@"
do
  echo "#include \"$var\""
done

echo '#include "hdy-main-private.h"

void
hdy_init_public_types (void)
{'

sed -ne 's/^#define \+\(HDY_TYPE_[A-Z0-9_]\+\) \+.*/  g_type_ensure (\1);/p' "$@" | sort

echo '}
'