[PATCH] build: fix VPATH based builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The VPATH build fails because the enum generator is told to
look for two generated files in the $srcdir instead of builddir.
We should not in fact loom the generated files at all when building
enums, so they can be removed.

The g-ir-scanner is also missing a -I$(build_dir) to let it find
the generated files.

Finally the gtk-doc tools were not being told to look in the
$(build_dir)

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---

Pushed to git under broken build fix rule.

 docs/reference/Makefile.am | 6 +++---
 osinfo/Makefile.am         | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index c7f4c7b..5b516ed 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -3,7 +3,7 @@ DOC_MODULE=Libosinfo
 
 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
 
-DOC_SOURCE_DIR=$(top_srcdir)/osinfo
+DOC_SOURCE_DIR=$(top_srcdir)/osinfo $(top_builddir)/osinfo
 
 SCANGOBJ_OPTIONS=
 
@@ -17,8 +17,8 @@ MKHTML_OPTIONS=
 
 FIXXREF_OPTIONS=
 
-HFILE_GLOB=$(top_srcdir)/osinfo/*.h
-CFILE_GLOB=$(top_srcdir)/osinfo/*.c
+HFILE_GLOB=$(top_srcdir)/osinfo/*.h $(top_builddir)/osinfo/*.h
+CFILE_GLOB=$(top_srcdir)/osinfo/*.c $(top_builddir)/osinfo/*.c
 
 IGNORE_HFILES=
 
diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index 8f5685c..c07d362 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -30,6 +30,7 @@ libosinfo_1_0_la_CFLAGS = \
 	$(WARN_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	-I$(top_srcdir) \
+	-I$(top_builddir) \
 	$(LIBXML_CFLAGS) \
 	$(LIBXSLT_CFLAGS) \
 	$(GOBJECT_CFLAGS) \
@@ -94,11 +95,11 @@ OSINFO_HEADER_FILES =			\
   osinfo_resourceslist.h		\
   osinfo_tree.h				\
   osinfo_treelist.h			\
-  osinfo_version.h			\
   $(NULL)
 
 libosinfo_1_0_include_HEADERS =		\
   $(OSINFO_HEADER_FILES)		\
+  osinfo_version.h			\
   osinfo_enum_types.h			\
   $(NULL)
 
@@ -149,10 +150,10 @@ libosinfo_1_0_la_SOURCES =		\
   $(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 $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
+	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(OSINFO_HEADER_FILES:%=$(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 $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
+	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > $@
 
 DISTCLEANFILES +=				\
 	osinfo_enum_types.c			\
-- 
2.4.3

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux