From: downsj Date: Mon, 7 Apr 1997 13:30:24 +0000 (+0000) Subject: Build man pages using my bsd.man.mk extensions, ala Perl, instead of making X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=826bf1b5303b3cef9694bb315e84a0b9617ae117;p=openbsd Build man pages using my bsd.man.mk extensions, ala Perl, instead of making links and other disgusting things. Copes with the global .man extension used here. --- diff --git a/gnu/usr.bin/groff/Makefile.bsd-wrapper b/gnu/usr.bin/groff/Makefile.bsd-wrapper index b6b1db185ca..bbbe71453ba 100644 --- a/gnu/usr.bin/groff/Makefile.bsd-wrapper +++ b/gnu/usr.bin/groff/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.4 1996/10/06 21:02:15 tholo Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.5 1997/04/07 13:30:24 downsj Exp $ # # groff config @@ -9,64 +9,75 @@ FONTDIR= /usr/share/groff_font INDEXDIR= /usr/share/dict/papers COMMON_WORDS= /usr/share/dict/eign -GNUCFLAGS= CFLAGS="$(CFLAGS)" -GNUCXXFLAGS= CCFLAGS="$(CXXFLAGS)" +GNUCFLAGS= CFLAGS="${CFLAGS}" +GNUCXXFLAGS= CCFLAGS="${CXXFLAGS}" CLEANFILES= config.cache config.log pic/pic.cc eqn/eqn.cc \ - refer/label.cc pic/pic.tab.h eqn/eqn.tab.h $(MAN) - -MAN= addftinfo/addftinfo.1 groff/groff.1 troff/troff.1 tbl/tbl.1 \ - pic/pic.1 eqn/eqn.1 grops/grops.1 grotty/grotty.1 grodvi/grodvi.1 \ - tfmtodit/tfmtodit.1 grolj4/grolj4.1 hpftodit/hpftodit.1 \ - refer/refer.1 lookbib/lookbib.1 indxbib/indxbib.1 lkbib/lkbib.1 \ - soelim/soelim.1 pfbtops/pfbtops.1 psbb/psbb.1 man/groff_char.7 \ - man/groff_font.5 man/groff_out.5 tmac/groff_ms.7 tmac/me.7 \ - tmac/msafer.7 afmtodit/afmtodit.1 grog/grog.1 nroff/nroff.1 \ - mm/groff_mm.7 mm/groff_mmse.7 + refer/label.cc pic/pic.tab.h eqn/eqn.tab.h ${MANALL} + +# All of groff's man pages have a .man extension. Sigh. +MANLOCALBUILD= yes + +MAN_SRC1= addftinfo/addftinfo.man groff/groff.man troff/troff.man \ + tbl/tbl.man pic/pic.man eqn/eqn.man grops/grops.man grotty/grotty.man \ + grodvi/grodvi.man tfmtodit/tfmtodit.man grolj4/grolj4.man \ + hpftodit/hpftodit.man refer/refer.man lookbib/lookbib.man \ + indxbib/indxbib.man lkbib/lkbib.man soelim/soelim.man \ + pfbtops/pfbtops.man psbb/psbb.man \ + afmtodit/afmtodit.man grog/grog.man nroff/nroff.man +MAN_SRC5= man/groff_font.man man/groff_out.man +MAN_SRC7= man/groff_char.man tmac/groff_ms.man tmac/me.man \ + tmac/msafer.man mm/groff_mm.man mm/groff_mmse.man + +MAN_BUILD1= ${MAN_SRC1:S/.man$/.cat1/g} +MAN_BUILD5= ${MAN_SRC5:S/.man$/.cat5/g} +MAN_BUILD7= ${MAN_SRC7:S/.man$/.cat7/g} + +# Only use for cleaning! +MANALL= ${MAN_BUILD1} ${MAN_BUILD5} ${MAN_BUILD7} + MLINKS= groff_ms.7 ms.7 groff_mm.7 mm.7 +.SUFFIXES: .man .cat1 .cat5 .cat7 + +.man.cat1 .man.cat5 .man.cat7: + @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}" + @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) + all: config.status gnu_build .FORCE: .IGNORE config: .FORCE -rm -f config.cache - /bin/sh $(.CURDIR)/configure --prefix=$(PREFIX) + /bin/sh ${.CURDIR}/configure --prefix=${PREFIX} config.status: - /bin/sh $(.CURDIR)/configure --prefix=$(PREFIX) + /bin/sh ${.CURDIR}/configure --prefix=${PREFIX} gnu_build: - $(MAKE) $(GNUCFLAGS) $(GNUCXXFLAGS) LDFLAGS="-s $(LDSTATIC)" \ - prefix=$(PREFIX) \ - datasubdir=$(DATASUBDIR) \ - fontdir=$(FONTDIR) \ - indexdir=$(INDEXDIR) \ - common_words_file=$(COMMON_WORDS) - -install: maninstall - $(MAKE) $(GNUCFLAGS) $(GNUCXXFLAGS) LDFLAGS=$(LDSTATIC) \ - prefix=$(DESTDIR)$(PREFIX) \ - datasubdir=$(DESTDIR)$(DATASUBDIR) \ - fontdir=$(DESTDIR)$(FONTDIR) \ - indexdir=$(DESTDIR)$(INDEXDIR) \ - common_words_file=$(DESTDIR)$(COMMON_WORDS) \ + ${MAKE} ${GNUCFLAGS} ${GNUCXXFLAGS} LDFLAGS="-s ${LDSTATIC}" \ + prefix=${PREFIX} \ + datasubdir=${DATASUBDIR} \ + fontdir=${FONTDIR} \ + indexdir=${INDEXDIR} \ + common_words_file=${COMMON_WORDS} + +install: ${MAN_BUILD1} ${MAN_BUILD5} ${MAN_BUILD7} maninstall + ${MAKE} ${GNUCFLAGS} ${GNUCXXFLAGS} LDFLAGS=${LDSTATIC} \ + prefix=${DESTDIR}${PREFIX} \ + datasubdir=${DESTDIR}${DATASUBDIR} \ + fontdir=${DESTDIR}${FONTDIR} \ + indexdir=${DESTDIR}${INDEXDIR} \ + common_words_file=${DESTDIR}${COMMON_WORDS} \ INSTALL_MAN= TMAC_AN= TMAC_ANDOC= MDOCFILES= tmac_an= \ install - install -c -o $(BINOWN) -g $(BINGRP) -m 444 $(.CURDIR)/tmac/tmac.an \ - $(DESTDIR)$(DATASUBDIR)/tmac/tmac.an.old + install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/tmac/tmac.an \ + ${DESTDIR}${DATASUBDIR}/tmac/tmac.an.old clean cleandir: - rm -f $(CLEANFILES) - -@if [ -e Makefile ]; then $(MAKE) distclean; fi - -# -# Fix gnu manpage suffix -# -.SUFFIXES: .n .1 .2 .3 .4 .5 .6 .7 .8 .9 - -.n.1 .n.2 .n.3 .n.4 .n.5 .n.6 .n.7 .n.8 .n.9: - -@ln -sf $(.OBJDIR)/$(.IMPSRC) $(.TARGET) + rm -f ${CLEANFILES} + -@if [ -e Makefile ]; then ${MAKE} distclean; fi depend: # Nothing here so far...