1 ## Process this file with automake to produce Makefile.in
2 # Makefile for GNU CVS documentation (excluding man pages - see ../man).
4 # Copyright (C) 1986-2005 The Free Software Foundation, Inc.
6 # Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
21 info_TEXINFOS = cvs.texinfo cvsclient.texi
22 man_MANS = $(srcdir)/cvs.1
31 $(srcdir)/cvs-paper.pdf \
60 MAINTAINERCLEANFILES = \
69 dvi: cvs.dvi cvsclient.dvi
73 # For some reason if I remove version.texi, it doesn't get built automatically.
74 # This needs to be fixed in automake.
75 cvs.txt: cvs.texinfo $(srcdir)/version.texi
76 cvsclient.txt: cvsclient.texi $(srcdir)/version-client.texi
78 # The cvs-paper.pdf target needs to be very specific so that the other PDFs get
79 # generated correctly. If a more generic .ps.pdf implicit target is defined,
80 # and cvs.ps is made before cvs.pdf, then cvs.pdf can be generated from the
81 # .ps.pdf target and the PS source, which contains less information (hyperlinks
82 # and such) than the usual texinfo source.
84 # It is possible that an implicit .ms.ps target could be safely defined. I
85 # don't recall looking into it.
86 cvs-paper.ps: cvs-paper.ms
87 $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t
89 -@rm -f cvs-paper.ps-t
91 # This rule introduces some redundancy, but `make distcheck' requires that
92 # Nothing in $(srcdir) be rebuilt, and this will always be rebuilt when it
93 # is dependant on cvs-paper.ps and cvs-paper.ps isn't distributed.
94 $(srcdir)/cvs-paper.pdf: cvs-paper.ms
95 $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t
96 ps2pdf cvs-paper.ps-t cvs-paper.pdf-t
98 -@rm -f cvs-paper.pdf-t cvs-paper.ps-t
100 MOSTLYCLEANFILES += cvs-paper.pdf-t cvs-paper.ps-t
102 # Targets to build a man page from cvs.texinfo.
103 $(srcdir)/cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo cvs.man.footer
104 $(PERL) ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \
105 $(srcdir)/cvs.man.footer >cvs.tmp
106 cp cvs.tmp $(srcdir)/cvs.1
108 MAINTAINERCLEANFILES += $(srcdir)/cvs.1
110 cvs.dvi cvs.html $(srcdir)/cvs.info cvs.pdf cvs.ps cvs.txt: $(srcdir)/getdate-cvs.texi
111 $(srcdir)/getdate-cvs.texi: stamp-gdt
112 stamp-gdt: getdate.texi
113 @echo "@c This file is generated via a rule in Makefile.am from the" \
115 @echo "@c getdate.texi file." >>getdate-cvs.tmp
116 @echo "@c" >>getdate-cvs.tmp
117 @echo "@c *** DO NOT EDIT THIS FILE DIRECTLY ***" >>getdate-cvs.tmp
118 @echo "@c" >>getdate-cvs.tmp
119 @echo "@c Edit getdate.texi instead." >>getdate-cvs.tmp
120 @echo >>getdate-cvs.tmp
121 sed -e "s/^@chapter /@appendixsec /" \
122 -e "s/^@section /@appendixsubsec /" \
123 <$(srcdir)/getdate.texi >>getdate-cvs.tmp
124 @cmp -s getdate-cvs.tmp $(srcdir)/getdate-cvs.texi \
125 || (echo "Updating getdate-cvs.texi"; \
126 cp getdate-cvs.tmp $(srcdir)/getdate-cvs.texi)
127 -@rm -f getdate-cvs.tmp
128 @cp $(srcdir)/getdate-cvs.texi $@
130 ## If getdate-cvs.texi is not distributed, infos get rebuilt at every install.
131 ## This is a pretty big no-no.
132 EXTRA_DIST += getdate-cvs.texi
133 MOSTLYCLEANFILES += getdate-cvs.tmp
134 DISTCLEANFILES += stamp-gdt
136 # texinfo based targets automake neglects to include
139 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
140 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
142 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
143 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
145 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
146 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
149 ## MAINTAINER Targets
152 # for backwards compatibility with the old makefiles
153 realclean: maintainer-clean