[csw-devel] SF.net SVN: gar:[8462] csw/mgar/gar/v2/bin/fixlibtool

bensons at users.sourceforge.net bensons at users.sourceforge.net
Wed Feb 10 16:06:09 CET 2010


Revision: 8462
          http://gar.svn.sourceforge.net/gar/?rev=8462&view=rev
Author:   bensons
Date:     2010-02-10 15:06:09 +0000 (Wed, 10 Feb 2010)

Log Message:
-----------
fixlibtool: handle comments, when replacing .la archives. handle multilines while addid -L and -R

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/fixlibtool

Modified: csw/mgar/gar/v2/bin/fixlibtool
===================================================================
--- csw/mgar/gar/v2/bin/fixlibtool	2010-02-10 14:53:31 UTC (rev 8461)
+++ csw/mgar/gar/v2/bin/fixlibtool	2010-02-10 15:06:09 UTC (rev 8462)
@@ -21,7 +21,6 @@
 #       @$(MAKECOOKIE)
 #
 ####################################################
-
 umask 0022
 PATH=/opt/csw/bin
 
@@ -34,7 +33,8 @@
 ## Fix Makefiles
 for mk in $(gfind ${BASEPATH} -name Makefile -print); do
     gcp ${mk} ${mk}.orig
-    LT_FILES=$(for lib in $(ggrep '/opt/csw.*/lib/.*\.la' ${mk}); do \
+    LT_FILES=$(for lib in $(gegrep -v '^#|^$' ${mk} | \
+                   ggrep '/opt/csw.*/lib/.*\.la'); do \
                    echo $lib |gsed -ne '/\/opt.*\.la/p'; done)
     for file in ${LT_FILES}; do
         LIB_NAME=$(ggrep 'dlname=' ${file} | \
@@ -44,7 +44,7 @@
         fixpath=$(gecho $file |gsed 's/\//\\\//g')
         gsed "s/${fixpath}/-l${LIB_NAME}/g" ${mk} >${mk}.new
         LIB_DIR=$(ggrep 'libdir=' ${file} | gsed -e "s/.*'\(.*\)'/\1/")
-        gsed "s,\(LDFLAGS =.*\),\1 -R${LIB_DIR} -L${LIB_DIR}," ${mk}.new >${mk}
+        perl -pe 's,(LDFLAGS =[^\\]*)(\\)?\n,$1 -R'${LIB_DIR}' -L'${LIB_DIR}' $2\n,' ${mk}.new >${mk}
         gchmod +x ${mk}
     done
 done


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list