[PATCH] build-sys: Generate glib enum files in $(builddir)

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

 



Since b4c5a1b5c which introduced the generation of an osinfo_version.h
file when configure is run, the glib enum files will be regenerated
during make distcheck instead of using the one from the tarball.
osinfo/Makefile.am currently attempts to generate these files in
$(srcdir), which causes make distcheck to fail as it makes $(srcdir)
read-only.

This patch makes sure these files are generated in $(builddir) and that
they are cleaned up afterwards.
---
 osinfo/Makefile.am | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index b5d8be0..8f5685c 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -1,4 +1,4 @@
-
+DISTCLEANFILES =
 EXTRA_DIST = libosinfo.syms \
 	     osinfo_enum_types.h.template \
 	     osinfo_enum_types.c.template
@@ -149,10 +149,15 @@ 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)/%) ) > $(srcdir)/osinfo_enum_types.h
+	$(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 $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $(srcdir)/osinfo_enum_types.c
+	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
+
+DISTCLEANFILES +=				\
+	osinfo_enum_types.c			\
+	osinfo_enum_types.h			\
+	$(NULL)
 
 # .libs/libosinfo.so is built by libtool as a side-effect of the Makefile
 # rule for libosinfo.la.  However, checking symbols relies on Linux ELF layout
-- 
1.9.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