[vorbis-dev] ao/

Ralph Giles giles at snow.ashlu.bc.ca
Sun Oct 1 00:41:10 PDT 2000


On Sat, 30 Sep 2000, Jeff Squyres wrote:

> I ran into similar issues with automake (i.e., needing to conditionally
> compile only some .o files), and figured a way to do it.  You have to use
> automake's conditionals.  For example, in Makefile.am:
> 
> -----
> if WANT_FOO_O
> foo_name	= foo.c
> else
> foo_name	=
> endif
> 
> # ....
> foo_la_SOURCES	= $(foo_name) bar.o baz.o yow.o
> -----

Great, thanks for the fix! I'd actually tried the AM_CONDITIONAL() stuff,
but was trying to build a single variable with 'foo_name += foo.c' which
doesn't work (more than once!) I guess that's a gmake extension?

It seems to work ok without the else branch as well.

Anyway, here's another patch. This supercedes the previous too, but still
requires the additional files from the first one. I only tested the OSS
driver, though.

> It's weird, but it works.  Seems a bit more elegant that putting big #if
> (or #ifdef) around an entire file, and prevents compiler warnings about
> "empty translation unit" when if effectively preprocess an entire file
> away.

Well, it hides the ugliness in the build system anyway. This is actually
more work to maintain than the #ifdef solution, but maybe it's still 
better since adding drivers is rare.

It still seems like our original idea should work. That sort of thing
could be fixed in a re-write (of automake) but I'm beginning to agree with
those calling for a complete redesign!

Anyway, could someone please apply on of these? They're all better than
nothing.

Cheers,
 -ralph


--
giles at ashlu.bc.ca



<HR NOSHADE>
<UL>
<LI>APPLICATION/octet-stream attachment: ao-giles3.patch.gz
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ao-giles3.patch.gz
Type: application/octet-stream
Size: 3176 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20001001/5d8006b2/ao-giles3.patch-0001.obj


More information about the Vorbis-dev mailing list