develooper Front page | perl.perl5.porters | Postings from April 2001

Re: [PATCH: perl@9885] win32/Makefile (nmake) update

Thread Previous | Thread Next
April 29, 2001 11:11
Re: [PATCH: perl@9885] win32/Makefile (nmake) update
Message ID:

On Sun, 29 Apr 2001 wrote:

> Prymmer/Kahn <> writes:
> >Enclosed please find a unix-format context diff of the changes
> >I found necessary to get the 9885 kit building with MS VC 5
> >and the nmake utility.  This patch affects only win32/Makefile
> >and does not (unfortunately) take care of win32/
> May I make a plea that rather than continually adding more and more
> hard coded extensions to win32/Makefile, you instead copy the 
> idea in win32/ and let win32/ find and build them?
> It may be that buildext isn't perfect yet but the idea is to remove
> the burden on Pumpkings (and their deputies).

I certainly recognize this need (having just patched the VMS
+ makefile.SH to better accomodate the growing number of ext/ extensions).

I took a look at modifying FindExt::scan_ext() to add a way for it to
figure out that List/Util was in fact an extension like so:

D:\ttt\perl\win32>diff -c
*** Sun Apr 29 10:47:22 2001
--- Sun Apr 29 10:48:22 2001
*** 37,43 ****

  sub find_ext
!  if (/^(.*)\.pm$/i || /^(.*)_pm.PL$/i)
     my $name = $1;
     return if $name =~ $no;
--- 37,43 ----

  sub find_ext
!  if (/^(.*)\.pm$/i || /^(.*)_pm.PL$/i || /^(.*)\.xs$/i)
     my $name = $1;
     return if $name =~ $no;
End of diff

That returned for too many *.xs files to be of use (hence the trick of
copying ext/List/Util/lib/List/Util/Util.pom to ext/List/Util/
so as to trick into placing the name 'List/Util' into
extensions in

Another approach might have tired a more ad hoc
FindExt::scan_ext() attempt, perhaps along the lines of this (completely
untested) sort of thing:

!  if (/^(.*)\.pm$/i || /^(.*)_pm.PL$/i || /^(List.Util.Util\.xs$/i)

But I have a dislike for ad-hoc file naming in things that appear to be
attempts at general purpose extension finding.  

Given the odd nature of List/Util and given the ongoing discussion with
Graham over possible re-packaging I opted for the quick-dirty-but-tested
mod to simply add to what win32/Makefile already had in place.  This at
least has the advantage of allowing win32 to build perl, but should be

Peter Prymmer

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