From alsa-devel-owner@alsa.jcu.cz  Wed Jan  6 22:26:23 1999
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id WAA12363;
	Wed, 6 Jan 1999 22:25:02 +0100
Date: Wed, 6 Jan 1999 22:25:02 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Anders Semb Hermansen <ahermans@vf.telia.no>
cc: ALSA devel mailinglist <alsa-devel@alsa.jcu.cz>
Subject: Re: [PATCH] Compiling ALSA with only needed drivers
In-Reply-To: <Pine.LNX.4.04.9901042046560.4533-200000@pluto.andeby>
Message-ID: <Pine.LNX.3.96.990106220022.407G-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Mon, 4 Jan 1999, Anders Semb Hermansen wrote:

> Hello
> 
> I've made a patch against latest CVS so that you can specify which
> soundcards you want to compile drivers for.
> This will make ALSA compile faster.
> 
> You can do this by giving the --with-cards=<list> argument to ./configure
> For example if you want to compile drivers only for SoundBlaster 16 and 
> GUS MAX you write:
> ./configure --with-cards=sb16,gusmax
> 
> If you do not specify any cards, it will compile drivers for all cards as
> it is now.
> 
> There is still some more to do, more code can be excluded for some
> soundcards.
> 
> I would like comments this.

At first - thank you for patch. I think this feature should be useable
for some users.

At second - I don't probably include this patch to driver sources in
current form. Some module dependency is very complex and I don't want
see more that one 'ifeq (1,<something>)' sequence per module in Makefile.
More conditions should make trouble in future.

I tried create some language which describes module dependency in
alsa-driver/modules.config (not complete, but should be used as
reference). Feel free modify this syntax if you want.

My idea is write program which will parse this module configuration file,
looks for top-level soundcard modules and creates configuration for
autoconf (result should be stored as function to acinclude.m4 for
example). Second output should be some part of Makefile.conf.in.

Some thoughts:

1) Keep syntax for modules.config simple.
2) Try make all changes ready for kernel inclusion.
3) I preffer C language for tools code.
4) Output from module configuration tool will be probably always available
   on CVS, thus I assume that tool will be run only by developer which
   will add new soundcard or change modules dependency...

						Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


