[PATCH v2 app-mkfontdir] config: use Autoconf rather than sed to substitute $bindir

Gaetan Nadon memsize at videotron.ca
Sat Jan 22 05:08:46 PST 2011


On Sat, 2011-01-22 at 09:54 +0100, Rémi Cardona wrote:

> Le 22/01/2011 03:47, Gaetan Nadon a écrit :
> > The path substitution in mkfontdir script can be done at configuration
> > time using Autoconf. This is an alternative to using sed and requires
> > less Makefile work.
> 
> It may be slightly less Makefile work, but it's not what the autoconf
> folks recommend. I would stick by that instead (which is already better
> than what the current makefile does).
> 
> >From the autoconf manual [1] :
> 
> ======
> Similarly, you should not rely on AC_CONFIG_FILES to replace bindir and
> friends in your shell scripts and other files; instead, let make manage
> their replacement. For instance Autoconf ships templates of its shell
> scripts ending with ‘.in’, and uses a makefile snippet similar to the
> following to build scripts like autoheader and autom4te:
> 
>      edit = sed \
>              -e 's|@bindir[@]|$(bindir)|g' \
>              -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
>              -e 's|@prefix[@]|$(prefix)|g'
> ======
> 
> I've seen this done a lot of times in many Makefile.am in many projects,
> it really is a standard idiom and we should use it too.
> 

Wow, thanks a million. I totally missed that.

> Cheers,
> 
> Rémi
> 
> 
> [1]
> http://www.gnu.org/software/autoconf/manual/autoconf.html#index-sysconfdir-184
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110122/ee993554/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110122/ee993554/attachment-0001.pgp>


More information about the xorg-devel mailing list