From cb8dfd73a0ce9e7dac87160a4322a1f0c63d151e Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 9 Jul 2017 18:28:45 +0000 Subject: document PROGS, okay jmc@ --- share/mk/bsd.README | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'share') 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 -- cgit v1.2.3