=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/share/mk/bsd.README,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- src/share/mk/bsd.README 2017/07/09 17:17:46 1.68 +++ src/share/mk/bsd.README 2017/07/09 18:28:44 1.69 @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.README,v 1.68 2017/07/09 17:17:46 espie Exp $ +# $OpenBSD: bsd.README,v 1.69 2017/07/09 18:28:44 espie Exp $ # $NetBSD: bsd.README,v 1.17 1996/04/13 02:08:08 thorpej Exp $ # @(#)bsd.README 5.1 (Berkeley) 5/11/90 @@ -403,6 +403,35 @@ grammar.c grammar.h: grammar.y ${YACC.Y} -o grammar.c grammar.y + + + may be used to build several programs in a single directory. +Just define the list of programs as PROGS instead of using PROG. +For instance PROGS = foo bar + +Each program of the list, for instance foo, will use SRCS_foo instead +of SRCS to find its sources. SRCS_foo still defaults to foo.c, and +MAN still defaults to section 1 manpages: MAN = foo.1 bar.1. + +Each program can have its separate LDADD_foo and DPADD_foo definitions. +If not defined, these default to LDADD/DPADD. + +Some simple examples: +To build foo from foo.c and bar from bar.c with manual pages foo.1 and bar.1: + + PROGS = foo bar + + .include + +If bar has manual page bar.8 instead, add the line: + MAN = foo.1 bar.8 + +If bar has multiple source files, add the line: + SRCS_bar = a.c b.c c.c d.c + +Note that foo and bar may share some source files, like so: + SRCS_foo = foo.c common.c + SRCS_bar = bar.c common.c =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=