source: trunk/third/nmh/man/Makefile.in @ 12486

Revision 12486, 6.0 KB checked in by danw, 26 years ago (diff)
DESTDIR support
Line 
1#
2# Makefile for man subdirectory
3#
4# $Id: Makefile.in,v 1.2 1999-02-13 00:41:06 danw Exp $
5#
6
7VERSION = @VERSION@
8
9SHELL = /bin/sh
10
11top_srcdir = @top_srcdir@
12srcdir     = @srcdir@
13VPATH      = @srcdir@
14
15prefix      = @prefix@
16exec_prefix = @exec_prefix@
17bindir      = @bindir@
18libdir      = @libdir@
19etcdir      = @sysconfdir@
20mandir      = @mandir@
21manext1     = 1
22manext5     = 5
23manext8     = 8
24
25mailspool    = @mailspool@
26sendmailpath = @sendmailpath@
27
28default_editor = @editorpath@
29default_pager = @pagerpath@
30
31INSTALL      = @INSTALL@
32INSTALL_DATA = @INSTALL_DATA@
33
34SED = sed
35SEDMAN = $(SED) -f man.sed $< > $@
36
37# sed line for editing pop information in man pages
38POPSED = @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.
54HDR = tmac.h
55
56# input file for header
57DIST_HDR = tmac.h.in
58
59# man pages to install in $(mandir)/$(manext1)
60MAN1 = 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
73MAN5 = mh-alias.$(manext5) mh-draft.$(manext5) mh-format.$(manext5) \
74       mh-mail.$(manext5) mh-profile.$(manext5) mh-sequence.$(manext5) \
75       mh-tailor.$(manext5)
76
77MAN8 = ap.$(manext8) conflict.$(manext8) dp.$(manext8) \
78       fmtdump.$(manext8) install-mh.$(manext8) mh-mts.$(manext8) \
79       post.$(manext8)
80
81# source for man pages
82DIST_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
95AUX = Makefile.in
96
97# all files in this directory included in the distribution
98DIST = $(DIST_HDR) $(DIST_MAN) $(AUX)
99
100# ========= DEFAULT TARGET ==========
101
102all: tmac.h $(MAN1) $(MAN5) $(MAN8)
103
104$(MAN1) $(MAN5) $(MAN8): man.sed
105
106tmac.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
110man.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
128install: install-hdr install-man1 install-man5 install-man8
129
130# install the include file for man pages
131install-hdr:
132        $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
133        $(INSTALL_DATA) tmac.h $(DESTDIR)$(etcdir)/tmac.h
134
135# install the man pages in man1
136install-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
143install-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
150install-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
158uninstall: uninstall-hdr uninstall-man1 uninstall-man5 uninstall-man8
159
160# uninstall the include file for man pages
161uninstall-hdr:
162        rm -f $(DESTDIR)$(etcdir)/tmac.h
163
164# uninstall the man pages in man1
165uninstall-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
171uninstall-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
177uninstall-man8:
178        for file in $(MAN8); do \
179          rm -f $(DESTDIR)$(mandir)/man$(manext8)/$$file; \
180        done
181
182# ========== DEPENDENCIES FOR CLEANUP ==========
183
184mostlyclean:
185        rm -f *~
186
187clean: mostlyclean
188        rm -f man.sed tmac.h *.$(manext1) *.$(manext5) *.$(manext8)
189
190distclean: clean
191        rm -f Makefile
192
193realclean: distclean
194
195superclean: realclean
196
197# ========== DEPENDENCIES FOR MAINTENANCE ==========
198
199subdir = man
200
201Makefile: Makefile.in ../config.status
202        cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
203 
204distdir = ../`cat ../distname`/$(subdir)
205nmhdist: $(DIST)
206        @echo "Copying distribution files in $(subdir)"
207        @for file in $(DIST); do \
208          cp -p $(srcdir)/$$file $(distdir); \
209        done
210
Note: See TracBrowser for help on using the repository browser.