dtd syntax ?

James Robertson jwrober at linuxfromscratch.org
Mon Aug 1 08:49:42 PDT 2005


alfs at linux2themax.com wrote:
> I was wondering if i got the syntax right.. 
> 
>       <search_replace base="&build_dir;/&gcc-directory;">
>         <file>gcc/Makefile.in</file>
>         <find>\(^CROSS_SYSTEM_HEADER_DIR =\).*</find>
>         <replace>\1 /tools/include at g</replace>
>       </search_replace>

Don't use the leading slashes in find and replace and use quotes
> 
> book syntax was
> 
> sed -e 's@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include at g' \
>     -i gcc/Makefile.in
> 
> Im also wondering how does one make up for the echo command in dtd
> 
> echo "
> #undef STARTFILE_PREFIX_SPEC
> #define STARTFILE_PREFIX_SPEC \"/tools/lib/\"" >> gcc/config/linux.h

That is easily handled with an execute

http://www.linuxfromscratch.org/alfs/view/dtd/alfs_dtd/elem_execute.html

James



More information about the alfs-discuss mailing list