Re: [ecasound] Ecasound 2.3.5 released

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Mar 27 2005 - 15:36:38 EEST

On Sun, 27 Mar 2005, Junichi Uekawa wrote:

>> This is now also done in CVS. Awk is used to replace variables in
>> ecasoundrc.in. The same question applies here: is $datadir/ecasound ok, or
>> should be possible to specify pkgdatadir independently from datadir?
> Is there a reason for re-defining the value?

I used 'datadir' instead of directly 'pkgdatadir' as only 'datadir' is
defined by default by autoconf/configure. But I guess this is really
unnecessary... I'll change ecasoundrc.in et al to use 'pkgdatadir'
directly.

As for using config.h instead of modifying CPPFLAGS in Makefile.am, I'd
like to avoid introducing new mechanisms for passing build configuration
data to source-level context. Currently only config.h is used.

Especially modifying global variables such as CPPFLAGS is a bit risky, as
the rules for editing them in Makefile.am are not all that clear (at least
not to me :)) and even more unclear for old versions of automake (for
example the relation of CPPFLAGS, AM_CPPFLAGS and foobar_CPPFLAGS).
Automake manual says:

http://sources.redhat.com/automake/automake.html
""
You should never redefine a user variable such as CPPFLAGS in Makefile.am.
Use automake -Woverride to diagnose such mistakes. Even something like

      CPPFLAGS = -DDATADIR=\"$(datadir)\" @CPPFLAGS@

is erroneous.
""

I guess a valid work-around is to set -DPKGDATADIR in AM_CPPFLAGS and make
sure no foobar_CPPFLAGS variables are defined in the same Makefile.am (as
those override AM_CPPFLAGS). Does this sound ok?

> I will probably be able to work around them; but I think
> automake/autoconf supports having DATADIR etc set at 'make' time
> (depending on the 'prefix' value). Which will be broken in this approach.

Hmm, that's true. So should it be possible to do:

make install pkgdatadir=/usr/foo/share-ecasound

...? If yes, then config.h cannot be used and $pkgdatadir must be passed
in AM_CPPFLAGS of libecasound/Makefile.am.

>> And btw, I don't possess enough awk-foo to implement the ecasoundrc
>> generationw without using sub(). I'm not 100% whether all awk versions
> I think it's more recommended to use sed for this purpose.
> It's more well-known to be mostly working on most ports.
[...]
[patch to replace awk to sed]

Thanks, this is much better! I'll commit the patch to CVS.

-- 
  http://www.eca.cx
  Audio software for Linux!
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Mar 27 16:15:20 2005

This archive was generated by hypermail 2.1.8 : Sun Mar 27 2005 - 16:15:20 EEST