[master] 531ecb4 run all the rst processing in builddir to fix out-of-tree builds
Nils Goroll
nils.goroll at uplex.de
Wed Dec 7 15:31:05 CET 2016
commit 531ecb40733d3df41007784d7039f0fe9adb0150
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Dec 7 15:13:55 2016 +0100
run all the rst processing in builddir to fix out-of-tree builds
I am not entirely happy about this and we should try to find a better solution
to this chicken-egg-ish situation:
- part of our documentation is hand-written (in git/srcdir), part is auto-
generated
- because we add generated rsts to the dist, they are not in srcdir when
building from git, but they are when building from a dist (tarball)
- sphinx wants all files in one doctree - there seems to be no include path
I tend to lean towards removing generated rsts from the dist to unify the
src tree for git vs. dist builds, but I'd like to avoid too much change at
this point due to other priorities.
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
index 6c28f54..d00c566 100644
--- a/doc/sphinx/Makefile.am
+++ b/doc/sphinx/Makefile.am
@@ -194,11 +194,11 @@ reference:
BUILT_SOURCES += reference
reference/vmod_std.generated.rst: reference $(top_builddir)/lib/libvmod_std/vmod_std.rst
- cp $(top_builddir)/lib/libvmod_std/vmod_std.rst $@
+ cp $(top_builddir)/lib/libvmod_std/vmod_std.rst $@ || true
BUILT_SOURCES += reference/vmod_std.generated.rst
reference/vmod_directors.generated.rst: reference $(top_builddir)/lib/libvmod_directors/vmod_directors.rst
- cp $(top_builddir)/lib/libvmod_directors/vmod_directors.rst $@
+ cp $(top_builddir)/lib/libvmod_directors/vmod_directors.rst $@ || true
BUILT_SOURCES += reference/vmod_directors.generated.rst
EXTRA_DIST += $(BUILT_SOURCES)
diff --git a/man/Makefile.am b/man/Makefile.am
index da9b405..2b61fbb 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -22,66 +22,66 @@ CLEANFILES = $(dist_man_MANS)
RST2ANY_FLAGS = --halt=2
-varnish-cli.7: $(top_srcdir)/doc/sphinx/reference/varnish-cli.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnish-cli.rst $@
+varnish-cli.7: $(top_builddir)/doc/sphinx/reference/varnish-cli.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnish-cli.rst $@
-varnish-counters.7: $(top_srcdir)/doc/sphinx/reference/varnish-counters.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnish-counters.rst $@
+varnish-counters.7: $(top_builddir)/doc/sphinx/reference/varnish-counters.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnish-counters.rst $@
-vcl.7: $(top_srcdir)/doc/sphinx/reference/vcl.rst \
- $(top_srcdir)/bin/varnishd/builtin.vcl
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/vcl.rst $@
+vcl.7: $(top_builddir)/doc/sphinx/reference/vcl.rst \
+ $(top_builddir)/bin/varnishd/builtin.vcl
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/vcl.rst $@
-vsl.7: $(top_srcdir)/doc/sphinx/reference/vsl.rst \
+vsl.7: $(top_builddir)/doc/sphinx/reference/vsl.rst \
$(top_builddir)/doc/sphinx/include/vsl-tags.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/vsl.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/vsl.rst $@
-vsl-query.7: $(top_srcdir)/doc/sphinx/reference/vsl-query.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/vsl-query.rst $@
+vsl-query.7: $(top_builddir)/doc/sphinx/reference/vsl-query.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/vsl-query.rst $@
-varnishadm.1: $(top_srcdir)/doc/sphinx/reference/varnishadm.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishadm.rst $@
+varnishadm.1: $(top_builddir)/doc/sphinx/reference/varnishadm.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishadm.rst $@
varnishd.1: \
- $(top_srcdir)/doc/sphinx/reference/varnishd.rst \
+ $(top_builddir)/doc/sphinx/reference/varnishd.rst \
$(top_builddir)/doc/sphinx/include/params.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishd.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishd.rst $@
varnishncsa.1: \
- $(top_srcdir)/doc/sphinx/reference/varnishncsa.rst \
+ $(top_builddir)/doc/sphinx/reference/varnishncsa.rst \
$(top_builddir)/doc/sphinx/include/varnishncsa_options.rst \
$(top_builddir)/doc/sphinx/include/varnishncsa_synopsis.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishncsa.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishncsa.rst $@
varnishlog.1: \
- $(top_srcdir)/doc/sphinx/reference/varnishlog.rst \
+ $(top_builddir)/doc/sphinx/reference/varnishlog.rst \
$(top_builddir)/doc/sphinx/include/varnishlog_options.rst \
$(top_builddir)/doc/sphinx/include/varnishlog_synopsis.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishlog.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishlog.rst $@
-varnishstat.1: $(top_srcdir)/doc/sphinx/reference/varnishstat.rst \
+varnishstat.1: $(top_builddir)/doc/sphinx/reference/varnishstat.rst \
$(top_builddir)/doc/sphinx/include/varnishstat_options.rst \
$(top_builddir)/doc/sphinx/include/varnishstat_synopsis.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishstat.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishstat.rst $@
-varnishtest.1: $(top_srcdir)/doc/sphinx/reference/varnishtest.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishtest.rst $@
+varnishtest.1: $(top_builddir)/doc/sphinx/reference/varnishtest.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishtest.rst $@
-vtc.7: $(top_srcdir)/doc/sphinx/reference/vtc.rst \
- $(top_srcdir)/doc/sphinx/include/vtc-syntax.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/vtc.rst $@
+vtc.7: $(top_builddir)/doc/sphinx/reference/vtc.rst \
+ $(top_builddir)/doc/sphinx/include/vtc-syntax.rst
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/vtc.rst $@
varnishtop.1: \
- $(top_srcdir)/doc/sphinx/reference/varnishtop.rst \
+ $(top_builddir)/doc/sphinx/reference/varnishtop.rst \
$(top_builddir)/doc/sphinx/include/varnishtop_options.rst \
$(top_builddir)/doc/sphinx/include/varnishtop_synopsis.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishtop.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishtop.rst $@
varnishhist.1: \
- $(top_srcdir)/doc/sphinx/reference/varnishhist.rst \
+ $(top_builddir)/doc/sphinx/reference/varnishhist.rst \
$(top_builddir)/doc/sphinx/include/varnishhist_options.rst \
$(top_builddir)/doc/sphinx/include/varnishhist_synopsis.rst
- ${RST2MAN} $(RST2ANY_FLAGS) $(top_srcdir)/doc/sphinx/reference/varnishhist.rst $@
+ ${RST2MAN} $(RST2ANY_FLAGS) $(top_builddir)/doc/sphinx/reference/varnishhist.rst $@
vmod_std.3: $(top_builddir)/lib/libvmod_std/vmod_std.man.rst
${RST2MAN} $(RST2ANY_FLAGS) $? $@
More information about the varnish-commit
mailing list