This allows testing of MPERS_IS_* macros in pre-MPERS_DEFS parts
of source code.
* Makefile.am (mpers-m%.stamp): Add -DMPERS_IS_$(mpers_NAME) to CFLAGS
passed to mpers.sh.
* mpers_test.sh: Likewise.
mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
for f in $^; do \
- CC="$(CC)" CFLAGS="$(mpers_sh_opts)" \
+ CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
$(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
done
#define MPERS_${mpers_name}_sample_struct ${mpers_name}_sample_struct
EOF
-CFLAGS="$CPPFLAGS -I${srcdir}" \
+CFLAGS="$CPPFLAGS -I${srcdir} -DMPERS_IS_${mpers_name}" \
CPPFLAGS="$CPPFLAGS -I${srcdir} -DIN_MPERS -DMPERS_IS_${mpers_name}" \
"$mpers_sh" "-$mpers_name" "$sample"
cmp "$expected" "$mpers_dir"/sample_struct.h > /dev/null