develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [perl #24486] 'make install' should not assume writable build directory

Thread Previous
Michael G Schwern
November 13, 2003 15:59
Re: [perl #24486] 'make install' should not assume writable build directory
Message ID:
On Thu, Nov 13, 2003 at 01:09:08PM +0000, Slaven Rezic wrote:
> Here's some analysis of the problem. The blibdirs sections of DynaLoader's
> Makefile looks like this on my system:
> blibdirs :: 
> 	$(NOECHO) $(MKPATH) \
> 	  $(INST_MAN3DIR) 
> 	$(NOECHO) $(CHMOD) 755 \
> 	  $(INST_MAN3DIR) 
> 	$(NOECHO) $(TOUCH) blibdirs
> As it stands, this rule gets always fired in a static DynaLoader
> build. 

If it does then there's something wrong.  blibdirs is touched at the end
to avoid a rebuild.  $(INST_STATIC) depends on blibdirs so the problem
is likely there.  It used to depend on $(INST_ARCHAUTODIR)/.exists.

blibdirs is touched.  The .exists files were set to the time of CORE/perl.h.

But none of this seems to really be the problem.  Running make with
--debug its noting that "blibdirs has a double colon and no dependencies"
and then proceeding to rebuild it even though blibdirs exists.  If I take 
away the double colon, no problem.  I don't know why make decided it has to 
rebuild a file that exists with no dependencies and a double colon.  Maybe
because there's no dependencies it can't check if its up-to-date so it
just reruns it to make sure.  Doesn't really seem right though.

I need to be able to extend the blibdirs target if I'm going to keep 
dir_target() working, so I need that double colon.  The work around I
can think of is to have blibdirs depend on something.  Like Makefile.PL.

Try this.

--- lib/ExtUtils/	10 Nov 2003 08:34:41 -0000	1.67
+++ lib/ExtUtils/	13 Nov 2003 23:57:03 -0000
@@ -107,7 +107,7 @@
     my @mkpath = $self->split_command('$(NOECHO) $(MKPATH)', @dirs);
     my @chmod  = $self->split_command('$(NOECHO) $(CHMOD) 755', @dirs);
-    my $make = "\nblibdirs :: \n";
+    my $make = "\nblibdirs :: Makefile.PL \n";
     $make .= join "", map { "\t$_\n" } @mkpath, @chmod;
     $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs\n\n";

> Maybe it would be better if ExtUtils::MM_Any::blibdirs spit
> out something like:
> blibdirs :: $(INST_LIBDIR) $(INST_AUTODIR) \
> 	    $(INST_MAN3DIR)
> 	$(NOECHO) $(TOUCH) blibdirs

Make can't depend on a directory target.  That's what caused the whole
$(INST_LIBDIR)/.exists mess in the first place.

See for details.

Michael G Schwern
Do not try comedy at home!  Milk & Cheese are advanced experts!  Attempts at
comedy can be dangerously unfunny!

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About