From: Arnaud Lacombe <lacombar@gmail.com>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>, Arnaud Lacombe <lacombar@gmail.com>
Subject: [RFC 3/9] genksyms: pass hash and lookup functions name and target language though the input file
Date: Wed, 4 May 2011 22:03:18 -0400 [thread overview]
Message-ID: <1304561004-2684-4-git-send-email-lacombar@gmail.com> (raw)
In-Reply-To: <1304561004-2684-1-git-send-email-lacombar@gmail.com>
Renaming hash and lookup functions on the command line would reduces its
genericity. Use the .gperf file to pass this information. Do the same for the
target language.
---
scripts/genksyms/Makefile | 2 +-
scripts/genksyms/genksyms.gperf | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
index 82bb25f..de6675d 100644
--- a/scripts/genksyms/Makefile
+++ b/scripts/genksyms/Makefile
@@ -29,7 +29,7 @@ lex.%.c: %.l
cp $@ $@_shipped
%.hash.c: %.gperf
- gperf -t --output-file $@ -L ANSI-C -a -C -E -g -H is_reserved_hash -k 1,3,$$ -N is_reserved_word -p -t $<
+ gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
cp $@ $@_shipped
endif
diff --git a/scripts/genksyms/genksyms.gperf b/scripts/genksyms/genksyms.gperf
index e6349ac..3e77a94 100644
--- a/scripts/genksyms/genksyms.gperf
+++ b/scripts/genksyms/genksyms.gperf
@@ -1,3 +1,6 @@
+%language=ANSI-C
+%define hash-function-name is_reserved_hash
+%define lookup-function-name is_reserved_word
%{
struct resword;
static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
--
1.7.3.4.574.g608b.dirty
next prev parent reply other threads:[~2011-05-05 2:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 2:03 [RFC 0/9] Kbuild: factor parser rules Arnaud Lacombe
2011-05-05 2:03 ` [RFC 2/9] genksyms: finalize rename Arnaud Lacombe
2011-05-05 2:06 ` Arnaud Lacombe
2011-05-05 14:23 ` Michal Marek
2011-05-23 2:17 ` Arnaud Lacombe
2011-05-23 3:32 ` Arnaud Lacombe
2011-05-05 2:03 ` Arnaud Lacombe [this message]
2011-05-05 2:03 ` [RFC 4/9] genksyms: regen parser Arnaud Lacombe
2011-05-05 2:03 ` [RFC 5/9] kconfig: constify `kconf_id_lookup' Arnaud Lacombe
2011-05-05 2:03 ` [RFC 6/9] kconfig: regen parsers Arnaud Lacombe
2011-05-05 2:03 ` [RFC 7/9] kbuild: merge parser generation rules Arnaud Lacombe
2011-05-05 13:32 ` Michal Marek
2011-05-05 14:50 ` Arnaud Lacombe
2011-05-05 2:03 ` [RFC 8/9] kconfig: regen parser Arnaud Lacombe
2011-05-05 2:03 ` [RFC 9/9] genksyms: " Arnaud Lacombe
[not found] ` <1304561004-2684-2-git-send-email-lacombar@gmail.com>
2011-05-05 14:18 ` [RFC 1/9] genksyms: rename parser files Michal Marek
2011-05-23 2:06 ` Arnaud Lacombe
2011-05-23 5:48 ` Arnaud Lacombe
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=1304561004-2684-4-git-send-email-lacombar@gmail.com \
--to=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.