#!/bin/bash

cat <<EOF
#ifndef __COMPILE_TIME_OPTIONS_H__
#define __COMPILE_TIME_OPTIONS_H__
EOF

tail -n +2 compileTimeOptions.h |
sed -re 's/BOOL_OPTION\((.*), *(.*)\)/#ifndef \1\
#define \1 \2\
#endif\
#if \1\
#pragma message "\1 ON"\
#else\
#pragma message "\1 off"\
#endif\
/;
s/REQUIRES\((.*), (.*)\)/#if (\1) \&\& !(\2)\
#error "\1 requires \2"\
#endif\
/'

cat <<EOF
#endif
EOF