[libvirt] [PATCH 1/5] NEWS: Move generation to the docs/ directory

Andrea Bolognani abologna at redhat.com
Tue Mar 13 18:42:43 UTC 2018


All the input files and scripts used to generate the release notes
live in the docs/ directory, so it makes sense for the output file
to be created there as well. A symbolic link is created in the
top-level source directory to comply with GNU standards as well as
user expectations.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 .gitignore       |  1 +
 Makefile.am      | 24 +++++-------------------
 docs/Makefile.am | 24 ++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2ca7d9776e..234993cdcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,6 +59,7 @@
 /configure
 /configure.lineno
 /conftest.*
+/docs/NEWS
 /docs/aclperms.htmlinc
 /docs/apibuild.py.stamp
 /docs/devhelp/libvirt.devhelp
diff --git a/Makefile.am b/Makefile.am
index 81c7f52d9c..93d1351656 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,25 +46,11 @@ EXTRA_DIST = \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
 
-NEWS: \
-	  $(srcdir)/docs/news.xml \
-	  $(srcdir)/docs/news-ascii.xsl \
-	  $(srcdir)/docs/reformat-news.py
-	$(AM_V_GEN) \
-	if [ -x $(XSLTPROC) ]; then \
-	  $(XSLTPROC) --nonet \
-	    $(srcdir)/docs/news-ascii.xsl \
-	    $(srcdir)/docs/news.xml \
-	  >$@-tmp \
-	    || { rm -f $@-tmp; exit 1; }; \
-	  $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
-	    || { rm -f $@-tmp; exit 1; }; \
-	  rm -f $@-tmp; \
-	fi
-EXTRA_DIST += \
-	$(srcdir)/docs/news.xml \
-	$(srcdir)/docs/news-ascii.xsl \
-	$(srcdir)/docs/reformat-news.py
+NEWS: $(builddir)/docs/NEWS
+	$(LN_S) -f $< $@
+
+$(builddir)/docs/NEWS:
+	$(MAKE) $(AM_MAKEFLAGS) -C docs NEWS
 
 rpm: clean
 	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9620587a77..3259799e4f 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -197,6 +197,8 @@ MAINTAINERCLEANFILES = \
   $(addprefix $(srcdir)/,$(dot_php)) \
   $(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc
 
+CLEANFILES =
+
 timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \
 		   then \
 		     date -u --date="@$$SOURCE_DATE_EPOCH"; \
@@ -244,6 +246,28 @@ EXTRA_DIST += \
 MAINTAINERCLEANFILES += \
 	$(srcdir)/news.html.in
 
+NEWS: \
+	  $(srcdir)/news.xml \
+	  $(srcdir)/news-ascii.xsl \
+	  $(srcdir)/reformat-news.py
+	$(AM_V_GEN) \
+	if [ -x $(XSLTPROC) ]; then \
+	  $(XSLTPROC) --nonet \
+	    $(srcdir)/news-ascii.xsl \
+	    $(srcdir)/news.xml \
+	  >$@-tmp \
+	    || { rm -f $@-tmp; exit 1; }; \
+	  $(srcdir)/reformat-news.py $@-tmp >$@ \
+	    || { rm -f $@-tmp; exit 1; }; \
+	  rm -f $@-tmp; \
+	fi
+EXTRA_DIST += \
+	$(srcdir)/news.xml \
+	$(srcdir)/news-ascii.xsl \
+	$(srcdir)/reformat-news.py
+CLEANFILES += \
+	NEWS
+
 %.png: %.fig
 	convert -rotate 90 $< $@
 
-- 
2.14.3




More information about the libvir-list mailing list