diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2017-07-09 18:28:45 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2017-07-09 18:28:45 +0000 |
commit | cb8dfd73a0ce9e7dac87160a4322a1f0c63d151e (patch) | |
tree | 86f2b7efddcdd010d6e3b53439831aef5ea96bb0 /share/mk | |
parent | 91c0bb6ef99cd9710647af8c7f00553be1123a3e (diff) |
document PROGS, okay jmc@
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.README | 31 |
1 files changed, 30 insertions, 1 deletions
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 + +<bsd.prog.mk> 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 <bsd.prog.mk> + +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 <bsd.subdir.mk> contains the default targets for building |