Document bsd.progs.mk and add more variables overrides.

BINGRP BINMODE BINOWN LINKS MLINKS PROGNAME.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2015-09-24 00:17:00 +00:00
parent ba7a7c1b82
commit 538c8eea82
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288160
2 changed files with 18 additions and 2 deletions

View File

@ -292,6 +292,20 @@ PROG_CXX If defined, the name of the program to build. Also
standard C++ library. PROG_CXX overrides the value
of PROG if PROG is also set.
PROGS When used with <bsd.progs.mk>, allow building multiple
PROGS_CXX PROG and PROGS_CXX in one Makefile. To define
individual variables for each program the VAR.prog
syntax should be used. For example:
PROGS= foo bar
SRCS.foo= foo_src.c
LIBADD.foo= util
SRCS.bar= bar_src.c
The supported variables are BINDIR BINGRP BINMODE BINOWN
CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS DPSRCS LDADD
LDFLAGS LIBADD MAN MLINKS PROGNAME SRCS.
PROGNAME The name that the above program will be installed as, if
different from ${PROG}.

View File

@ -38,8 +38,10 @@ PROG ?= $t
.if defined(PROG)
# just one of many
PROG_OVERRIDE_VARS += BINDIR DPSRCS MAN SRCS
PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LIBADD LDFLAGS ${PROG_OVERRIDE_VARS}
PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN PROGNAME \
SRCS
PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LIBADD LINKS \
LDFLAGS MLINKS ${PROG_OVERRIDE_VARS}
.for v in ${PROG_VARS:O:u}
.if empty(${PROG_OVERRIDE_VARS:M$v})
.if defined(${v}.${PROG})