[Bug 191056] New: bsd.progs.mk: bsd.prog.mk incompatibilities with variables being set and not set
bz-noreply at freebsd.org
bz-noreply at freebsd.org
Sun Jun 15 08:51:48 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191056
Bug ID: 191056
Summary: bsd.progs.mk: bsd.prog.mk incompatibilities with
variables being set and not set
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Some People
Priority: ---
Component: misc
Assignee: freebsd-bugs at FreeBSD.org
Reporter: yaneurabeya at gmail.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list