summaryrefslogtreecommitdiff
path: root/tmac/Makefile.sub
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-11-08 16:17:34 +0000
committerwlemb <wlemb>2000-11-08 16:17:34 +0000
commit0053cfb4ddac6e7cb805fc1ff921dfa2874aa167 (patch)
tree60b76f768cc7b6c7c286c554726dc8acc8594aff /tmac/Makefile.sub
parentde53a3cd17c746ea6d29ad82adc814ffae66b25c (diff)
downloadgroff-0053cfb4ddac6e7cb805fc1ff921dfa2874aa167.tar.gz
Add system tmac directory (/usr/local/lib/groff/site-tmac).
* Makefile.in: Add $(libdir), $(libprogramdir), and $(systemtmacdir). (uninstall_dirs): Add $(libdir), $(libprogramdir), and $(systemtmacdir). Use @libdir@. * Makefile.comm (.man.n): Add @SYSTEMMACRODIR@. * tmac/Makefile.sub (install_data): Create $(systemtmacdir) and $(localtmacdir). (uninstall_sub): Use $(systemtmacdir) for wrapper macros. * man/roff.man, src/roff/troff/troff.man, src/roff/groff/groff.man, NEWS, doc/groff.texinfo: Updated and minor fixes. * Makefile.comm, Makefile.in: Added tmac_{s,an}_prefix stuff again. * tmac/Makefile.sub: Added `wrap' stuff again, but installing into $(systemtmacdir) since the wrapper files are platform-dependent. * doc/groff.texinfo: Fix typo.
Diffstat (limited to 'tmac/Makefile.sub')
-rw-r--r--tmac/Makefile.sub59
1 files changed, 55 insertions, 4 deletions
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index e809d460..c2c930b6 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -9,9 +9,8 @@ MAN7=\
groff_markup.n
NORMALFILES=\
- mandoc.tmac andoc.tmac an-old.tmac man.tmac an.tmac \
+ mandoc.tmac andoc.tmac an-old.tmac \
me.tmac \
- ms.tmac s.tmac \
mdoc.tmac \
pic.tmac \
a4.tmac \
@@ -25,21 +24,43 @@ NORMALFILES=\
eqnrc \
troffrc troffrc-end \
hyphen.us
+SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac
STRIPFILES=e.tmac doc.tmac doc-old.tmac
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
mdocdir=$(tmacdir)/mdoc
CLEANADD=\
+ stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed \
stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s
+tmac_s_prefix=
+tmac_an_prefix=
+tmac_wrap=
+sys_tmac_prefix=
-all: stamp-strip
+all: stamp-strip stamp-wrap stamp-sed
-install_data: $(NORMALFILES) man.local stamp-strip
+install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
+ stamp-strip stamp-wrap stamp-sed
-test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
+ -test -d $(systemtmacdir) || $(mkinstalldirs) $(systemtmacdir)
+ -test -d $(localtmacdir) || $(mkinstalldirs) $(localtmacdir)
+ if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ $(INSTALL_DATA) $$m-wrap $(systemtmacdir)/$$m.tmac; \
+ done; \
+ fi
for f in $(NORMALFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
done
+ -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac
+ $(INSTALL_DATA) $(srcdir)/s.tmac $(tmacdir)/$(tmac_s_prefix)s.tmac
+ -rm -f $(tmacdir)/ms.tmac
+ $(INSTALL_DATA) ms.tmac-sed $(tmacdir)/ms.tmac
+ -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac
+ $(INSTALL_DATA) $(srcdir)/an.tmac $(tmacdir)/$(tmac_an_prefix)an.tmac
+ -rm -f $(tmacdir)/man.tmac
+ $(INSTALL_DATA) man.tmac-sed $(tmacdir)/man.tmac
for f in $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \
@@ -59,10 +80,40 @@ stamp-strip: $(STRIPFILES) $(MDOCFILES)
done
touch $@
+stamp-wrap:
+ if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ rm -f $$m-wrap; \
+ if test "$$m" = an; then \
+ echo .do mso andoc.tmac >>$$m-wrap; \
+ fi; \
+ echo .cp 1 >>$$m-wrap; \
+ echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \
+ done; \
+ fi
+ touch $@
+
+stamp-sed: man.tmac ms.tmac
+ for f in man.tmac ms.tmac; do \
+ rm -f $$f-sed; \
+ sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
+ -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
+ $(srcdir)/$$f > $$f-sed; \
+ done
+ touch $@
+
uninstall_sub:
+ -if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ rm -f $(systemtmacdir)/$$m.tmac; \
+ done; \
+ fi
-for f in $(NORMALFILES) $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
done
+ -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac
+ -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac
+ -rm -f $(tmacdir)/man.tmac $(tmacdir)/ms.tmac
-if cmp -s $(localtmacdir)/man.local $(srcdir)/man.local; then \
rm -f $(localtmacdir)/man.local; \
fi