lkml.org 
[lkml]   [2000]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: test10-pre7

[Peter Samuelson]
> > There are two ways to handle this:
> >
> > obj-$(CONFIG_WD80x3) += wd.o 8390.o
> > obj-$(CONFIG_EL2) += 3c503.o 8390.o
> > obj-$(CONFIG_NE2000) += ne.o 8390.o
> > obj-$(CONFIG_NE2_MCA) += ne2.o 8390.o
> > obj-$(CONFIG_HPLAN) += hp.o 8390.o

[John Alvord <jalvo@mbay.net>]
> You can avoid duplicates with
> obj-$(CONFIG_WD80x3) += wd.o
> ifneq (,$(findstring 8390.o,obj-$(CONFIG_WD80x3))
> obj-$(CONFIG_WD80x3) += 8390.o
> endif
>
> Which is wordy but accomplishes the objective of avoiding duplicates.

I said "there are two ways to handle this". You snipped the second,
which was:

> > ...Or do horrible games with 'if' statements and temporary
> > variables with names like $(NEED_8390) to ensure that it gets
> > included once if needed and not if not -- thereby pretty much
> > defeating the readability of the new-style makefiles.

I would consider your approach a variant of the "horrible games with if
statements and temporary variables". (:

Here's an exercise to the reader: reformat drivers/net/Makefile using
John Alford's approach, diff the two, and take a look. Then come back
and tell me LINK_FIRST -- 0-2 lines in the Makefile depending on your
ordering requirements, plus about five lines in Rules.make (*yes*, it
really is that simple) -- is really uglier.

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

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.046 / U:10.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site