From 28fb77f545e5ed1c905002562285eb645e8e8ef4 Mon Sep 17 00:00:00 2001 From: David Pirotte Date: Thu, 14 Jul 2016 23:42:02 -0300 Subject: [PATCH 10/11] Fixing make distcheck * doc/docs.mk: (a) adding a license header; (b) removing a double entry in clean-docs target; (c) adding DISTCLEANFILES; (d) removing $(doc)scmfiles (it was not actually used anywhere); (e) removing $(doc)depfiles target, instead declare 'depfiles' as a toplevel variable. Notes: (1) wrt to (e), it was the only (unportable) way I found to have 'make ditcheck' work. The problem of having $(depfiles) as the result of a target is, because the documentation is generated (there is no guile-library.texi files in the distribution), and due to both (a) the way automake determines which files must be generated (timestamp), IIUC, and (b) the fact that file generation occurs in $(builddir), all this, unconditionally leaded to a texinfo [and dvi, pdf, ...) error, since in the $(buiddir), none of the guile-library.texi dependency files (fdl and NamesConventions) exist. Leaving things as they were ans using TEXINFO := $(TEXINFO) -I ../../../doc would not work either, because that triggers an attempt to write in $(scrdir), which is prohibited; (2) this solution is unportable (it depends on GNU Make), but this is not the first, guile-lib already used $(addprefix), so I guess with this respect my patch is ok. Of course if someone else has/knows a better solution, I'm all hears, ping me! (3) A special thank here to Colomban Wendling, aka b4n, who spent a couple of hours with me on irc, #autotool, to track this issue down, to finally conclude that, in his opinion and within the scope of his knowledge, there would be no way to solve this using targets. --- doc/docs.mk | 55 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/doc/docs.mk b/doc/docs.mk index 8095b4e..4676b7f 100644 --- a/doc/docs.mk +++ b/doc/docs.mk @@ -1,29 +1,58 @@ + +#### +#### Copyright (C) 2016 David Pirotte +#### David Pirotte + +#### This file is part of Guile-Lib. + +#### Guile-Lib is free software: you can redistribute it, as a whole, +#### and/or modify it under the terms of the GNU General Public +#### License as published by the Free Software Foundation, either +#### version 3 of the License, or (at your option) any later version. + +#### Each Guile-Lib module contained in Guile-Lib has its own copying +#### conditions, specified in the comments at the beginning of the +#### module's source file. + +#### Guile-Lib is distributed in the hope that it will be useful, but +#### WITHOUT ANY WARRANTY; without even the implied warranty of +#### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +#### General Public License for more details. + +#### You should have received a copy of the GNU General Public License +#### along with Guile-Lib. If not, see +#### . +#### + + clean-docs: rm -f $(doc).texi rm -f $(doc).info - rm -f $(doc)scmfiles rm -f html-stamp rm -rf html - rm -f $(addprefix $(doc).,aux cp cps fn fns ky log pdf pg pg toc tp tps vr vrs) + rm -f $(addprefix $(doc).,aux cp cps fn fns ky log pdf pg toc tp tps vr vrs) rm -rf $(doc).html -EXTRA_DIST=$(doc).scm make-texinfo.scm make-html.scm docs.mk -DISTCLEANFILES=$(doc).texi $(doc)scmfiles +EXTRA_DIST = \ + $(doc).scm \ + make-texinfo.scm \ + make-html.scm \ + docs.mk + +DISTCLEANFILES = \ + Makefile.in -$(doc)scmfiles: - GUILE_AUTO_COMPILE=0 \ - $(GUILE) --debug --use-srfi=13 -l $(srcdir)/$(doc).scm \ - -c '(for-each (lambda (m) (format #t "~a.scm\n" (string-join (map symbol->string m) "/"))) (map car *modules*))' \ - > $@ -depfiles=$(addprefix $(top_srcdir)/src/,$(shell test ! -f $(doc)scmfiles || cat $(doc)scmfiles)) +depfiles = $(shell $(GUILE) --no-auto-compile --debug --use-srfi=13 -l $(srcdir)/$(doc).scm -c '(for-each (lambda (m) (format \#t "$(top_srcdir)/src/~a.scm " (string-join (map symbol->string m) "/"))) (map car *modules*))') -$(doc).texi: $(srcdir)/$(doc).scm $(doc)scmfiles $(depfiles) +dummy: + printf '$(depfiles)' + +$(doc).texi: $(srcdir)/$(doc).scm $(depfiles) GUILE_AUTO_COMPILE=0 \ $(top_builddir)/dev-environ $(srcdir)/make-texinfo.scm $(srcdir)/$(doc).scm >$@ html-local: html-stamp $(srcdir)/$(doc).scm $(depfiles) -html-stamp: $(scm-module-files) +html-stamp: GUILE_AUTO_COMPILE=0 \ $(top_builddir)/dev-environ $(srcdir)/make-html.scm $(srcdir)/$(doc).scm touch $@ - -- 2.8.1