Andrew Benton wrote:

> I've tidied that up a bit:
> 
> sed -i 's#x)/docs#x)/share/doc#' Makefile.config.in
> touch tools/edis/EnhancedDisassembly.exports
> ./configure --prefix=/usr
> find . -name Makefile -exec sed -i -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1' \
>   -e 's#^BUILD_ARCHIVE :*= 1#NO_BUILD_ARCHIVE = 1#' \
>   -e '/^USEDLIBS/s# \([A-Za-z]*\).a# -l\1#g' \
>   -e 's#^USEDLIBS#LDFLAGS#' {} \;
> make -j4
> make check
> make install

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 didn't completely check it, but thought I'd pass some ideas.

   -- Bruce
-- 
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