diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-01T15·41+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-01T15·41+0100 |
commit | 2f9bb5c7e744ddca3fbe5576e520a3e80c106c55 (patch) | |
tree | 7a3d5d57a460aa87a8f8b58d46102ca339e97770 /doc | |
parent | c5ba08133370f98de722c978bda3b446721985de (diff) | |
parent | 6dca72006aa9b1cf2f226bb5b538e744fcab976f (diff) |
Merge branch 'make'
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 1 | ||||
-rw-r--r-- | doc/manual/Makefile.am | 117 | ||||
-rw-r--r-- | doc/manual/local.mk | 86 |
3 files changed, 86 insertions, 118 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index e76efafdb8a2..000000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = manual diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am deleted file mode 100644 index 56be7e1b88ed..000000000000 --- a/doc/manual/Makefile.am +++ /dev/null @@ -1,117 +0,0 @@ -XMLLINT = $(xmllint) --nonet $(xmlflags) -XSLTPROC = $(xsltproc) --nonet $(xmlflags) \ - --param section.autolabel 1 \ - --param section.label.includes.component.label 1 \ - --param html.stylesheet \'style.css\' \ - --param xref.with.number.and.title 1 \ - --param toc.section.depth 3 \ - --param admon.style \'\' \ - --param callout.graphics.extension \'.gif\' \ - --param contrib.inline.enabled 0 - -dblatex_opts = \ - -P doc.collab.show=0 \ - -P latex.output.revhistory=0 - -# Note: we use GIF for now, since the PNGs shipped with Docbook aren't -# transparent. - -man1_MANS = nix-env.1 nix-build.1 nix-shell.1 nix-store.1 nix-instantiate.1 \ - nix-collect-garbage.1 nix-push.1 nix-pull.1 \ - nix-prefetch-url.1 nix-channel.1 \ - nix-install-package.1 nix-hash.1 nix-copy-closure.1 - -man5_MANS = nix.conf.5 - -man8_MANS = nix-daemon.8 - -FIGURES = figures/user-environments.png - -MANUAL_SRCS = manual.xml introduction.xml installation.xml \ - package-management.xml writing-nix-expressions.xml builtins.xml \ - build-farm.xml \ - $(man1_MANS:.1=.xml) $(man8_MANS:.8=.xml) \ - troubleshooting.xml bugs.xml opt-common.xml opt-common-syn.xml opt-inst-syn.xml \ - env-common.xml quick-start.xml nix-lang-ref.xml glossary.xml \ - conf-file.xml release-notes.xml \ - style.css images - -# Do XInclude processing. -manual.xmli: $(MANUAL_SRCS) version.txt - $(XMLLINT) --xinclude $< -o $@.tmp - mv $@.tmp $@ - -# Note: RelaxNG validation requires xmllint >= 2.7.4. -manual.is-valid: manual.xmli - $(XSLTPROC) --novalid --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ - $(XMLLINT) --noout --relaxng $(docbookrng)/docbook.rng - - touch $@ - -version.txt: - echo -n $(VERSION) > version.txt - -man $(MANS): manual.is-valid - $(XSLTPROC) --stringparam profile.condition manpage \ - $(docbookxsl)/profiling/profile.xsl manual.xmli 2> /dev/null | \ - $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl - - -manual.html: $(MANUAL_SRCS) manual.is-valid images - $(XSLTPROC) --xinclude --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl manual.xml | \ - $(XSLTPROC) --output manual.html $(docbookxsl)/html/docbook.xsl - - -manual.pdf: $(MANUAL_SRCS) manual.is-valid images - if test "$(dblatex)" != ""; then \ - $(XSLTPROC) --xinclude --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl manual.xml | \ - $(dblatex) -o manual.pdf $(dblatex_opts) -; \ - else \ - echo "Please install dblatex and rerun configure."; \ - exit 1; \ - fi - - -NEWS_OPTS = \ - --stringparam generate.toc "article nop" \ - --stringparam section.autolabel.max.depth 0 \ - --stringparam header.rule 0 - -NEWS.html: release-notes.xml - $(XSLTPROC) --xinclude --output $@ $(NEWS_OPTS) \ - $(docbookxsl)/html/docbook.xsl release-notes.xml - -NEWS.txt: release-notes.xml - $(XSLTPROC) --xinclude quote-literals.xsl release-notes.xml | \ - $(XSLTPROC) --output $@.tmp.html $(NEWS_OPTS) \ - $(docbookxsl)/html/docbook.xsl - - LANG=en_US $(w3m) -dump $@.tmp.html > $@ - rm $@.tmp.html - - -all-local: manual.html NEWS.html NEWS.txt - -install-data-local: manual.html - $(INSTALL) -d $(DESTDIR)$(docdir)/manual - $(INSTALL_DATA) manual.html $(DESTDIR)$(docdir)/manual - ln -sf manual.html $(DESTDIR)$(docdir)/manual/index.html - $(INSTALL_DATA) style.css $(DESTDIR)$(docdir)/manual - cp -r images $(DESTDIR)$(docdir)/manual/images - $(INSTALL) -d $(DESTDIR)$(docdir)/manual/figures - $(INSTALL_DATA) $(FIGURES) $(DESTDIR)$(docdir)/manual/figures - $(INSTALL) -d $(DESTDIR)$(docdir)/release-notes - $(INSTALL_DATA) NEWS.html $(DESTDIR)$(docdir)/release-notes/index.html - $(INSTALL_DATA) style.css $(DESTDIR)$(docdir)/release-notes/ - -images: - mkdir images -# cp $(docbookxsl)/images/*.gif images - mkdir images/callouts - cp $(docbookxsl)/images/callouts/*.gif images/callouts - chmod -R +w images - -KEEP = manual.html manual.xmli manual.is-valid version.txt $(MANS) NEWS.html NEWS.txt - -EXTRA_DIST = $(MANUAL_SRCS) $(FIGURES) $(KEEP) - -DISTCLEANFILES = $(KEEP) diff --git a/doc/manual/local.mk b/doc/manual/local.mk new file mode 100644 index 000000000000..4342215b0e44 --- /dev/null +++ b/doc/manual/local.mk @@ -0,0 +1,86 @@ +XSLTPROC = $(xsltproc) --nonet $(xmlflags) \ + --param section.autolabel 1 \ + --param section.label.includes.component.label 1 \ + --param html.stylesheet \'style.css\' \ + --param xref.with.number.and.title 1 \ + --param toc.section.depth 3 \ + --param admon.style \'\' \ + --param callout.graphics.extension \'.gif\' \ + --param contrib.inline.enabled 0 + +MANUAL_SRCS := $(wildcard $(d)/*.xml) + + +# Do XInclude processing / RelaxNG validation +$(d)/manual.xmli: $(d)/manual.xml $(MANUAL_SRCS) $(d)/version.txt + $(trace-gen) $(xmllint) --nonet --xinclude $< -o $@.tmp + @mv $@.tmp $@ + +$(d)/version.txt: + $(trace-gen) echo -n $(PACKAGE_VERSION) > $@ + +# Note: RelaxNG validation requires xmllint >= 2.7.4. +$(d)/manual.is-valid: $(d)/manual.xmli + $(trace-gen) $(XSLTPROC) --novalid --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ + $(xmllint) --nonet --noout --relaxng $(docbookrng)/docbook.rng - + @touch $@ + +clean-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid + +dist-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid + + +# Generate man pages. +man-pages := $(foreach n, \ + nix-env.1 nix-build.1 nix-shell.1 nix-store.1 nix-instantiate.1 \ + nix-collect-garbage.1 nix-push.1 nix-pull.1 \ + nix-prefetch-url.1 nix-channel.1 \ + nix-install-package.1 nix-hash.1 nix-copy-closure.1 \ + nix.conf.5 nix-daemon.8, \ + $(d)/$(n)) + +$(man-pages): $(d)/manual.xmli $(d)/manual.is-valid + $(trace-gen) $(XSLTPROC) --stringparam profile.condition manpage \ + $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ + (cd doc/manual && $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl -) + +clean-files += $(d)/*.1 $(d)/*.5 $(d)/*.8 + +dist-files += $(man-pages) + + +# Generate the HTML manual. +$(d)/manual.html: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid + $(trace-gen) $(XSLTPROC) --xinclude --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl $< | \ + $(XSLTPROC) --output $@ $(docbookxsl)/html/docbook.xsl - + +$(foreach file, $(d)/manual.html $(d)/style.css, $(eval $(call install-data-in, $(file), $(docdir)/manual))) + +$(foreach file, $(wildcard $(d)/figures/*.png), $(eval $(call install-data-in, $(file), $(docdir)/manual/figures))) + +$(foreach file, $(wildcard $(docbookxsl)/images/callouts/*.gif), $(eval $(call install-data-in, $(file), $(docdir)/manual/images/callouts))) + +$(eval $(call install-symlink, manual.html, $(docdir)/manual/index.html)) + +all: $(d)/manual.html + +clean-files += $(d)/manual.html + +dist-files += $(d)/manual.html + + +# Generate the PDF manual. +$(d)/manual.pdf: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid + $(trace-gen) if test "$(dblatex)" != ""; then \ + cd doc/manual && $(XSLTPROC) --xinclude --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl manual.xml | \ + $(dblatex) -o manual.pdf $(dblatex_opts) -; \ + else \ + echo "Please install dblatex and rerun configure."; \ + exit 1; \ + fi + +clean-files += $(d)/manual.pdf + |