Re: Linux 2.4.17-pre5

Stephan von Krawczynski (skraw@ithnet.com)
Fri, 7 Dec 2001 15:25:11 +0100


On Sat, 08 Dec 2001 00:35:14 +1100
Keith Owens <kaos@ocs.com.au> wrote:

> On Fri, 7 Dec 2001 12:55:30 +0100,
> Stephan von Krawczynski <skraw@ithnet.com> wrote:
> >There is a problem: I made a (really small) patch to Config.in saying:
> >
> > int ' Maximum number of cards supported by HiSax'
CONFIG_HISAX_MAX_CARDS 8
> >
> >If I check this in the source, it gives me CONFIG_HISAX_MAX_CARDS as (8)
>
> Yuck! CML1 outputs integers as #define CONFIG_foo (number) instead of
> just number. CML2 does not do that, I was looking at CML2. Add this
> to drivers/isdn/Makefile
>
> CFLAGS_foo.o += -DMAX_CARDS=$(subst (,,$(subst ),,$(CONFIG_HISAX_MAX_CARDS)))
>
> In foo.c, use MAX_CARDS instead of CONFIG_HISAX_MAX_CARDS. Change foo
> to the name of the object that you are working on. When you build, it
> should say -DMAX_CARDS=8.

Thanks for this hint, but it is not all that easy. Problem is the definition is
needed for _all_ files in the hisax-subtree, to be more precise for all
currently including hisax.h. I am not very fond of the idea to add additional
conditions to the availability of the HISAX_MAX_CARDS symbol, especially if
they are located in the Makefile.
Anyway, how would you generate this additional -D for all files inside a
certain directory? Obviously the stuff should at least be put inside the
hisax-Makefile, and not one layer above in isdn-Makefile.

I tried "CFLAGS += ..." but that does not work.

Thanks for help,
Stephan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/