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