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