Date: Tue, 9 Mar 2004 15:05:43 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-arch@freebsd.org Subject: We have to fix this! Message-ID: <20040309140543.GW10864@darkness.comp.waw.pl>
next in thread | raw e-mail | index | archive | help
--9j/QU+CmmrcVJkVI
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi.
it is really irritating that connecting files from other directory
is not possible.
For example:
% cat Makefile
PROG=3Dtest
SRCS=3D../test.c
NOMAN=3Dwhat_for
.include <bsd.prog.mk>
% make
cc -O -pipe -c ../test.c
cc -O -pipe -o test ../test.o=20
cc: ../test.o: No such file or directory
cc: No input files specified
*** Error code 1
=09
Stop in /usr/home/pjd/src/test.
% ls ../test.o test.o
ls: ../test.o: No such file or directory
test.o
% make -n
cc -O -pipe -c ../test.c
cc -O -pipe -o test ../test.o=20
It is created in wrong directory, because there is no '-o' specified.
This simple path fix building .c files, but other should be fixed as well.
Index: sys.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /private/FreeBSD/src/share/mk/sys.mk,v
retrieving revision 1.75
diff -u -p -r1.75 sys.mk
--- sys.mk 4 Feb 2004 14:40:44 -0000 1.75
+++ sys.mk 9 Mar 2004 14:02:21 -0000
@@ -184,7 +184,7 @@ MACHINE_ARCH ?=3D i386
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
=20
.c.o:
- ${CC} ${CFLAGS} -c ${.IMPSRC}
+ ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
=20
.cc .cpp .cxx .C:
${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
Could someone commit this, PLEASE?
PS. I'm building world right now to be sure nothing depend on it,
but I have no idea how something may depend on this.
--=20
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd@FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
--9j/QU+CmmrcVJkVI
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFATc83ForvXbEpPzQRAou1AJ9735av9p+EfperC4rLbmHeUkiKPwCfSRpF
Wjif0Yi60JKr5XyZnjbSico=
=v2gN
-----END PGP SIGNATURE-----
--9j/QU+CmmrcVJkVI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040309140543.GW10864>
