tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgtools/libnbcompat and MAKE_JOBS



On Mon, Jan 23, 2012 at 02:49:42PM +0100, Anthony Mallet wrote:
 > Hi,
 > 
 > I think there is a MAKE_JOBS issue in devel/libnbcompat.
 > This is an excerpt of files/Makefile.in:
 > 
 > all: nbcompat/nbconfig.h $(LIB)

                           ^ .WAIT
 > 
 > .c.o:
 >      $(COMPILE) $(DEFS) -c $<
 > 
 > $(LIB): $(OBJS)
 >      $(AR) cr $@ $(OBJS)
 >      $(RANLIB) $@
 > 
 > nbcompat/nbconfig.h: nbcompat/config.h nbcompat.awk
 >      $(AWK) -f nbcompat.awk nbcompat/config.h > $@
 > 
 > [...]
 > 
 > Instead of flagging the package with MAKE_JOBS_SAFE=no, maybe it would be
 > better to fix the Makefile, e.g. like this ?
 > 
 > .c.o: nbcompat/nbconfig.h
 >      $(COMPILE) $(DEFS) -c $<

Unless all the objects really depend on the config header, better not
to pretend they do. Also, sometimes adding explicit depends to suffix
rules can cause odd behavior.

In general, use of .WAIT in places where ordering is intended is
usually better than introducing maybe-bogus dependency chains.

(although whoever wrote this was probably assuming "make depend"
before "make", which also solves the problem.)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index