1MAN7=\ 2 groff_ms.n \ 3 groff_man.n \ 4 groff_me.n \ 5 groff_mdoc.n \ 6 groff_trace.n \ 7 groff_www.n 8 9NORMALFILES=\ 10 mandoc.tmac andoc.tmac an-old.tmac \ 11 me.tmac \ 12 mdoc.tmac \ 13 pic.tmac \ 14 a4.tmac papersize.tmac \ 15 ec.tmac \ 16 safer.tmac \ 17 trace.tmac \ 18 ps.tmac psold.tmac pspic.tmac psatk.tmac \ 19 dvi.tmac \ 20 tty.tmac tty-char.tmac \ 21 latin1.tmac latin2.tmac latin9.tmac cp1047.tmac ascii.tmac \ 22 unicode.tmac \ 23 X.tmac Xps.tmac \ 24 lj4.tmac \ 25 lbp.tmac \ 26 html.tmac html-end.tmac \ 27 devtag.tmac \ 28 europs.tmac \ 29 composite.tmac \ 30 eqnrc \ 31 troffrc troffrc-end \ 32 hyphen.us hyphenex.us 33SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac 34STRIPFILES=e.tmac doc.tmac doc-old.tmac 35MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms 36mdocdir=$(tmacdir)/mdoc 37CLEANADD=\ 38 stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed www.tmac-sed \ 39 stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \ 40 doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s 41tmac_s_prefix= 42tmac_an_prefix= 43tmac_wrap= 44sys_tmac_prefix= 45pnmtops_nosetpage="pnmtops" 46 47all: stamp-strip stamp-wrap stamp-sed 48 49install_data: $(NORMALFILES) $(SPECIALFILES) man.local \ 50 stamp-strip stamp-wrap stamp-sed 51 -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir) 52 -test -d $(systemtmacdir) || $(mkinstalldirs) $(systemtmacdir) 53 -test -d $(localtmacdir) || $(mkinstalldirs) $(localtmacdir) 54 if test -n "$(tmac_wrap)"; then \ 55 for m in ""$(tmac_wrap); do \ 56 $(INSTALL_DATA) $$m-wrap $(systemtmacdir)/$$m.tmac; \ 57 done; \ 58 fi 59 for f in $(NORMALFILES); do \ 60 rm -f $(tmacdir)/$$f; \ 61 $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ 62 done 63 -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac 64 $(INSTALL_DATA) $(srcdir)/s.tmac $(tmacdir)/$(tmac_s_prefix)s.tmac 65 -rm -f $(tmacdir)/ms.tmac 66 $(INSTALL_DATA) ms.tmac-sed $(tmacdir)/ms.tmac 67 -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac 68 $(INSTALL_DATA) $(srcdir)/an.tmac $(tmacdir)/$(tmac_an_prefix)an.tmac 69 -rm -f $(tmacdir)/man.tmac 70 $(INSTALL_DATA) man.tmac-sed $(tmacdir)/man.tmac 71 -rm -f $(tmacdir)/www.tmac 72 $(INSTALL_DATA) www.tmac-sed $(tmacdir)/www.tmac 73 for f in $(STRIPFILES); do \ 74 rm -f $(tmacdir)/$$f; \ 75 $(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \ 76 done 77 -test -d $(mdocdir) || $(mkinstalldirs) $(mdocdir) 78 for f in $(MDOCFILES); do \ 79 rm -f $(mdocdir)/$$f; \ 80 $(INSTALL_DATA) $$f-s $(mdocdir)/$$f; \ 81 done 82 -test -f $(localtmacdir)/man.local || \ 83 $(INSTALL_DATA) $(srcdir)/man.local $(localtmacdir)/man.local 84 -test -f $(localtmacdir)/mdoc.local || \ 85 $(INSTALL_DATA) mdoc.local-s $(localtmacdir)/mdoc.local 86 87stamp-strip: $(STRIPFILES) $(MDOCFILES) mdoc.local 88 for f in $(STRIPFILES) $(MDOCFILES) mdoc.local; do \ 89 rm -f $$f-s; \ 90 sed -f $(srcdir)/strip.sed $(srcdir)/$$f >$$f-s; \ 91 done 92 touch $@ 93 94stamp-wrap: 95 if test -n "$(tmac_wrap)"; then \ 96 for m in ""$(tmac_wrap); do \ 97 rm -f $$m-wrap; \ 98 if test "$$m" = an; then \ 99 echo .do mso andoc.tmac >>$$m-wrap; \ 100 fi; \ 101 echo .cp 1 >>$$m-wrap; \ 102 echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \ 103 done; \ 104 fi 105 touch $@ 106 107stamp-sed: man.tmac ms.tmac www.tmac 108 for f in man.tmac ms.tmac www.tmac; do \ 109 rm -f $$f-sed; \ 110 sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \ 111 -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \ 112 -e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \ 113 $(srcdir)/$$f > $$f-sed; \ 114 done 115 touch $@ 116 117uninstall_sub: 118 -if test -n "$(tmac_wrap)"; then \ 119 for m in ""$(tmac_wrap); do \ 120 rm -f $(systemtmacdir)/$$m.tmac; \ 121 done; \ 122 fi 123 -for f in $(NORMALFILES) $(STRIPFILES); do \ 124 rm -f $(tmacdir)/$$f; \ 125 done 126 -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac 127 -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac 128 -rm -f $(tmacdir)/man.tmac $(tmacdir)/ms.tmac 129 -rm -f $(tmacdir)/www.tmac 130 -if cmp -s $(localtmacdir)/man.local $(srcdir)/man.local; then \ 131 rm -f $(localtmacdir)/man.local; \ 132 fi 133 -if cmp -s $(localtmacdir)/mdoc.local $(srcdir)/mdoc.local; then \ 134 rm -f $(localtmacdir)/mdoc.local; \ 135 fi 136 -for f in $(MDOCFILES); do rm -f $(mdocdir)/$$f; done 137 -rmdir $(mdocdir) 138