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