develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #118987] ext/SDBM_File: parallel build fails (make -j)

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
August 12, 2013 06:55
Subject:
[perl #118987] ext/SDBM_File: parallel build fails (make -j)
Message ID:
rt-3.6.HEAD-2552-1376290490-1356.118987-15-0@perl.org
On Tue Jul 23 16:48:00 2013, tonyc wrote:
> On Tue Jul 23 08:40:59 2013, citrin.ru wrote:
> > This Makefile has two conflicting targets, that do the same thing
> > (make all in
> > sdbm subdir):
> > 
> > subdirs ::
> >          $(NOECHO) cd sdbm && $(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE)
> > all
> > $(PASTHRU)
> > 
> > and
> > 
> > $(MYEXTLIB): sdbm/Makefile
> >          cd sdbm && $(MAKE) all
> > 
> > First target created by MakeMaker because of existence
> > ./sdbm/Makefile.PL
> > 
> > Second target is explicitly added in Makefile.PL (in MY::postamble).
> > 
> > With 'make -j N' this two targets can be run in parallel, causing
> > build failure.

Unfortunately if the second is removed then there's no dependency to
build sdbm/libsdbm$(LIB_EXT).

Adding a dep:

$(MYEXTLIB): subdirs

is out too, since there's a generated rule:

subdirs :: $(MYEXTLIB)

causing a dependency loop.

One alternative I've tried is having preamble produce:

$(MYEXTLIB): sdbm/Makefile
	cd sdbm && $(MAKE) all

sdbm/Makefile: sdbm/Makefile.PLX
	cd sdbm && $(PERL) Makefile.PLX

(after renaming sdbm/Makefile.PL) - but $(PERL) is ../../miniperl, so
this fails.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118987

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About