There are some values where, if unset in bsd.prog.mk, would default to the <PROG>.<appropriate.extension>. For instance if I had a Makefile that defined a program a, like so... % cat * # Makefile PROG= a .include <bsd.prog.mk> /* a.c */ #include <stdio.h> int main(void) { printf("hello world\n"); return (0); } % make all Warning: Object directory not changed from original /root/make_tests/prog_mk cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -c a.c cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -o a a.o make: don't know how to make a.1. Stop make: stopped in /root/make_tests/prog_mk % As shown above, bsd.prog.mk automatically assumes that there was a corresponding source file for ;a' called 'a.c', and there's a manpage a.1. bsd.progs.mk doesn't maintain this compatibility because it passes through several variables with empty values instead of not passing them through in the first place. Example: % cat * # Makefile PROGS= a .include <bsd.progs.mk> /* a.c */ #include <stdio.h> int main(void) { printf("hello world!\n"); return (0); } % make all (cd /root/make_tests/progs_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=a ) Warning: Object directory not changed from original /root/make_tests/progs_mk make[1]: don't know how to make .o. Stop make[1]: stopped in /root/make_tests/progs_mk *** Error code 2 Stop. make: stopped in /root/make_tests/progs_mk Expected result: - The following variables should not be passed through if they aren't set: -- BINDIR -- MAN -- SRCS There might be more, but these are definite issues that I've found when testing out bsd.progs.mk over the past couple months. My diff against bsd.progs.mk is attached as a reference for how I "fixed" the problem.
Created attachment 143799 [details] Proposed fix
Fixed in r272055. Awaiting MFC timeout.