NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/49182: make or bsd.prog.mk trouble with "remote" .o files
>Number: 49182
>Category: bin
>Synopsis: make or bsd.prog.mk trouble with "remote" .o files
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 08 10:40:00 +0000 2014
>Originator: Martin Husemann
>Release: NetBSD 7.99.1
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 7.99.1 NetBSD 7.99.1
(WHOEVER) #15: Wed Sep 3 11:22:57 CEST 2014
martin%seven-days-to-the-wolves.aprisoft.de@localhost:/usr/src/sys/arch/sparc64/compile/WHOEVER
sparc64
Architecture: sparc64
Machine: sparc64
(this was before the make backout in -current)
>Description:
Using a simple makefile like:
--- 8< ---
.PATH=sub
SRCS=main.c other.c
PROG=test
NOMAN=1
.include <bsd.prog.mk>
--- >8 ---
with main.c in the current dir and other.c in directory sub fails when
compiling without an objdir (other.o vs. sub/other.o confusion?)
>How-To-Repeat:
Extract the following shar, cd there, and type "make". Watch it not compiling
all of SRCS. The usage of .PATH is unrelated to the problem, but was used
to create a more typical example.
Behaviour with OBJDIR or similar magic present differs (i.e.: very similar
usage in a full NetBSD build works)
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# .
# ./Makefile
# ./sub
# ./sub/other.c
# ./main.c
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo x - ./Makefile
sed 's/^X//' >./Makefile << 'END-of-./Makefile'
X.PATH=sub
XSRCS=main.c other.c
XPROG=test
XNOMAN=1
X
X.include <bsd.prog.mk>
END-of-./Makefile
echo c - ./sub
mkdir -p ./sub > /dev/null 2>&1
echo x - ./sub/other.c
sed 's/^X//' >./sub/other.c << 'END-of-./sub/other.c'
Xvoid func1(void)
X{
X}
END-of-./sub/other.c
echo x - ./main.c
sed 's/^X//' >./main.c << 'END-of-./main.c'
Xextern void func1(void);
X
Xint main(int argc, char **argv)
X{
X func1();
X return 0;
X}
END-of-./main.c
exit
>Fix:
n/a
Home |
Main Index |
Thread Index |
Old Index