Removed the whom program, which relayed on post(8) functionality.
[mmh] / man / Makefile.in
1 #
2 # Makefile for man subdirectory
3 #
4
5 VERSION = @VERSION@
6 DATE = @DATE@
7
8 SHELL = /bin/sh
9
10 top_srcdir = @top_srcdir@
11 srcdir     = @srcdir@
12 VPATH      = @srcdir@
13
14 prefix      = @prefix@
15 exec_prefix = @exec_prefix@
16 bindir      = @bindir@
17 libdir      = @libdir@
18 etcdir      = @sysconfdir@
19 mandir      = @mandir@
20 manext1     = 1
21 manext5     = 5
22 manext8     = 8
23
24 mailspool    = @mailspool@
25 sendmailpath = @sendmailpath@
26
27 INSTALL      = @INSTALL@
28 INSTALL_DATA = @INSTALL_DATA@
29
30 SED = sed
31 SEDMAN = $(SED) -f man.sed $< > $@
32
33 .SUFFIXES:
34 .SUFFIXES: .man .$(manext1) .$(manext5) .$(manext8)
35
36 .man.$(manext1):
37         $(SEDMAN)
38
39 .man.$(manext5):
40         $(SEDMAN)
41
42 .man.$(manext8):
43         $(SEDMAN)
44
45 # man pages to install in $(mandir)/$(manext1)
46 MAN1SRC = ali. anno. burst. comp. dist. flist. flists. folder. folders.    \
47        forw. inc. install-mh. mark. mh-chart. nmh. mhbuild. mhl. mhlist.   \
48        mhmail. mhparam. mhpath. mhshow. mhstore. msgchk. new. fnext.       \
49        fprev. unseen. next. packf. pick. prev. prompter. rcvdist. rcvpack. \
50        rcvstore. rcvtty. refile. repl. rmf. rmm. scan. send. sendfiles.    \
51        show. slocal. sortm. whatnow.
52
53 MAN5SRC = mh-alias. mh-draft. mh-format. mh-mail. mh-profile. mh-sequence. \
54        mh-tailor. mts.conf.
55
56 MAN8SRC = ap. conflict. dp. fmtdump. post.
57
58 MAN1 = $(MAN1SRC:.=.$(manext1))
59 MAN5 = $(MAN5SRC:.=.$(manext5))
60 MAN8 = $(MAN8SRC:.=.$(manext8))
61
62 # source for man pages
63 DIST_MANSRC = $(MAN1SRC) $(MAN5SRC) $(MAN8SRC)
64 DIST_MAN = $(DIST_MANSRC:.=.man)
65
66 # auxiliary files
67 AUX = Makefile.in
68
69 # all files in this directory included in the distribution
70 DIST = $(DIST_MAN) $(AUX)
71
72 # ========= DEFAULT TARGET ==========
73
74 all: $(MAN1) $(MAN5) $(MAN8)
75
76 $(MAN1) $(MAN5) $(MAN8): man.sed
77
78 # create the sed file for building man pages
79 man.sed: Makefile
80         echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED.  DO NOT EDIT.,g' > $@
81         echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
82         echo 's,%nmhdate%,$(DATE),g' >> $@
83         echo 's,%bindir%,$(bindir),g' >> $@
84         echo 's,%etcdir%,$(etcdir),g' >> $@
85         echo 's,%libdir%,$(libdir),g' >> $@
86         echo 's,%mandir%,$(mandir),g' >> $@
87         echo 's,%mailspool%,$(mailspool),g' >> $@
88         echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
89         echo 's,%manext1%,$(manext1),g' >> $@
90         echo 's,%manext5%,$(manext5),g' >> $@
91         echo 's,%manext8%,$(manext8),g' >> $@
92         echo '/%components%/r $(top_srcdir)/etc/components' >> $@
93         echo ' s,%components%,,g' >> $@
94         echo '/%distcomps%/r $(top_srcdir)/etc/distcomps' >> $@
95         echo ' s,%distcomps%,,g' >> $@
96         echo '/%forwcomps%/r $(top_srcdir)/etc/forwcomps' >> $@
97         echo ' s,%forwcomps%,,g' >> $@
98         echo '/%mhl_forward%/r $(top_srcdir)/etc/mhl.forward' >> $@
99         echo ' s,%mhl_forward%,,g' >> $@
100         echo '/%mhl_format%/r $(top_srcdir)/etc/mhl.format' >> $@
101         echo ' s,%mhl_format%,,g' >> $@
102         echo '/%mhl_reply%/r $(top_srcdir)/etc/mhl.reply' >> $@
103         echo ' s,%mhl_reply%,,g' >> $@
104
105 # ========= INSTALL TARGETS =========
106
107 install: install-man1 install-man5 install-man8
108
109 # install the man pages in man1
110 install-man1:
111         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext1)
112         for file in $(MAN1); do \
113           $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext1) ; \
114         done
115
116 # install the man pages in man5
117 install-man5:
118         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext5)
119         for file in $(MAN5); do \
120           $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext5) ; \
121         done
122         if [ ! -f $(DESTDIR)$(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
123           ( cd $(DESTDIR)$(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
124             mh_profile.$(manext5) ) \
125         fi
126
127 # install the man pages in man8
128 install-man8:
129         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext8)
130         for file in $(MAN8); do \
131           $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext8) ; \
132         done
133
134 # ========= UNINSTALL TARGETS =========
135
136 uninstall: uninstall-man1 uninstall-man5 uninstall-man8
137
138 # uninstall the man pages in man1
139 uninstall-man1:
140         for file in $(MAN1); do \
141           rm -f $(DESTDIR)$(mandir)/man$(manext1)/$$file; \
142         done
143
144 # uninstall the man pages in man5
145 uninstall-man5:
146         for file in $(MAN5); do \
147           rm -f $(DESTDIR)$(mandir)/man$(manext5)/$$file; \
148         done
149
150 # uninstall the man pages in man8
151 uninstall-man8:
152         for file in $(MAN8); do \
153           rm -f $(DESTDIR)$(mandir)/man$(manext8)/$$file; \
154         done
155
156 # ========== DEPENDENCIES FOR CLEANUP ==========
157
158 mostlyclean:
159         rm -f *~
160
161 clean: mostlyclean
162         rm -f man.sed *.$(manext1) *.$(manext5) *.$(manext8)
163
164 distclean: clean
165         rm -f Makefile
166
167 realclean: distclean
168
169 superclean: realclean
170
171 lint:
172
173 # ========== DEPENDENCIES FOR MAINTENANCE ==========
174
175 subdir = man
176
177 Makefile: Makefile.in ../config.status
178         cd .. && ./config.status $(subdir)/$@
179
180 distdir = ../`cat ../distname`/$(subdir)
181 nmhdist: $(DIST)
182         @echo "Copying distribution files in $(subdir)"
183         @for file in $(DIST); do \
184           cp -p $(srcdir)/$$file $(distdir); \
185         done
186