1## Process this file with automake to produce Makefile.in 2# Makefile for GNU CVS documentation (excluding man pages - see ../man). 3# 4# Copyright (C) 1986-2005 The Free Software Foundation, Inc. 5# 6# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>, 7# and others. 8 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) 12# any later version. 13 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. 18 19SUBDIRS = i18n 20 21info_TEXINFOS = cvs.texinfo cvsclient.texi 22man_MANS = $(srcdir)/cvs.1 23 24PSS = \ 25 cvs.ps \ 26 cvs-paper.ps \ 27 cvsclient.ps 28 29PDFS = \ 30 cvs.pdf \ 31 $(srcdir)/cvs-paper.pdf \ 32 cvsclient.pdf 33 34TXTS = \ 35 cvs.txt \ 36 cvsclient.txt 37 38EXTRA_DIST = \ 39 .cvsignore \ 40 ChangeLog.fsf \ 41 HACKING.DOCS \ 42 RCSFILES \ 43 $(srcdir)/cvs.1 \ 44 cvs-paper.ms \ 45 cvs.man.header \ 46 cvs.man.footer \ 47 getdate.texi \ 48 mdate-sh \ 49 writeproxy.rtf \ 50 $(PDFS) 51 52MOSTLYCLEANFILES = 53 54CLEANFILES = \ 55 $(PSS) \ 56 $(TXTS) 57 58DISTCLEANFILES = 59 60MAINTAINERCLEANFILES = \ 61 $(PDFS) 62 63doc: info pdf 64.PHONY: doc 65 66txt: $(TXTS) 67.PHONY: txt 68 69dvi: cvs.dvi cvsclient.dvi 70.PHONY: dvi 71 72# FIXME-AUTOMAKE: 73# For some reason if I remove version.texi, it doesn't get built automatically. 74# This needs to be fixed in automake. 75cvs.txt: cvs.texinfo $(srcdir)/version.texi 76cvsclient.txt: cvsclient.texi $(srcdir)/version-client.texi 77 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. 83# 84# It is possible that an implicit .ms.ps target could be safely defined. I 85# don't recall looking into it. 86cvs-paper.ps: cvs-paper.ms 87 $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t 88 cp cvs-paper.ps-t $@ 89 -@rm -f cvs-paper.ps-t 90 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 97 cp cvs-paper.pdf-t $@ 98 -@rm -f cvs-paper.pdf-t cvs-paper.ps-t 99 100MOSTLYCLEANFILES += cvs-paper.pdf-t cvs-paper.ps-t 101 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 107 -@rm -f cvs.tmp 108MAINTAINERCLEANFILES += $(srcdir)/cvs.1 109 110cvs.dvi cvs.html $(srcdir)/cvs.info cvs.pdf cvs.ps cvs.txt: $(srcdir)/getdate-cvs.texi 111$(srcdir)/getdate-cvs.texi: stamp-gdt 112stamp-gdt: getdate.texi 113 @echo "@c This file is generated via a rule in Makefile.am from the" \ 114 >getdate-cvs.tmp 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 $@ 129 130## If getdate-cvs.texi is not distributed, infos get rebuilt at every install. 131## This is a pretty big no-no. 132EXTRA_DIST += getdate-cvs.texi 133MOSTLYCLEANFILES += getdate-cvs.tmp 134DISTCLEANFILES += stamp-gdt 135 136# texinfo based targets automake neglects to include 137SUFFIXES = .txt 138.texinfo.txt: 139 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ 140 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$< 141.txi.txt: 142 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ 143 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$< 144.texi.txt: 145 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ 146 --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$< 147 148## 149## MAINTAINER Targets 150## 151 152# for backwards compatibility with the old makefiles 153realclean: maintainer-clean 154.PHONY: realclean 155