On Thu, Apr 19, 2001 at 05:18:41PM +0900, Makoto MATSUSHITA wrote:
> 
> ru> I always thought that ``obj'', ``all'' and ``install'' should be
> ru> executed in sequence, not together.  Hey, this even does not work
> ru> for bin/cat:
> 
> IIRC, it is assumed that "make -jX install (where X > 1)" _doesn't_ work.
> I've heard why, but I've forgotten :-)
> 
Attached is the Makefile that demonstrates the problem.  Run it like this:

        make obj; make all

Then try:

        make install

And then try:

        make -j2 install

Note the difference.  This fixes the problem:

--- Makefile    Thu Apr 19 11:33:04 2001
+++ Makefile    Thu Apr 19 11:36:20 2001
@@ -8,6 +8,7 @@
 beforeinstall: .SILENT
        cd ${.CURDIR}; \
        ${INSTALL} ${COPY} -m ${NOBINMODE} Makefile ${DESTDIR}/tmp
+       cd ${.OBJDIR}
        pwd
        ${INSTALL} ${COPY} -m ${NOBINMODE} foo ${DESTDIR}/tmp


I'm not sure if this a make(1) bug or a feature, as both NetBSD and
OpenBSD behave the same.  But I'm pretty sure this is a bug.  Will?


Cheers,
-- 
Ruslan Ermilov          Oracle Developer/DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age
NOMAN=  YES

all: foo

foo:
        touch ${.TARGET}

beforeinstall: .SILENT
        cd ${.CURDIR}; \
        ${INSTALL} ${COPY} -m ${NOBINMODE} Makefile ${DESTDIR}/tmp
        pwd
        ${INSTALL} ${COPY} -m ${NOBINMODE} foo ${DESTDIR}/tmp

.include <bsd.prog.mk>

Reply via email to