source: git/doc/Makefile.am @ 07d0169

stereo-2025warn-only-for-hanging-survey
Last change on this file since 07d0169 was 07d0169, checked in by Olly Betts <olly@…>, 12 months ago

Protect man generation from parallel make

  • Property mode set to 100644
File size: 3.1 KB
Line 
1## Process this file with automake to produce Makefile.in
2
3pkgdocdir = @PKGDOCDIR@
4
5man_sources = \
6    aven.rst \
7    cavern.rst \
8    diffpos.rst \
9    dump3d.rst \
10    extend.rst \
11    sorterr.rst \
12    survexport.rst \
13    survex.rst
14
15manual_sources = \
16    index.rst \
17    intro.rst \
18    getstart.rst \
19    cmdline.rst \
20    $(man_sources) \
21    datafile.rst \
22    svxhowto.rst \
23    genhowto.rst \
24    compass.rst \
25    maillist.rst \
26    walls.rst \
27    cmap.rst \
28    future.rst
29
30manual_alt = manual.pdf
31
32HTMLFILES= AUTHORS.htm HACKING.htm NEWS.htm OLDNEWS.htm TODO.htm index.htm \
33 3dformat.htm 3dformat-old.htm
34
35NEWS.htm: ../NEWS news2html.pl
36        ./news2html.pl '@PRETTYPACKAGE@ @VERSION@' < ../NEWS > NEWS.htm
37
38OLDNEWS.htm: ../OLDNEWS news2html.pl
39        ./news2html.pl < ../OLDNEWS > OLDNEWS.htm
40
41MAINTAINERCLEANFILES = $(manual_alt) NEWS.htm OLDNEWS.htm
42
43pkgdoc_DATA = $(HTMLFILES) $(manual_alt)
44
45man_MANS = \
46    aven.1 \
47    cavern.1 \
48    diffpos.1 \
49    dump3d.1 \
50    extend.1 \
51    sorterr.1 \
52    survexport.1 \
53    survex.7
54
55EXTRA_DIST = $(HTMLFILES) manual $(manual_alt) \
56 $(manual_sources) conf.py \
57 $(man_MANS) \
58 news2html.pl
59
60# Export these as an environment variables for use by conf.py
61export PKGDOCDIR_EXPANDED
62export VERSION
63
64# Recover from the removal of $@.  A full explanation of this is in the
65# automake manual under the heading "Multiple Outputs".
66$(man_MANS): man.stamp
67        @if test -f $@; then :; else \
68          trap 'rm -rf man.lock data.stamp' 1 2 13 15; \
69          if mkdir man.lock 2>/dev/null; then \
70            rm -f man.stamp; \
71            $(MAKE) $(AM_MAKEFLAGS) man.stamp; \
72            result=$$?; rm -rf man.lock; exit $$result; \
73          else \
74            while test -d man.lock; do sleep 1; done; \
75            test -f man.stamp; \
76          fi; \
77        fi
78
79man.stamp: $(man_sources) $(srcdir)/../configure.ac
80        @rm -f $@-t
81        @touch $@-t
82        $(SPHINX_BUILD) -b man $(srcdir) man.tmp $<
83        mv man.tmp/*.1 man.tmp/*.7 .
84        rm -rf man.tmp
85        @mv -f $@-t $@
86
87install-data-local: manual
88        $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/manual/_static
89        test ! -d manual -a -d "$(srcdir)/manual" && cd $(srcdir) ; \
90        for p in manual/*.htm manual/*.js manual/_static/*.js manual/_static/*.css ; do \
91          echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$p"; \
92          $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$p; \
93        done
94
95uninstall-local:
96        test ! -d manual -a -d "$(srcdir)/manual" && cd $(srcdir) ; \
97        for p in manual/*.htm manual/*.js manual/_static/*.js manual/_static/*.css ; do \
98          echo " rm -f $(DESTDIR)$(pkgdocdir)/$$p"; \
99          rm -f $(DESTDIR)$(pkgdocdir)/$$p; \
100        done
101        -rmdir $(DESTDIR)$(pkgdocdir)/manual/_static
102        -rmdir $(DESTDIR)$(pkgdocdir)/manual
103
104maintainer-clean-local:
105        rm -rf manual "$(srcdir)/manual"
106
107manual: manual/stampfile ../configure.ac
108manual/stampfile: $(manual_sources)
109        rm -rf manual
110        $(SPHINX_BUILD) -b html . manual
111        touch manual/stampfile
112
113manual.pdf: $(manual_sources) ../configure.ac
114        $(SPHINX_BUILD) -M latexpdf $(srcdir) manual.latex
115        mv manual.latex/latex/survex.pdf manual.pdf
116        rm -rf manual.latex
117
118# The rules below aren't used by the build system - they're for "manual" use
119# (ho ho)
120
121manual.html: $(manual_sources) ../configure.ac
122        $(SPHINX_BUILD) -b singlehtml . tmpx
Note: See TracBrowser for help on using the repository browser.