Fix *_printer_defs.h rules ambiguousness

There is an ambiguousness in *_printer_defs.h rules definition:

$ grep '^[^ ]*_defs\.h: ' Makefile.am
m%_defs.h: $(srcdir_mpers_source_files)
%_printer_defs.h: $(srcdir_mpers_source_files)

While it appears to work with GNU make, it has to be fixed nevertheless.

* Makefile.am (m%_defs.h): Rename to m%_type_defs.h.
(mpers_m32_targets): Rename m32_defs.h to m32_type_defs.h.
(mpers_mx32_targets): Rename mx32_defs.h to mx32_type_defs.h.
* mpers_type.h: Rename m32_defs.h to m32_type_defs.h,
mx32_defs.h to mx32_type_defs.h.
* .gitignore: Likewise.

Reported-by: Elliott Hughes <enh@google.com>
This commit is contained in:
Дмитрий Левин 2015-11-07 23:22:24 +00:00
parent c3410ba543
commit 370eb16ed2
3 changed files with 7 additions and 7 deletions

4
.gitignore vendored
View File

@ -48,19 +48,19 @@ Makefile.in
/libmpers-m32.a
/libmpers-mx32.a
/m32_defs.h
/m32_funcs.h
/m32_printer_decls.h
/m32_printer_defs.h
/m32_type_defs.h
/mpers-m32
/mpers-m32.stamp
/mpers-mx32
/mpers-mx32.stamp
/mpers.am
/mx32_defs.h
/mx32_funcs.h
/mx32_printer_decls.h
/mx32_printer_defs.h
/mx32_type_defs.h
/native_printer_decls.h
/native_printer_defs.h
/printers.h

View File

@ -689,7 +689,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
done
> $@
m%_defs.h: $(srcdir_mpers_source_files)
m%_type_defs.h: $(srcdir_mpers_source_files)
for f in $^; do \
sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
done > $@-t
@ -740,7 +740,7 @@ strace_LDADD += libmpers-m32.a
noinst_LIBRARIES += libmpers-m32.a
libmpers_m32_a_SOURCES = $(mpers_source_files)
libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
mpers_m32_targets = mpers-m32.stamp m32_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
BUILT_SOURCES += $(mpers_m32_targets)
CLEANFILES += $(mpers_m32_targets)
@ -755,7 +755,7 @@ strace_LDADD += libmpers-mx32.a
noinst_LIBRARIES += libmpers-mx32.a
libmpers_mx32_a_SOURCES = $(mpers_source_files)
libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
mpers_mx32_targets = mpers-mx32.stamp mx32_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
BUILT_SOURCES += $(mpers_mx32_targets)
CLEANFILES += $(mpers_mx32_targets)

View File

@ -3,10 +3,10 @@
# define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
# ifdef MPERS_IS_m32
# define MPERS_PREFIX m32_
# define MPERS_DEFS "m32_defs.h"
# define MPERS_DEFS "m32_type_defs.h"
# elif defined MPERS_IS_mx32
# define MPERS_PREFIX mx32_
# define MPERS_DEFS "mx32_defs.h"
# define MPERS_DEFS "mx32_type_defs.h"
# endif
#else
# define MPERS_PREFIX