From: espie Date: Sun, 9 Jul 2017 18:28:44 +0000 (+0000) Subject: document PROGS, okay jmc@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8809da582cb7ceccbeb0a893425bef099c44ad02;p=openbsd document PROGS, okay jmc@ --- diff --git a/share/mk/bsd.README b/share/mk/bsd.README index afbf12270eb..ba3e2082925 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -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 @@ -404,6 +404,35 @@ SRCS contains grammar.y, then effectively you will have 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 + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file contains the default targets for building