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