* doc/tutorial/Makefile.am: Rename as...
* doc/tutorial/tutorial.mk: ...this.
Adjust.
* doc/Makefile.am: Include $(srcdir)/tutorial/tutorial.mk.
(SUBDIRS): Remove tutorial.
($(srcdir)/tutorial/tutorial.hh): Remove target.
(tutorial-pdf, tutorial-html): Remove (phony) targets.
---
milena/ChangeLog | 12 +++++
milena/doc/Makefile.am | 9 +---
milena/doc/tutorial/{Makefile.am => tutorial.mk} | 57 ++++++++++-----------
3 files changed, 40 insertions(+), 38 deletions(-)
rename milena/doc/tutorial/{Makefile.am => tutorial.mk} (63%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b340b00..2961cb9 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-03 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Stop make from recurring in doc/tutorial.
+
+ * doc/tutorial/Makefile.am: Rename as...
+ * doc/tutorial/tutorial.mk: ...this.
+ Adjust.
+ * doc/Makefile.am: Include $(srcdir)/tutorial/tutorial.mk.
+ (SUBDIRS): Remove tutorial.
+ ($(srcdir)/tutorial/tutorial.hh): Remove target.
+ (tutorial-pdf, tutorial-html): Remove (phony) targets.
+
2010-03-02 Roland Levillain <roland(a)lrde.epita.fr>
Stop make from recurring in doc/ref_guide.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index e79129a..5482e39 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -23,7 +23,6 @@ include $(top_srcdir)/milena/doc/doc.mk
SUBDIRS = \
examples \
technical \
- tutorial \
white_paper
DOXYGEN = doxygen
@@ -39,7 +38,6 @@ CLEANFILES =
doc-pdf doc-html doc-devel-pdf doc-devel-html \
ref-doc-pdf ref-doc-html \
ref-doc-devel-pdf ref-doc-devel-html \
- tutorial-pdf tutorial-html \
white-paper-pdf white-paper-html \
examples data-regen fig-convert
@@ -66,8 +64,6 @@ doc-devel-html: tutorial-html ref-guide-html white-paper-html \
# FIXME: Maintaining dependencies across directories is too
# complicated. Simplify.
EXTRA_DEPS = $(srcdir)/tutorial/tutorial.hh $(srcdir)/ref_guide/ref_guide.hh
-$(srcdir)/tutorial/tutorial.hh: fig-convert
- cd tutorial && $(MAKE) $(AM_MAKEFLAGS) tutorial-html
## ----------------------- ##
## Doxygen documentation. ##
@@ -122,10 +118,7 @@ $(srcdir)/$(DEVEL_REFMAN_HTML): $(srcdir)/Doxyfile_devel
$(srcdir)/figures.stamp
## Tutorial. ##
## ---------- ##
-tutorial-pdf: fig-convert
- cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
-tutorial-html: fig-convert
- cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
+include $(srcdir)/tutorial/tutorial.mk
## ------------- ##
## White Paper. ##
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/tutorial.mk
similarity index 63%
rename from milena/doc/tutorial/Makefile.am
rename to milena/doc/tutorial/tutorial.mk
index 5085633..6cc6ef4 100644
--- a/milena/doc/tutorial/Makefile.am
+++ b/milena/doc/tutorial/tutorial.mk
@@ -1,3 +1,5 @@
+# -*- Automake -*-
+
# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
# Laboratory (LRDE).
#
@@ -16,15 +18,15 @@
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
#
-.PHONY: tutorial tutorial-html
-
-include $(top_srcdir)/milena/doc/doc.mk
+.PHONY: tutorial tutorial-html tutorial-pdf
-TEXINPUTS = $(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
+tutorial_TEXINPUTS = $(DOC_SRCDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
tutorial: tutorial-html tutorial-pdf
+tutorial_dir = $(doc_dir)/tutorial
+
# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
@@ -55,44 +57,39 @@ tutorial: tutorial-html tutorial-pdf
# This is not a bug: TUTORIAL_HH is meant to have a `.hh' extension,
# since it is later parsed by Doxygen, which complains about `.html'
# files.
-TUTORIAL_HH = $(srcdir)/tutorial.hh
+TUTORIAL_HH = $(tutorial_dir)/tutorial.hh
tutorial-html: $(TUTORIAL_HH)
-$(TUTORIAL_HH): tutorial.tex $(srcdir)/../figures.stamp
- $(DOC_SRCDIR)/tools/todoxygen.sh \
- $< $(DOC_SRCDIR)/tutorial $(DOC_SRCDIR)
+$(TUTORIAL_HH): $(tutorial_dir)/tutorial.tex $(doc_dir)/figures.stamp
+ $(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)
+
# Final product.
-TUTORIAL_PDF = $(srcdir)/tutorial.pdf
+TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
tutorial-pdf: $(TUTORIAL_PDF)
-$(TUTORIAL_PDF): tutorial.tex $(srcdir)/../figures.stamp
- TEXINPUTS=$(TEXINPUTS) pdflatex $<
- TEXINPUTS=$(TEXINPUTS) pdflatex $<
- TEXINPUTS=$(TEXINPUTS) pdflatex $< \
- test "$(top_srcdir)" == "$(top_builddir)" \
- || mv -f tutorial.pdf $(srcdir)
-
-# FIXME: Regenerating figures.stamp requires make to go back to the
-# parent directory. We already do the opposite (descending from
-# milena/doc/ to milena/doc/tutorial/Makefile in milena/doc/ to update
-# tutorial.hh). This is not sound. We probably want to put together
-# somes of these files, and maybe get rid of some directories, or at
-# least move most of the Makefile machinery into
-# milena/doc/Makefile.am.
-$(srcdir)/../figures.stamp:
- cd .. && $(MAKE) $(AM_MAKEFLAGS) fig-convert
+$(TUTORIAL_PDF): $(tutorial_dir)/tutorial.tex $(doc_dir)/figures.stamp
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $<
+ TEXINPUTS=$(tutorial_TEXINPUTS) pdflatex $< \
+ test x"$(tutorial_dir)" != x. \
+ && mv -f tutorial.pdf $(tutorial_dir)
-dist_doc_DATA = $(TUTORIAL_PDF)
+dist_doc_DATA += $(TUTORIAL_PDF)
-EXTRA_DIST = \
- tutorial.tex \
+EXTRA_DIST += \
+ $(tutorial_dir)/tutorial.tex \
$(TUTORIAL_HH)
-CLEANFILES = \
+# FIXME: Remove `tutorial.aux tutorial.toc tutorial.log tutorial.bbl
+# tutorial.out *blg *.lot' when texi2dvi is used.
+#
+# FIXME: Why is $(TUTORIAL_PDF) listed here? It should be
+# automatically cleaned. I'm not sure either about the rest of
+# CLEANFILES.
+CLEANFILES += \
tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out \
*blg *.lot \
$(TUTORIAL_PDF) \
*.haux *.hh *.html *.htoc \
- tutorial.haux \
tutorial.html \
tutorial.idx \
$(TUTORIAL_HH)
--
1.5.6.5
Show replies by date