delibtoolize.pl revision 98
98N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 98N/A# Use is subject to license terms. 98N/A# Undo libtool damage to makefiles to allow us to control the linker 98N/A# settings that libtool tries to force on us. 98N/A if ($_
eq "Makefile" && -f $_) {
98N/A print "delibtoolizing $File::Find::name...\n";
98N/A die "Can't rename $new_file to $old_file: $!\n";
98N/A open(
OLD,
"<$old_file")
or die "Can't open $old_file for reading: $!\n";
98N/A open(
NEW,
">$new_file")
or die "Can't open $new_file for writing: $!\n";
98N/A # Read in original file and preprocess for data we'll need later 98N/A if ($l =~ m%^\s*
CC\s*=\s*(\S*)%) {
98N/A # TODO: handle line continuation 98N/A # Remove libtool script from compile & link steps 98N/A # Add -KPIC & -DPIC flags that libtool normally provides 98N/A # Change -rpath to -R in link arguments 98N/A # Change flags for building shared object from arguments to libtool 98N/A # script into arguments to linker 98N/A # Change file names 98N/A if ($l =~ m%^(\S+):%) {
98N/A }
elsif ($l =~ m%^\s*$%) {