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@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
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Tue, Mar 13, 2018 at 07:42:43PM +0100, Andrea Bolognani wrote: > 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. I'm not really seeing a benefit in having a NEWS file in both places. What's the problem you're trying to solve with having it in the top directory ? > > Signed-off-by: Andrea Bolognani <abologna@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 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Wed, 2018-03-14 at 09:56 +0000, Daniel P. Berrangé wrote: > On Tue, Mar 13, 2018 at 07:42:43PM +0100, Andrea Bolognani wrote: > > 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. > > I'm not really seeing a benefit in having a NEWS file in both > places. You're only going to get a single copy plus a symlink. Well, for git checkouts at least: 'make dist' will dereference all symlinks, so the release tarballs will indeed include the file twice. That's a more general issue with 'make dist' that it would be nice to find a solution for. IIRC Michal brought it up with the autotools maintainers a while ago, but nothing came of it. > What's the problem you're trying to solve with having > it in the top directory ? The rules for generating NEWS are in the top-level Makefile.am, but all the files involved in the process are actually in docs/. I think it would be nicer to move the rules to docs/Makefile.am so that they live alongside the files and docs/ is more self-contained, but I can live with the current state if you're against this change. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.