diff options
author | Miguel de Icaza <miguel@gnome.org> | 2014-04-16 20:08:57 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2014-04-16 20:09:20 +0400 |
commit | e3150746f39a5e4b558850e93518a9fb77f33f73 (patch) | |
tree | b8990aeefcd9c345f8d4b1914bf0b38177fc1ec5 /docs | |
parent | 8f790e107ffc6801e097c7c07e15b1471d81521b (diff) |
Runtime documentation will now build with srcdir != builddir
This removes an old and broken patch that did not allow for
clean builds of Mono. The old patch was so bad, that instead
of fixing the actual source of the problem (the ability to build
the runtime documentation when the source directory was not the
same as the build directory), a hack was added to circumvent
`make distcheck''s security system and changed the permissions
at build time for the source directory to become read/write.
This fixes the problem
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Makefile.am | 51 | ||||
-rw-r--r-- | docs/docs.make | 18 | ||||
-rw-r--r-- | docs/exdoc | 12 |
3 files changed, 47 insertions, 34 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am index c0450027cfd..abb659f778d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -73,41 +73,40 @@ dist-hook: cp HtmlAgilityPack/* $(distdir)/HtmlAgilityPack clean-local: - -rm -Rf $(srcdir)/html - -rm -f $(srcdir)/deploy/* $(srcdir)/convert.exe* $(srcdir)/AgilityPack.dll* - -cd $(srcdir) && rm -f $(ASSEMBLED_DOCS) + -rm -Rf html + -rm -f deploy/* convert.exe* AgilityPack.dll* + -rm -f $(ASSEMBLED_DOCS) + +TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(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 perms - cd $(srcdir) && cp -f api-style.css deploy - cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@ + +monoapi.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/toc.xml $(srcdir)/deploy/.stamp + -mkdir deploy + cp -f $(srcdir)/api-style.css deploy + $(TOOL_MAKE) $@ 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 perms - cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@ -mono-file-formats.zip: mono-file-formats.tree perms - @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) $@ +mono-tools.tree: $(srcdir)/docs.make Makefile.am deploy/.stamp + $(TOOL_MAKE) $@ + +mono-file-formats.zip: mono-file-formats.tree -$(srcdir)/deploy/.stamp: convert.exe Makefile.am perms - $(mkdir_p) $(srcdir)/html +mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp + $(TOOL_MAKE) $@ + +deploy/.stamp: convert.exe Makefile.am + $(mkdir_p) html runtimedir=`cd ../runtime && pwd`; export runtimedir; \ - cd $(srcdir) && MONO_PATH=$(mcs_topdir_from_srcdir)/class/lib/net_2_0 perl ./exdoc -h . ../mono/*/*.c + MONO_PATH=../mcs/class/lib/net_2_0 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c touch $@ -extract: $(srcdir)/deploy/.stamp - -convert.exe: convert.cs AgilityPack.dll perms - cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe +extract: deploy/.stamp -AgilityPack.dll: perms - cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) AgilityPack.dll +convert.exe: convert.cs AgilityPack.dll + $(TOOL_MAKE) PROFILE=net_2_0 convert.exe -.PHONY: perms -perms: - -@test -w $(srcdir) || chmod a+w $(srcdir) +AgilityPack.dll: + $(TOOL_MAKE) PROFILE=net_2_0 AgilityPack.dll diff --git a/docs/docs.make b/docs/docs.make index 7129bcadfc4..4f2d964e5b9 100644 --- a/docs/docs.make +++ b/docs/docs.make @@ -1,3 +1,8 @@ +# +# This makefile is here because it uses the configuration from the +# in-place built mono to run and compile a few C# tools +# + thisdir = docs SUBDIRS = include $(topdir)/build/rules.make @@ -7,25 +12,28 @@ ASSEMBLED_DOCS = \ mono-tools.tree mono-tools.zip \ monoapi.tree monoapi.zip -convert.exe: convert.cs AgilityPack.dll +convert.exe: $(srcdir)/convert.cs AgilityPack.dll $(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll AgilityPack.dll: - $(CSCOMPILE) -target:library -out:$@ HtmlAgilityPack/*.cs + $(CSCOMPILE) -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs monoapi.zip: monoapi.tree @test -f $@ || { rm -f $< && $(MAKE) $<; } -monoapi.tree: toc.xml docs.make + +monoapi.tree: $(srcdir)/toc.xml $(srcdir)/docs.make $(MDOC) assemble -o monoapi -f hb $< mono-tools.zip: mono-tools.tree @test -f $@ || { rm -f $< && $(MAKE) $<; } -mono-tools.tree: mono-tools.config docs.make + +mono-tools.tree: $(srcdir)/mono-tools.config $(srcdir)/docs.make $(MDOC) assemble -o mono-tools -f man $< mono-file-formats.zip: mono-file-formats.tree @test -f $@ || { rm -f $< && $(MAKE) $<; } -mono-file-formats.tree: mono-file-formats.config docs.make + +mono-file-formats.tree: $(srcdir)/mono-file-formats.config $(srcdir)/docs.make $(MDOC) assemble -o mono-file-formats -f man $< .doc-stamp: diff --git a/docs/exdoc b/docs/exdoc index e161a0c3d42..f2711d26b13 100644 --- a/docs/exdoc +++ b/docs/exdoc @@ -1,17 +1,23 @@ #!/usr/bin/perl if ($ARGV[0] eq "-h"){ - $dir = $ARGV[1]; + $sourcedir = $ARGV[1]; + $dir = $sourcedir; $html = 1; shift @ARGV; shift @ARGV; } +if ($ARGV[0] eq "-t"){ + $dir = $ARGV[1]; + shift @ARGV; +} + if ($html){ - opendir (D, "$dir/sources/") || die "Can not open $dir"; + opendir (D, "$sourcedir/sources/") || die "Can not open $dir"; while ($n = readdir (D)){ if ($n =~ /mono-api-.*\.html$/){ - open (IN, "$dir/sources/$n") || die "Can not open $n"; + open (IN, "$sourcedir/sources/$n") || die "Can not open $n"; $files[$filecount] = $n; while (<IN>){ @files_content[$filecount] .= $_; |