diff --git a/share/mk/bsd.README b/share/mk/bsd.README index e4038487f2f7..faaf5f303fc0 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -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 , 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}. diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index fcaf358889f0..dce109f0fa80 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -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})