~ojwb/survex/master

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
## Process this file with automake to produce Makefile.in

pkgdocdir = $(prefix)/doc/@PACKAGE@

doclist = @DOCS_OTHER@

other_mans = cad3d.1 cavern.1 diffpos.1 extend.1 \
 printdm.1 printhpgl.1 printpcl.1 printps.1 @EXTRA_MANS@

#can produce man page syntax summary from --help something like
#SURVEXHOME=lib src/xcaverot --help | grep -i ^syntax |
#sed 's!^[^ ]* \(.*/\)\?!!;s!^!.B !;s! !
# !;s!\([A-Za-z0-9][A-Za-z0-9_]*\)!\\fI\1\\fR!g;s!\\fI!!;s!\\fR!!'

# People can build from CVS without sgmltools v2 or v3 installed but they
# won't be able to "make dist", which is arguably a good thing
EXTRA_DIST = manual $(doclist) manual.sgml custom.dsl survex.1.in\
 index.htm.in \
 index.htm COPYING.html TODO.html ChangeLog.html NEWS.html OLDNEWS.html

ChangeLog.html: ../ChangeLog
	./cl2html.pl '@PRETTYPACKAGE@ @VERSION@' < ../ChangeLog > ChangeLog.html

NEWS.html: ../NEWS
	./news2html.pl '@PRETTYPACKAGE@ @VERSION@' < ../NEWS > NEWS.html

OLDNEWS.html: ../OLDNEWS
	./news2html.pl < ../OLDNEWS > OLDNEWS.html

MAINTAINERCLEANFILES = $(doclist)
CLEANFILES = $(other_mans)

pkgdoc_DATA = index.htm COPYING.html TODO.html ChangeLog.html\
 NEWS.html OLDNEWS.html $(doclist)

man_MANS = survex.1 $(other_mans)

$(other_mans):
	ln -s $(srcdir)/survex.1 $@

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/manual; \
	if test -d "$(srcdir)/manual" ; then \
	  for p in `find "$(srcdir)/manual" -name "*.htm" -type f -print` ; do \
	    f="`echo $$p | sed -e 's|^.*/|manual/|'`"; \
	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$f"; \
	    $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$f; \
	  done \
	else \
	  if test -d manual ; then \
	    for p in `find manual -name "*.htm" -type f -print` ; do \
	      f="`echo $$p | sed -e 's|^.*/|manual/|'`"; \
	      echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$f"; \
	      $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdocdir)/$$f; \
	    done \
	  fi \
	fi

uninstall-local:
	if test -d "$(srcdir)/manual" ; then \
	  for p in `find "$(srcdir)/manual" -name "*.htm" -type f -print` ; do \
	    f="`echo $$p | sed -e 's|^.*/|manual/|'`"; \
	    echo " rm -f $(DESTDIR)$(pkgdocdir)/$$f"; \
	    rm -f $(DESTDIR)$(pkgdocdir)/$$f; \
	  done \
	else \
	  if test -d manual ; then \
	    for p in `find manual -name "*.htm" -type f -print` ; do \
	      f="`echo $$p | sed -e 's|^.*/|manual/|'`"; \
	      echo " rm -f $(DESTDIR)$(pkgdocdir)/$$f"; \
	      rm -f $(DESTDIR)$(pkgdocdir)/$$f; \
	    done \
	  fi \
	fi

manual: manual.sgml custom.dsl
	@sgmltools@ --backend=html --dsssl-spec=custom.dsl#html manual.sgml

manual.htm: manual.sgml custom.dsl
	@sgmltools@ --backend=onehtml --dsssl-spec=custom.dsl#onehtml manual.sgml
	mv -f manual.html manual.htm

manual.rtf: manual.sgml
	@sgmltools@ --backend=rtf manual.sgml

manual.txt: manual.sgml
	@sgmltools@ --backend=txt manual.sgml

manual.ps: manual.sgml
	@sgmltools@ --backend=ps manual.sgml