On Dec 26, 2005, at 12:25 PM, Steve Peters wrote:

This problems seems to be related solely to BSD-based makes and not GNU make. On my OpenBSD system, "make -j2 disttest" fails with the default make, but
works fine with a GNU make.

From my quick and dirty test, it appears that the cd's in a GNU make are in
effect for the current command, but you are implicitly returned to your
start directory after the completed command. BSD doesn't return you back to your starting directory. Looking at the OpenBSD make(1) manpage, I got a
hint to the fix.

     -j max_jobs
Specify the maximum number of jobs that make may have running at any one time. Turns compatibility mode off, unless the -B flag
             is also specified.

So, after running "make -j2 -B disttest" everything compiled just fine. Check
the FreeBSD make manpage to see if there is a similar "-B" flag.  That
might be the fix you're looking for.

Or if we wanted to make a change in MakeMaker so that it could work with just "make -j2" everywhere, maybe something like this would work:

disttest : distdir
        cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL && cd $(ORIGDIR)
        cd $(DISTVNAME) && $(MAKE) $(PASTHRU)        && cd $(ORIGDIR)
        cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)   && cd $(ORIGDIR)

for some suitable value of $(ORIGDIR).

 -Ken

Reply via email to