freebsd-dev/contrib/groff/tmac/Makefile.sub

135 lines
3.9 KiB
Makefile
Raw Normal View History

2000-12-05 18:49:44 +00:00
MAN7=\
groff_ms.n \
groff_man.n \
groff_me.n \
groff_mdoc.n \
2002-10-11 08:52:17 +00:00
groff_trace.n \
groff_www.n
1996-09-07 16:18:32 +00:00
2000-12-05 18:49:44 +00:00
NORMALFILES=\
2001-04-17 12:12:05 +00:00
mandoc.tmac andoc.tmac an-old.tmac \
me.tmac \
mdoc.tmac \
pic.tmac \
2003-05-01 13:09:50 +00:00
a4.tmac papersize.tmac \
2002-10-11 08:52:17 +00:00
ec.tmac \
2001-04-17 12:12:05 +00:00
safer.tmac \
trace.tmac \
ps.tmac psold.tmac pspic.tmac psatk.tmac \
dvi.tmac \
2002-10-11 08:52:17 +00:00
tty.tmac tty-char.tmac \
2003-05-01 13:09:50 +00:00
latin1.tmac latin2.tmac latin9.tmac cp1047.tmac \
2001-04-17 12:12:05 +00:00
X.tmac Xps.tmac \
lj4.tmac \
2002-10-11 08:52:17 +00:00
lbp.tmac \
2003-05-01 13:09:50 +00:00
html.tmac html-end.tmac \
europs.tmac \
composite.tmac \
2001-04-17 12:12:05 +00:00
eqnrc \
troffrc troffrc-end \
2003-05-01 13:09:50 +00:00
hyphen.us hyphenex.us
2001-04-17 12:12:05 +00:00
SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac
STRIPFILES=e.tmac doc.tmac doc-old.tmac
1996-09-07 16:18:32 +00:00
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
mdocdir=$(tmacdir)/mdoc
2000-12-05 18:49:44 +00:00
CLEANADD=\
2003-05-01 13:09:50 +00:00
stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed www.tmac-sed \
2001-04-17 12:12:05 +00:00
stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
1996-09-07 16:18:32 +00:00
tmac_s_prefix=
tmac_an_prefix=
tmac_wrap=
sys_tmac_prefix=
2003-05-01 13:09:50 +00:00
pnmtops_nosetpage="pnmtops"
1996-09-07 16:18:32 +00:00
2000-12-05 18:49:44 +00:00
all: stamp-strip stamp-wrap stamp-sed
1996-09-07 16:18:32 +00:00
2001-04-17 12:12:05 +00:00
install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
stamp-strip stamp-wrap stamp-sed
2000-12-05 18:49:44 +00:00
-test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
2001-04-17 12:12:05 +00:00
-test -d $(systemtmacdir) || $(mkinstalldirs) $(systemtmacdir)
-test -d $(localtmacdir) || $(mkinstalldirs) $(localtmacdir)
1996-09-07 16:18:32 +00:00
if test -n "$(tmac_wrap)"; then \
2000-01-12 09:51:43 +00:00
for m in ""$(tmac_wrap); do \
2001-04-17 12:12:05 +00:00
$(INSTALL_DATA) $$m-wrap $(systemtmacdir)/$$m.tmac; \
1996-09-07 16:18:32 +00:00
done; \
fi
for f in $(NORMALFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
done
2001-04-17 12:12:05 +00:00
-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
2003-05-01 13:09:50 +00:00
-rm -f $(tmacdir)/www.tmac
$(INSTALL_DATA) www.tmac-sed $(tmacdir)/www.tmac
1996-09-07 16:18:32 +00:00
for f in $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \
done
2000-12-05 18:49:44 +00:00
-test -d $(mdocdir) || $(mkinstalldirs) $(mdocdir)
1996-09-07 16:18:32 +00:00
for f in $(MDOCFILES); do \
rm -f $(mdocdir)/$$f; \
$(INSTALL_DATA) $$f-s $(mdocdir)/$$f; \
done
2001-04-17 12:12:05 +00:00
-test -f $(localtmacdir)/man.local || \
$(INSTALL_DATA) $(srcdir)/man.local $(localtmacdir)/man.local
-test -f $(localtmacdir)/mdoc.local || \
$(INSTALL_DATA) mdoc.local-s $(localtmacdir)/mdoc.local
1996-09-07 16:18:32 +00:00
2001-04-17 12:12:05 +00:00
stamp-strip: $(STRIPFILES) $(MDOCFILES) mdoc.local
for f in $(STRIPFILES) $(MDOCFILES) mdoc.local; do \
1996-09-07 16:18:32 +00:00
rm -f $$f-s; \
sed -f $(srcdir)/strip.sed $(srcdir)/$$f >$$f-s; \
done
touch $@
stamp-wrap:
if test -n "$(tmac_wrap)"; then \
2000-01-12 09:51:43 +00:00
for m in ""$(tmac_wrap); do \
1996-09-07 16:18:32 +00:00
rm -f $$m-wrap; \
2001-04-17 12:12:05 +00:00
if test "$$m" = an; then \
echo .do mso andoc.tmac >>$$m-wrap; \
fi; \
echo .cp 1 >>$$m-wrap; \
1996-09-07 16:18:32 +00:00
echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \
done; \
fi
touch $@
2003-05-01 13:09:50 +00:00
stamp-sed: man.tmac ms.tmac www.tmac
for f in man.tmac ms.tmac www.tmac; do \
2000-12-05 18:49:44 +00:00
rm -f $$f-sed; \
sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
-e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
2003-05-01 13:09:50 +00:00
-e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \
2000-12-05 18:49:44 +00:00
$(srcdir)/$$f > $$f-sed; \
done
touch $@
1996-09-07 16:18:32 +00:00
uninstall_sub:
-if test -n "$(tmac_wrap)"; then \
2000-01-12 09:51:43 +00:00
for m in ""$(tmac_wrap); do \
2001-04-17 12:12:05 +00:00
rm -f $(systemtmacdir)/$$m.tmac; \
2000-01-12 09:51:43 +00:00
done; \
1996-09-07 16:18:32 +00:00
fi
2001-04-17 12:12:05 +00:00
-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
-if cmp -s $(localtmacdir)/mdoc.local $(srcdir)/mdoc.local; then \
rm -f $(localtmacdir)/mdoc.local; \
1996-09-07 16:18:32 +00:00
fi
-for f in $(MDOCFILES); do rm -f $(mdocdir)/$$f; done
-rmdir $(mdocdir)