[Libosinfo] [PATCH] build: avoid missing file on parallel build

Eric Blake eblake at redhat.com
Thu Sep 5 22:52:53 UTC 2013


Fabiano Fidêncio reported a case where make failed due to one
generated file not existing in time for the generation of the
other:

GEN      osinfo_enum_types.c
Can't open ./osinfo_enum_types.h: No such file or directory at /usr/bin/glib-mkenums line 296, <> line 3630.

* osinfo/Makefile.am (osinfo_enum_types.c): Add dependence on .h file.

Signed-off-by: Eric Blake <eblake at redhat.com>
---

Tested by Fabiano.  Still untested by me, but posting this in a
way that will be easier for someone with push rights to apply.

 osinfo/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index 7935d9c..fc87123 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -144,7 +144,7 @@ libosinfo_1_0_la_SOURCES =		\
 osinfo_enum_types.h: $(OSINFO_HEADER_FILES) osinfo_enum_types.h.template
 	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $(srcdir)/osinfo_enum_types.h

-osinfo_enum_types.c: $(OSINFO_HEADER_FILES) osinfo_enum_types.c.template
+osinfo_enum_types.c: $(OSINFO_HEADER_FILES) osinfo_enum_types.c.template osinfo_enum_types.h
 	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $(srcdir)/osinfo_enum_types.c

 if WITH_GOBJECT_INTROSPECTION
-- 
1.8.3.1




More information about the Libosinfo mailing list