Fantastic. I did not know to do this. A quick little script:

use strict; use warnings; # This script is intended to change the extension on compiler librarie +s from .lib (MSVC standard) to .a (GNU standard). # It does this by grabbing the environment variables U3_DEVICE_PATH an +d LIB. # U3_DEVICE_PATH is used to exclude paths to libraries that aren't on +the U3 Compiler-onna-stick # LIB is used to provide a list of paths to scan for the libraries to +be checked. my $debug = 0; my $u3_drive = $ENV{'U3_DEVICE_PATH'} or die "HALT: U3_DEVICE_PATH is +not set or null ($!)\n"; my @lib_paths = split ";", $ENV{'LIB'} or die "HALT: LIB not set or nu +ll ($!)\n"; if ($debug){ print "U3_DEVICE_PATH is $u3_drive\n"; print "$_ is a LIB path\n" for (@lib_paths); } for my $lib_dir (@lib_paths){ -d $lib_dir or die "HALT: $_ not found ($!)\n"; unless ($lib_dir =~ /^$u3_drive/){ print "$lib_dir is not on $u3_drive, skipped.\n" if $debug; next; } print "$lib_dir is on $u3_drive processing...\n" if $debug; opendir THEDIR, $lib_dir or die "HALT: Can't open $lib_dir ($!)\n" +; my @lib_files = readdir THEDIR or die "HALT: Can't read $lib_dir ( +$!)\n"; close THEDIR; for my $lib_file (@lib_files){ unless($lib_file =~ /\.lib$|\.dll\.a$/i){ print "$lib_file does not end with .lib or .dll.a, skippin +g.\n" if $debug; next; } my $old_file = $lib_dir."\\".$lib_file; my $new_file = $old_file; $new_file =~ s/\.lib$|\.dll\.lib$|\.dll\.a$/.a/i; print "Renaming $old_file to $new_file\n"; rename $old_file, $new_file or die "HALT: Could not rename $ne +w_file ($!)\n"; } }

...and that's done.

Update The code now handles files ending in .dll.lib and renames them to .a as well...(and files that have been misnamed .dll.a, oh and properly escapes the .)


In reply to Re^4: RFC: Setting up a minGW compiling envronment for Perl 5.10 by Bloodrage
in thread RFC: Setting up a minGW compiling envronment for Perl 5.10 by Bloodrage

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.