On 12/05/2011 06:37 PM, Andrew Benton wrote:
> On Mon, 05 Dec 2011 17:38:28 -0600
> Bruce Dubbs<[email protected]>  wrote:
>
>> Here's something else that is even more tidy:
>>
>> find -name Makefile -exec                            \
>>     sed -ir -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1'    \
>>             -e 's#^BUILD_ARCHIVE :*= 1#NO_&#'          \
>>             -e '/^USEDLIBS/s# ([A-Za-z]*).a# -l\1#g'   \
>>             -e 's#^USEDLIBS#LDFLAGS#' {} \;
>>
>> Using the -r switch you don't have to escape parens.  Moving the
>> \newline gives a nice visual separation to differentiate from \1 and \;
>> The ampersand shortens up the second expression.
>>
>> The . in find is not required, it is the default.
I always like to keep the dot in there as this is not always the case.  
Besides, it is part of my flying fingers so learning to omit it would be 
bad on any of the old UX or SCO boxes, probably on AIX too, though I 
rarely see any of the above any more.
>> I didn't completely check it, but thought I'd pass some ideas.
> Unfortunately there were a couple of errors in what I posted earlier.
> This one has been checked and works:
>
> touch tools/edis/EnhancedDisassembly.exports
> ./configure --prefix=/usr
> find -name Makefile -exec                            \
>    sed -ir -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1'    \
>            -e 's#BUILD_ARCHIVE :*= 1#NO_&#'           \
>            -e '/^USEDLIBS/s# \([A-Za-z]*\).a# -l\1#g' \
>            -e 's#^USEDLIBS#LDFLAGS#' {} \;
> sed -i 's#BUILD_ARCHIVE = 1#NO_&#' Makefile.rules
> sed -i 's#x)/docs#x)/share/doc#' Makefile.config
> make -j4
> make check
> make install
>
> Andy
Very nice guys! Don't suppose one of y'all want to add it to the book? :-)

-- DJ Lucas


-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to