diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-20 00:13:28 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-20 00:13:28 +0000 |
commit | d586a8e4aef9a91320edb0a54f78940d827b3ecd (patch) | |
tree | 9b4584758a814b5c7747ebe2627fcd223809c46e /share/doc | |
parent | d0ecc14d490f757fb160e3fd8b4ebe03136df44f (diff) | |
download | src-test2-d586a8e4aef9a91320edb0a54f78940d827b3ecd.tar.gz src-test2-d586a8e4aef9a91320edb0a54f78940d827b3ecd.zip |
Notes
Diffstat (limited to 'share/doc')
-rw-r--r-- | share/doc/usd/13.viref/Makefile | 11 | ||||
-rw-r--r-- | share/doc/usd/13.viref/merge.awk | 17 |
2 files changed, 24 insertions, 4 deletions
diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile index 49226ba37074..a60e3263f1f4 100644 --- a/share/doc/usd/13.viref/Makefile +++ b/share/doc/usd/13.viref/Makefile @@ -2,7 +2,6 @@ # $FreeBSD$ VOLUME= usd/13.viref -SRCS= vi.ref-patched EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff MACROS= -me CLEANFILES= vi.ref-patched index @@ -15,18 +14,22 @@ vi.ref-patched: vi.ref PRINTERDEVICE?= ascii .for _dev in ${PRINTERDEVICE} +SRCS+= vi.ref-${_dev} EXTRA+= index.so.${_dev} -CLEANFILES+= index.so.${_dev} +CLEANFILES+= index.so.${_dev} vi.ref-${_dev} + +vi.ref-${_dev}: index.so.${_dev} + sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$:${_dev}:' vi.ref-patched > ${.TARGET} # Build index.so as a side-effect of building the paper. -index.so.${_dev}: ${SRCS} ${EXTRA:Nindex.so.${_dev}} +index.so.${_dev}: vi.ref-patched ${EXTRA:Nindex.so.${_dev}} sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$::' vi.ref-patched | \ ${ROFF.${_dev}} -U -z sed -e 's/MINUSSIGN/-/' \ -e 's/DOUBLEQUOTE/""/' \ -e "s/SQUOTE/'/" \ -e 's/ /__SPACE/g' < index | \ - sort -u '-t ' -k 1,1 -k 2n | awk -f ${SRCDIR}/merge.awk | \ + sort -u '-t ' -k 1,1 -k 2n | awk -f ${.CURDIR}/merge.awk | \ sed -e 's/__SPACE/ /g' \ -e "s/^\\(['\\.]\\)/\\\\\&\\1/" > ${.TARGET} .endfor diff --git a/share/doc/usd/13.viref/merge.awk b/share/doc/usd/13.viref/merge.awk new file mode 100644 index 000000000000..e85f7d3bd88e --- /dev/null +++ b/share/doc/usd/13.viref/merge.awk @@ -0,0 +1,17 @@ +# $FreeBSD$ +# @(#)merge.awk 8.3 (Berkeley) 5/25/94 +# +# merge index entries into one line per label +$1 == prev { + printf ", %s", $2; + next; +} +{ + if (NR != 1) + printf "\n"; + printf "%s \t%s", $1, $2; + prev = $1; +} +END { + printf "\n" +} |