Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / doc / Makefile
CommitLineData
39a938f7 1all: man index.html
2
3# Decide on the versionid policy.
4#
5# If the user has passed in $(VERSION) on the command line (`make
6# VERSION="Release 0.56"'), we use that as an explicit version
7# string. Otherwise, we use `svnversion' to examine the checked-out
8# documentation source, and if that returns a single revision
9# number then we invent a version string reflecting just that
10# number. Failing _that_, we resort to versionids.but which shows a
11# $Id for each individual file.
12#
13# So here, we define VERSION using svnversion if it isn't already
14# defined ...
15ifndef VERSION
16SVNVERSION=$(shell test -d .svn && svnversion .)
17BADCHARS=$(findstring :,$(SVNVERSION))$(findstring S,$(SVNVERSION))
18ifeq ($(BADCHARS),)
19ifneq ($(SVNVERSION),)
2ce79856 20ifneq ($(SVNVERSION),exported)
39a938f7 21VERSION=Built from revision $(patsubst M,,$(SVNVERSION))
22endif
23endif
24endif
2ce79856 25endif
39a938f7 26# ... and now, we condition our build behaviour on whether or not
27# VERSION _is_ defined.
28ifdef VERSION
29VERSIONIDS=vstr
30vstr.but: FORCE
31 echo \\versionid $(VERSION) > vstr.but
32FORCE:;
33else
34VERSIONIDS=vids
35endif
36
78189bb3 37CHAPTERS := $(SITE) blurb intro gs using config pscp psftp plink pubkey
0dbf4465 38CHAPTERS += pageant errors faq feedback licence udp pgpkeys sshnames
39a938f7 39CHAPTERS += index $(VERSIONIDS)
e5b0d077 40
41INPUTS = $(patsubst %,%.but,$(CHAPTERS))
42
43# This is temporary. Hack it locally or something.
d9dcb3de 44HALIBUT = halibut
e5b0d077 45
02d88d11 46index.html: $(INPUTS)
47 $(HALIBUT) --text --html --winhelp $(INPUTS)
e3e5784e 48
1e07e676 49# During formal builds it's useful to be able to build this one alone.
50putty.hlp: $(INPUTS)
51 $(HALIBUT) --winhelp $(INPUTS)
52
cdb9e822 53putty.info: $(INPUTS)
54 $(HALIBUT) --info $(INPUTS)
55
cb2708d3 56chm: putty.hhp
57putty.hhp: $(INPUTS) chm.but
58 $(HALIBUT) --html $(INPUTS) chm.but
59
02d88d11 60MKMAN = $(HALIBUT) --man=$@ mancfg.but $<
e3e5784e 61MANPAGES = putty.1 puttygen.1 plink.1 pscp.1 psftp.1 puttytel.1 pterm.1
62man: $(MANPAGES)
63
64putty.1: man-putt.but mancfg.but; $(MKMAN)
65puttygen.1: man-pg.but mancfg.but; $(MKMAN)
66plink.1: man-pl.but mancfg.but; $(MKMAN)
67pscp.1: man-pscp.but mancfg.but; $(MKMAN)
68psftp.1: man-psft.but mancfg.but; $(MKMAN)
69puttytel.1: man-ptel.but mancfg.but; $(MKMAN)
70pterm.1: man-pter.but mancfg.but; $(MKMAN)
71
3ab4da43 72mostlyclean:
73 rm -f *.html *.txt *.hlp *.cnt *.1 *.info vstr.but *.hh[pck]
74clean: mostlyclean
75 rm -f *.chm