mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Stephan von Krawczynski <skraw@ithnet.com>
Cc: m.luca@iname.com, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: Linux 2.4.17-pre5 / Have fun with make
Date: Sat, 08 Dec 2001 09:21:36 +1100	[thread overview]
Message-ID: <3323.1007763696@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Fri, 07 Dec 2001 17:39:54 BST." <20011207173954.56896684.skraw@ithnet.com>

On Fri, 7 Dec 2001 17:39:54 +0100, 
Stephan von Krawczynski <skraw@ithnet.com> wrote:
>On Sat, 08 Dec 2001 00:35:14 +1100
>Keith Owens <kaos@ocs.com.au> wrote:
>> 
>> 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.
>
>Keith, it is getting weird right now. Your above suggestion does not work, it
>does not even execute, because the braces obviously confuse it.

That's what I get for typing code late at night and not testing it.
The correct implementation of that line is probably

lp:=(
rp:=)

CFLAGS_foo.o += -DMAX_CARDS=$(subst $(lp),,$(subst $(rp),,$(CONFIG_HISAX_MAX_CARDS)))

But as you found, you don't need that anyway.

>Now I come up with a _working_ solution, but to be honest, I don't dare to give
>away the patch, because it looks like this:
>
>EXTRA_CFLAGS      += -DHISAX_MAX_CARDS=$(subst ,,$(CONFIG_HISAX_MAX_CARDS))

EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS)

will work just as well.  The reason that you do not get '(8)' that way
is because CML1 generates inconsistent output.  In .config the line
says CONFIG_HISAX_MAX_CARDS=8, in include/linux/autoconf.h it says
#define CONFIG_HISAX_MAX_CARDS (8).  The makefiles use .config, the
source code uses autoconf.h.

Inconsistency of inconsistencies, saith the preacher; all is inconsistency.


      reply	other threads:[~2001-12-07 22:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06 20:44 Linux 2.4.17-pre5 Luca Montecchiani
2001-12-07  0:12 ` Stephan von Krawczynski
2001-12-07  3:43   ` Keith Owens
2001-12-07 11:55   ` Stephan von Krawczynski
2001-12-07 13:35     ` Keith Owens
2001-12-07 14:25     ` Stephan von Krawczynski
2001-12-07 16:39     ` Linux 2.4.17-pre5 / Have fun with make Stephan von Krawczynski
2001-12-07 22:21       ` Keith Owens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3323.1007763696@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.luca@iname.com \
    --cc=skraw@ithnet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®