mpers: add MPERS_IS_* to CFLAGS passed to mpers.sh
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.
This commit is contained in:
parent
1aae061d4d
commit
a27c47b2c4
@ -774,7 +774,7 @@ libmpers_CFLAGS = $(strace_CFLAGS)
|
||||
|
||||
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
|
||||
|
@ -121,7 +121,7 @@ int16_t f[0];
|
||||
#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
|
||||
|
Loading…
x
Reference in New Issue
Block a user