/* * dnsutl - utilities to make DNS easier to configure * Copyright (C) 1999, 2001, 2004, 2005, 2007 Peter Miller * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see * . */ all += doc.targets; /* * formatting documents and manual entries */ doc.targets: cat special etc/reference.pdf ; /* * specials */ special = README BUILDING; special: [special]; %: etc/%.man { groff -Tascii -t -P-cbhu [prepost "-I" "/etc" [search_list]] -man [resolve etc/%.man] > [target]; } etc/%.man.d: etc/%.man { c_incl -nc -ns -eia -r [prepost "-I" "/etc" [search_list]] -prefix "'cascade etc/%.man ='" -suffix "';'" [resolve etc/%.man] [addprefix "-rlp=" [search_list]] -o [target]; } etc-dep-files = [addsuffix ".d" [match_mask etc/%.man [source_files]]] ; #include-cooked [etc-dep-files] /* * manual entries */ cat = [fromto man%1/%2.%1 cat%1/%2.%1 [match_mask man%1/%2.%1 [source_files]]]; cat: [cat]; cat%1/%2.%1: man%1/%2.%1 { groff -Tascii -t -P-ch [prepost "-I" "/man%1" [search_list]] -man [resolve man%1/%2.%1] > cat%1/%2.%1; } man%1/%2.%1.d: man%1/%2.%1 { c_incl -nc -ns -eia -r [prepost "-I" "/man%1" [search_list]] -prefix "'cascade man%1/%2.%1 ='" -suffix "';'" [resolve man%1/%2.%1] [addprefix "-rlp=" [search_list]] -o [target]; } man-dep-files = [addsuffix ".d" [match_mask man%1/%2.%1 [source_files]]] ; #include-cooked [man-dep-files] etc/%.pdf: etc/%.man etc/page-list.awk { groff -t [prepost "-I" /[arch]/etc [search_list]] [prepost "-I" "/etc" [search_list]] [prepost "-I" "/man1" [search_list]] /* refman */ [addprefix "-I" [search_list]] /* refman */ -man [resolve etc/%.man] > etc/%.ps.tmp; psselect -p`awk -f [resolve etc/page-list.awk] etc/%.ps.tmp` etc/%.ps.tmp > etc/%.ps; ps2pdf etc/%.ps etc/%.pdf; rm etc/%.ps etc/%.ps.tmp; } cascade etc/reference.man = etc/ref-index.so etc/ref-parts.so; etc/ref-index.so: [match_mask man%1/%2.%1 [source_files]] etc/ref-ptx1.awk etc/ref-ptx.ignore etc/ref-ptx2.awk { awk -f [resolve etc/ref-ptx1.awk] [resolve [match_mask man%1/%2.%1 [source_files]]] | ptx -O -r -w1000 -i[resolve etc/ref-ptx.ignore] | sort -t'\'"\'' -f -d +5 -6 +3 -4 | awk -F'\'"\'' -f [resolve etc/ref-ptx2.awk] > [target]; } etc/ref-parts.so: [match_mask man%1/%2.%1 [source_files]] etc/ref-ptx.sh { sh -f [resolve etc/ref-ptx.sh] [match_mask man%1/%2.%1 [source_files]] > [target]; } /* * Catch 22: need to know you need to include them, so you can check to * see if you need to include them. Sigh. */ cascade man1/copyright.so = etc/version.so; cascade etc/BUILDING.man = etc/version.so; cascade etc/README.man = etc/new.so etc/version.so; etc/new.so: etc/new-so-sh [match_mask etc/new.%.so [source_files]] { sh [resolve etc/new-so-sh] -r [fromto etc/new.%.so new.%.so [match_mask etc/new.%.so [source_files]] ] > [target]; }