Fix srcdir != builddir, and add idiom for multi-output commands
authorRaja R Harinath <harinath@hurrynot.org>
Wed, 19 Nov 2008 18:37:59 +0000 (18:37 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Wed, 19 Nov 2008 18:37:59 +0000 (18:37 -0000)
* docs.make (monoapi.zip): Handle the case where 'monoapi.tree'
exists but 'monoapi.zip' doesn't.  IOW, we should rebuild
monoapi.zip with 'rm monoapi.zip; make'.
(mono-tools.zip, mono-file-formats.zip): Likewise.
* Makefile.am (monoapi.zip, mono-tools.zip, mono-fileformats.zip): Likewise.
(monoapi.tree): Don't use $< in an explicit rule.
(mono-tools.tree, mono-file-formats.tree): Likewise.

svn path=/trunk/mono/; revision=119361

docs/ChangeLog
docs/Makefile.am
docs/docs.make

index 30ab1b726bc3a5986685e5bebc1c7d3fb52ed4b9..6670e71250ce650f396d8115147439811bc5d0a8 100644 (file)
@@ -1,3 +1,15 @@
+2008-11-19  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix srcdir != builddir, and add idiom for multi-output commands
+       * docs.make (monoapi.zip): Handle the case where 'monoapi.tree'
+       exists but 'monoapi.zip' doesn't.  IOW, we should rebuild
+       monoapi.zip with 'rm monoapi.zip; make'.
+       (mono-tools.zip, mono-file-formats.zip): Likewise.
+       * Makefile.am (monoapi.zip, mono-tools.zip, mono-fileformats.zip):
+       Likewise.
+       (monoapi.tree): Don't use $< in an explicit rule.
+       (mono-tools.tree, mono-file-formats.tree): Likewise.
+
 2008-11-18  Jonathan Pryor  <jpryor@novell.com>
 
        * Makefile.am (EXTRA_DIST): Add mono-file-formats{.config,.source} and
index dc8c44341c08853188ef66ce2d7e9e1558469daa..b7a360ed0ff157f01c72c08777c6671fc9002c66 100644 (file)
@@ -79,18 +79,21 @@ clean-local:
        -rm -f $(srcdir)/deploy/* $(srcdir)/convert.exe*
        -cd $(srcdir) && rm -f $(ASSEMBLED_DOCS)
 
-monoapi.zip : monoapi.tree
-monoapi.tree: docs.make Makefile.am toc.xml deploy/.stamp
-       cp api-style.css deploy
-       cd $(srcdir) && $(MAKE) -f $< topdir=$(mcs_topdir_from_srcdir) $@
+monoapi.zip: monoapi.tree
+       @test -f $@ || { rm -f $(srcdir)/monoapi.tree; $(MAKE) monoapi.tree; }
+monoapi.tree: docs.make Makefile.am toc.xml $(srcdir)/deploy/.stamp
+       cd $(srcdir) && cp api-style.css deploy
+       cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
 
-mono-tools.zip : mono-tools.tree
-mono-tools.tree: docs.make Makefile.am deploy/.stamp
-       cd $(srcdir) && $(MAKE) -f $< topdir=$(mcs_topdir_from_srcdir) $@
+mono-tools.zip: mono-tools.tree
+       @test -f $@ || { rm -f $(srcdir)/mono-tools.tree; $(MAKE) mono-tools.tree; }
+mono-tools.tree: docs.make Makefile.am $(srcdir)/deploy/.stamp
+       cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
 
-mono-file-formats.zip : mono-file-formats.tree
-mono-file-formats.tree: docs.make Makefile.am deploy/.stamp
-       cd $(srcdir) && $(MAKE) -f $< topdir=$(mcs_topdir_from_srcdir) $@
+mono-file-formats.zip: mono-file-formats.tree
+       @test -f $@ || { rm -f $(srcdir)/mono-file-formats.tree; $(MAKE) mono-file-formats.tree; }
+mono-file-formats.tree: docs.make Makefile.am $(srcdir)/deploy/.stamp
+       cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
 
 $(srcdir)/deploy/.stamp: convert.exe Makefile.am
        $(mkdir_p) $(srcdir)/html
index 7977ff6fa61e7db3a7b6162c877add6f8ca68746..d649fa281ad1407a7abb673b976add76b0325621 100644 (file)
@@ -10,17 +10,20 @@ ASSEMBLED_DOCS = \
 convert.exe: convert.cs AgilityPack.dll
        $(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll
 
-monoapi.zip : monoapi.tree
+monoapi.zip: monoapi.tree
+       @test -f $@ || { rm -f $<; $(MAKE) $<; }
 monoapi.tree: toc.xml docs.make
        $(MDOC) assemble -o monoapi -f hb $<
 
-mono-tools.zip : mono-tools.tree
+mono-tools.zip: mono-tools.tree
+       @test -f $@ || { rm -f $<; $(MAKE) $<; }
 mono-tools.tree: mono-tools.config docs.make
        $(MDOC) assemble -o mono-tools -f man $<
 
-mono-file-formats.zip : mono-file-formats.tree
+mono-file-formats.zip: mono-file-formats.tree
+       @test -f $@ || { rm -f $<; $(MAKE) $<; }
 mono-file-formats.tree: mono-file-formats.config docs.make
        $(MDOC) assemble -o mono-file-formats -f man $<
 
 .doc-stamp:
-       
+