summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.in
blob: 8aa7bc0f2510794862e05d6a443821df1ffe0abe (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# $Id$

SHELL=/bin/sh

PACKAGE=@PACKAGE@
VERSION=@VERSION@

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
mandir=@mandir@
sharedir=@sharedir@
srcdir=@srcdir@
docdir=@docdir@
top_srcdir=@top_srcdir@
top_builddir=..
VPATH=@srcdir@
@SET_MAKE@

INSTALL=@INSTALL@
CC=@CC@
XCPPFLAGS=-I. @CPPFLAGS@
CFLAGS=@CFLAGS@ -DSHAREDIR=\"$(sharedir)\" $(XCPPFLAGS)
LDFLAGS=@LDFLAGS@
subdir = doc


DISTFILES = Makefile.in dotlock.man.in  \
	manual.sgml.in mutt.man.in	\
	PGP-Notes.txt			\
	applying-patches.txt		\
	devel-notes.txt			\
	manual.txt

srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt	\
	devel-notes.txt	\
	manual.txt

topsrcdir_DOCFILES = COPYRIGHT GPL INSTALL ChangeLog	\
	README NEWS TODO

DOCFILES = manual.txt


all: mutt.man dotlock.man try-html try-txt

complete: all html

# We don't ship the html stuff, but we build and install it
# if sgml2html is available.  Instead of nifty autoconf magic,
# we just do this in the makefile. ;)

try-html:
	-$(MAKE) html

try-txt:
	-$(MAKE) manual.txt

html: manual.html

install: dotlock.man mutt.man all
	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
	$(INSTALL) -m 644 mutt.man $(DESTDIR)$(mandir)/man1/mutt.1
	$(INSTALL) -m 644 dotlock.man $(DESTDIR)$(mandir)/man1/mutt_dotlock.1
	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)
	for f in $(DOCFILES) ; do $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; done
	for f in $(srcdir_DOCFILES) ; do $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; done
	for f in $(topsrcdir_DOCFILES) ; do $(INSTALL) -m 644 $(top_srcdir)/$$f $(DESTDIR)$(docdir) ; done
	if [ -f manual.html ] ; then \
		$(MAKE) install-html ; \
	fi
		
install-html: html
	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/html
	for f in manual*.html ; do $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/html ; done


uninstall:
	-rm -f $(DESTDIR)$(mandir)/man1/mutt.1
	-rm -rf $(DESTDIR)$(docdir)

manual.txt: manual.sgml
	sgml2txt -c latin manual

manual.html: manual.sgml
	sgml2html manual

clean: 
	rm -f *~ *.html *.orig *.rej *.man manual.sgml

clean-real:
	rm -f manual.txt

maintainer-clean: clean clean-real distclean

distclean: clean
	rm -f Makefile

Makefile: Makefile.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

mutt.man: mutt.man.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

dotlock.man: dotlock.man.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

manual.sgml: manual.sgml.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: Makefile $(DISTFILES)
	for file in $(DISTFILES) ; do				\
		ln $(srcdir)/$$file $(distdir) 2> /dev/null 	\
			|| cp -p $(srcdir)/$$file $(distdir); 	\
	done