/* * libexplain - Explain errno values returned by libc functions * Copyright (C) 2008-2013 Peter Miller * Written by 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 += documentation; documentation: [fromto man/man%1/%2.%1 man/cat%1/%2.%1 [match_mask man/man%1/%2.%1 [source_files]] ] etc/reference.pdf man/pdf1/explain_lca2010.pdf etc/freshmeat.txt ; man/cat%1/%2.%1: man/man%1/%2.%1 etc/groff.sh { function quiet_print Groff; sh [resolve etc/groff.sh] [addprefix "-I" [search_list]] -Tascii -t -P-c -man [resolve man/man%1/%2.%1] > [target]; } man/pdf%1/%2.pdf: man/man%1/%2.%1 etc/groff.sh { function quiet_print Groff; sh [resolve etc/groff.sh] [addprefix "-I" [search_list]] -Tps -t -man [resolve man/man%1/%2.%1] > man/pdf%1/%2.ps; ps2pdf man/pdf%1/%2.ps man/pdf%1/%2.pdf; rm man/pdf%1/%2.ps; } man/man%1/%2.%1.d: man/man%1/%2.%1 set no-cascade { function quiet_print Depends; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve man/man%1/%2.%1] -prefix "'cascade man/man%1/%2.%1 ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } man/man%1/%2.so.d: man/man%1/%2.so set no-cascade { function quiet_print Depends; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve man/man%1/%2.so] -prefix "'cascade man/man%1/%2.so ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } etc/%.so.d: etc/%.so set no-cascade { function quiet_print Depends; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve etc/%.so] -prefix "'cascade etc/%.so ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } etc/%.roff.d: etc/%.roff set no-cascade { function quiet_print Depends; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve etc/%.roff] -prefix "'cascade etc/%.roff ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } #include-cooked [addsuffix ".d" [match_mask etc/%.man [source_files]]] #include-cooked [addsuffix ".d" [match_mask man/man%1/%2.%1 [source_files]]] #include-cooked [addsuffix ".d" [match_mask man/%0%.so [source_files]]] etc/%.pdf: etc/%.man etc/page-list.awk etc/groff.sh { function quiet_print Groff; sh [resolve etc/groff.sh] [addprefix "-I" [search_list]] -t -man [resolve etc/%.man] > %.ps.tmp; psselect -p`awk -f [resolve etc/page-list.awk] %.ps.tmp` [ 'if' [quiet] 'then' -q ] %.ps.tmp > %.ps; rm %.ps.tmp set silent; ps2pdf %.ps [target]; rm %.ps set silent; } etc/%.man.d: etc/%.man set no-cascade { function quiet_print Depends; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve etc/%.man] -prefix "'cascade etc/%.man ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } cascade etc/reference.man = etc/ref-parts.so; etc/ref-parts.so: [match_mask man/man%1/%2.%1 [source_files]] etc/ref-ptx.sh etc/version.so(exists) { function quiet_print Generate; sh -f [resolve etc/ref-ptx.sh] [match_mask man/man%1/%2.%1 [source_files]] > [target]; } #include-cooked etc/ref-parts.so.d #if [count [match_mask etc/new.%.so [source_files]]] etc/new.so: : etc/new.sh [match_mask etc/new.%.so [source_files]] { function quiet_print Generate; sh [resolve etc/new.sh] -r [match_mask etc/new.%.so [need]] > [target]; } #include-cooked-nowarn etc/new.so.d #endif cascade etc/readme.man = etc/new.so ; %: etc/[downcase %].man: etc/groff.sh { function quiet_print Groff; sh [resolve etc/groff.sh] -Tascii -t -P-bcu -man [addprefix "-I" [search_list]] [resolve etc/[downcase %].man] > [target]; } LICENSE: man/man3/explain_license.3 { function quiet_print Groff; sh [resolve etc/groff.sh] -Tascii -t -P-bcu -man [addprefix "-I" [search_list]] [resolve man/man3/explain_license.3] > [target]; } etc/coverage.so: etc/coverage.sh explain/syscall.c libexplain/iocontrol/table.c { function quiet_print Generate; sh [resolve etc/coverage.sh] [resolve explain/syscall.c] [resolve libexplain/iocontrol/table.c] > [target]; } cascade etc/readme.man = etc/coverage.so; cascade web-src/index.html = etc/coverage.so; cascade man/man1/explain_lca2010.1 = etc/coverage.so; etc/%.txt: etc/%.roff: etc/version.so set shallow { function quiet_print Groff; sh [resolve etc/groff.sh] -Tascii -t -P-bcu [addprefix "-I" [search_list]] [resolve etc/%.roff] | cat -s > [target]; } /* vim: set ts=8 sw=4 et : */