monotone-commits-diffs
[Top][All Lists]
Advanced

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

[Monotone-commits-diffs] net.venge.monotone.source-tree-cleanup: adea95


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.source-tree-cleanup: adea9595011591375f0fc9c48bf741ae59cf328f
Date: Tue, 1 Feb 2011 07:48:45 GMT

revision:            adea9595011591375f0fc9c48bf741ae59cf328f
date:                2011-02-01T07:48:23
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone.source-tree-cleanup
changelog:
Redo the documentation dependencies.  Basically, we can return to
having per-target dependency lists.  Because automake generates very
different Makefiles when monotone.texi is in a subdirectory (like we
had in the top Makefile) than it does when monotone.texi is in the
current directory (as it is now, with doc/Makefile.am), we don't have
to deal with dependencies the same way.  The summary of it all is that
you really don't want to handle main .texi files that are in
subdirectories, it's quite difficult to do in a sane way.

* Makefile.am (HTML_EXTRA): Added, so we can us it for the htmldir
  case.
  (HTML_EXTRA_copied): Remade so it builds on $(HTML_EXTRA).
  (monotone_TEXINFOS): Simplified, it no longer needs to have all
  those image files in it.
  (htmldir): This target is remade to use Makefile variables a lot
  more.
  (monotone.dvi, monotone.pdf, monotone.html): Added targets to get
  dependencies right.  This is the part that's impossible with main
  .texi files in a subdirectory.


manifest:
format_version "1"

new_manifest [1a29237cf165f313d85dfb22fd02afa7e84bd933]

old_revision [81a96cb782c820c8f171ee42e5c0d95050ed8686]

patch "doc/Makefile.am"
 from [59e27968c90a13dd581d6812a89876a9f6e7cbc6]
   to [dbc3b79d214092fecb27c6d198146a29978a3daf]
============================================================
--- doc/Makefile.am	59e27968c90a13dd581d6812a89876a9f6e7cbc6
+++ doc/Makefile.am	dbc3b79d214092fecb27c6d198146a29978a3daf
@@ -28,6 +28,8 @@ PNG_IMAGES= images/bg.png images/go-next
 	images/go-previous.png images/go-up.png			\
 	images/toc.png
 
+HTML_EXTRA = texinfo.css
+
 PNG_FIGURES=$(PDF_FIGURES:.pdf=.png)
 EPS_FIGURES=$(PDF_FIGURES:.pdf=.eps)
 
@@ -35,18 +37,14 @@ PNG_IMAGES_copied = $(addprefix $(abs_bu
 PDF_FIGURES_copied = $(addprefix $(abs_builddir)/,$(PDF_FIGURES))
 PNG_FIGURES_copied = $(addprefix $(abs_builddir)/,$(PNG_FIGURES))
 PNG_IMAGES_copied = $(addprefix $(abs_builddir)/,$(PNG_IMAGES))
-HTML_EXTRA_copied = $(abs_builddir)/texinfo.css
+HTML_EXTRA_copied = $(addprefix $(abs_builddir)/,$(HTML_EXTRA))
 
 TEXI_FRAGMENTS = monotonevars.texi pcrepattern.texi pcresyntax.texi
 
 man1_MANS = mtn.1
 info_TEXINFOS = monotone.texi
 
-monotone_TEXINFOS = ../src/std_hooks.lua $(TEXI_FRAGMENTS) \
-	$(EPS_FIGURES) \
-	$(PDF_FIGURES_copied) \
-	$(PNG_FIGURES_copied) $(PNG_IMAGES_copied) \
-	$(HTML_EXTRA_copied)
+monotone_TEXINFOS = ../src/std_hooks.lua $(TEXI_FRAGMENTS)
 
 EXTRA_DIST = \
 	$(PDF_FIGURES) $(PNG_FIGURES) $(TEXI_FRAGMENTS)			\
@@ -109,11 +107,13 @@ AM_MAKEINFODOCHTMLFLAGS= -I $(srcdir) \
 
 # Because automake already generates a html target that produces a single file
 # HTML, we have to use a different target to make a multifile HTML.
-htmldir: monotone.texi $(srcdir)/version.texi $(doc_monotone_TEXINFOS) html/$(am__dirstamp)
-	$(MKDIR_P) html.htp
-	cp -r $(srcdir)/figures html.htp
-	cp -r $(srcdir)/images html.htp
-	cp $(srcdir)/texinfo.css html.htp
+htmldir: monotone.texi $(srcdir)/version.texi $(doc_monotone_TEXINFOS) $(PNG_FIGURES) $(PNG_IMAGES) $(HTML_EXTRA) html/$(am__dirstamp)
+	$(MKDIR_P) html.htp && \
+	  cp $(addprefix $(srcdir)/,$(HTML_EXTRA)) html.htp
+	$(MKDIR_P) html.htp/figures && \
+	  cp $(addprefix $(srcdir)/,$(PNG_FIGURES)) html.htp/figures
+	$(MKDIR_P) html.htp/images && \
+	  cp $(addprefix $(srcdir)/,$(PNG_IMAGES)) html.htp/images
 	if $(MAKEINFOHTML) $(AM_MAKEINFODOCHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc -o html.htp `test -f 'monotone.texi' || echo '$(srcdir)/'`monotone.texi; \
 	then \
 	  rm -rf html; \
@@ -124,13 +124,25 @@ html/$(am__dirstamp):
 	fi
 html/$(am__dirstamp):
 	@$(MKDIR_P) html
-	@: > $(am__dirstamp)
+	@touch $@
 # Then let's have the html target produce the multifile HTML as well.
 html-local: htmldir
 
-# automake doesn't seem to generate any specific PostScript target.
-# It does generate the general rule to produce .ps from .dvi, though,
-# so all we need to do is to set up the dependencies.
-#dvi-local: $(EPS_FIGURES)
-#monotone.ps: $(srcdir)/version.texi $(doc_monotone_TEXINFOS) $(EPS_FIGURES) $(am__dirstamp)
-
+# Because we don't want to have the different document targets depend on
+# irrelevant files, we have these dependencies lists.
+# NOTE: This wouldn't work if this Makefile had been part of the top Makefile,
+# because automake produces very different results when the main .texi is in
+# a subdirectory.
+# Also note that we need to specify everything that automake would specify,
+# since what we write overrides what automake would otherwise produce.
+monotone.dvi: monotone.texi $(srcdir)/version.texi $(monotone_TEXINFOS) \
+	$(EPS_FIGURES)
+monotone.pdf: monotone.texi $(srcdir)/version.texi $(monotone_TEXINFOS) \
+	$(PDF_FIGURES_copied)
+monotone.html: monotone.texi $(srcdir)/version.texi $(monotone_TEXINFOS) \
+	$(PNG_FIGURES_copied) $(PNG_IMAGES_copied) $(HTML_EXTRA_copied)
+# Note that we don't need anything for monotone.ps, as it's produced using
+# the generic rule .dvi.ps, and the monotone.dvi already has all the
+# dependencies.
+# Also, we don't need anything extra for htmldir, as it does things a bit
+# differently.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]