[Libosinfo] [PATCH] don't include autogenerated enum files in dist
Daniel P. Berrange
berrange at redhat.com
Wed Jan 13 11:22:42 UTC 2016
Previous commit 77cf2730eb6e5503a9bd40e6baf7cc0b393a9dc7
reverts 4e488678d4af0e54da7400851d554bc4c4497c76 (fixes
to the VPATH build) because it was said to break the
make distcheck.
After examining the problem, it seems this commit was not
in fact the problem - it merely exposed the existing bug
elsewhere.
The real problem is that we were including the autogenerated
enum files in the dist. So when doing builds from git those
files were in $builddir, but when doing builds from dist
those files were in $srcdir. Except that 'make distclean'
would delete the enum files, which would again cause them
to appear in $builddir.
So the real fix is stop including the enum files in the dist
Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
osinfo/Makefile.am | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index c4f29a4..410a4c1 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -58,7 +58,7 @@ libosinfo_1_0_la_DEPENDENCIES = libosinfo.syms
libosinfo_1_0_includedir = $(includedir)/libosinfo-1.0/osinfo
-OSINFO_HEADER_FILES = \
+libosinfo_1_0_include_HEADERS = \
osinfo.h \
osinfo_avatar_format.h \
osinfo_db.h \
@@ -99,8 +99,7 @@ OSINFO_HEADER_FILES = \
osinfo_treelist.h \
$(NULL)
-libosinfo_1_0_include_HEADERS = \
- $(OSINFO_HEADER_FILES) \
+nodist_libosinfo_1_0_include_HEADERS = \
osinfo_version.h \
osinfo_enum_types.h \
$(NULL)
@@ -110,7 +109,6 @@ libosinfo_1_0_la_SOURCES = \
osinfo_datamap.c \
osinfo_datamaplist.c \
osinfo_entity.c \
- osinfo_enum_types.c \
osinfo_filter.c \
osinfo_list.c \
osinfo_device.c \
@@ -151,11 +149,16 @@ libosinfo_1_0_la_SOURCES = \
ignore-value.h \
$(NULL)
-osinfo_enum_types.h: $(OSINFO_HEADER_FILES) osinfo_enum_types.h.template
- $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > $@
+nodist_libosinfo_1_0_la_SOURCES = \
+ osinfo_enum_types.c \
+ $(NULL)
+
+
+osinfo_enum_types.h: $(libosinfo_1_0_include_HEADERS) osinfo_enum_types.h.template
+ $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
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 $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > $@
+ $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
DISTCLEANFILES += \
osinfo_enum_types.c \
@@ -188,7 +191,7 @@ Libosinfo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0
Libosinfo_1_0_gir_PACKAGES = gobject-2.0 gio-2.0 libxml-2.0 libxslt
Libosinfo_1_0_gir_EXPORT_PACKAGES = libosinfo-1.0
Libosinfo_1_0_gir_LIBS = libosinfo-1.0.la
-Libosinfo_1_0_gir_FILES = $(libosinfo_1_0_include_HEADERS) $(libosinfo_1_0_la_SOURCES)
+Libosinfo_1_0_gir_FILES = $(libosinfo_1_0_include_HEADERS) $(libosinfo_1_0_la_SOURCES) $(nodist_libosinfo_1_0_la_SOURCES)
Libosinfo_1_0_gir_CFLAGS = $(libosinfo_1_0_la_CFLAGS)
Libosinfo_1_0_gir_SCANNERFLAGS = --identifier-prefix=Osinfo --symbol-prefix=osinfo --c-include="osinfo/osinfo.h"
INTROSPECTION_GIRS += Libosinfo-1.0.gir
--
2.5.0
More information about the Libosinfo
mailing list