All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/9] Kbuild: factor parser rules
@ 2011-05-05  2:03 Arnaud Lacombe
  2011-05-05  2:03 ` [RFC 2/9] genksyms: finalize rename Arnaud Lacombe
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Arnaud Lacombe @ 2011-05-05  2:03 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Michal Marek, Arnaud Lacombe

Hi Folks,

I noticed recently that several program under scripts/ implement their own set
of gperf/lex/yacc rules. The following patchset aims at factoring all these
targets into `scripts/Makefiles.lib'. Patches do the job for `genksyms' and
`kconfig', `dtc' remains to be done.

I am not really happy with the file naming, in particular the lexer which breaks
convention. I would prefer something ala:
 - parser: %.tab.c
 - lexer: %.lex.c
 - hash: %.hash.c

Moreover, I'd prefer to build the lexer and parser as a different compilation
unit, but that might be done later on.

The following also allows to automatically regen the %_shipped file upon
modification of its associated prerequiresite, provided REGENERATE_PARSERS is
defined.

The diff may look mistakenly large as I had to shuffle things around to make
them match the same pattern.

Known issue: there should be 2 new warnings introduced in `genksyms', only
compile tested so far (only on tools, not on the full kernel), in particular,
`gperf' options may need to be tuned.

Patches are based on v2.6.38. Not for merge, so not signed off on purpose.

Comments welcome!
 - Arnaud

Arnaud Lacombe (9):
  genksyms: rename parser files
  genksyms: finalize rename
  genksyms: pass hash and lookup functions name and target language
    though the input file
  genksyms: regen parser
  kconfig: constify `kconf_id_lookup'
  kconfig: regen parsers
  kbuild: merge parser generation rules
  kconfig: regen parser
  genksyms: regen parser

 scripts/Makefile.lib                     |   31 +-
 scripts/genksyms/.gitignore              |    6 +-
 scripts/genksyms/Makefile                |   43 +-
 scripts/genksyms/genksyms.c              |   11 +-
 scripts/genksyms/genksyms.gperf          |   59 +
 scripts/genksyms/genksyms.hash.c_shipped |  220 +++
 scripts/genksyms/genksyms.l              |  408 +++++
 scripts/genksyms/genksyms.tab.c_shipped  | 2324 +++++++++++++++++++++++++
 scripts/genksyms/genksyms.y              |  475 ++++++
 scripts/genksyms/keywords.c_shipped      |  220 ---
 scripts/genksyms/keywords.gperf          |   56 -
 scripts/genksyms/lex.c_shipped           | 2709 ------------------------------
 scripts/genksyms/lex.genksyms.c_shipped  | 2242 ++++++++++++++++++++++++
 scripts/genksyms/lex.l                   |  409 -----
 scripts/genksyms/parse.c_shipped         | 2353 --------------------------
 scripts/genksyms/parse.h_shipped         |  139 --
 scripts/genksyms/parse.y                 |  473 ------
 scripts/kconfig/Makefile                 |   25 -
 scripts/kconfig/lex.zconf.c_shipped      |   26 +-
 scripts/kconfig/zconf.gperf              |    2 +-
 scripts/kconfig/zconf.hash.c_shipped     |  273 ++--
 scripts/kconfig/zconf.l                  |    4 +-
 scripts/kconfig/zconf.tab.c_shipped      |   32 +-
 scripts/kconfig/zconf.y                  |    8 +-
 24 files changed, 5959 insertions(+), 6589 deletions(-)
 create mode 100644 scripts/genksyms/genksyms.gperf
 create mode 100644 scripts/genksyms/genksyms.hash.c_shipped
 create mode 100644 scripts/genksyms/genksyms.l
 create mode 100644 scripts/genksyms/genksyms.tab.c_shipped
 create mode 100644 scripts/genksyms/genksyms.y
 delete mode 100644 scripts/genksyms/keywords.c_shipped
 delete mode 100644 scripts/genksyms/keywords.gperf
 delete mode 100644 scripts/genksyms/lex.c_shipped
 create mode 100644 scripts/genksyms/lex.genksyms.c_shipped
 delete mode 100644 scripts/genksyms/lex.l
 delete mode 100644 scripts/genksyms/parse.c_shipped
 delete mode 100644 scripts/genksyms/parse.h_shipped
 delete mode 100644 scripts/genksyms/parse.y

-- 
1.7.3.4.574.g608b.dirty


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-05-23  5:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [RFC 3/9] genksyms: pass hash and lookup functions name and target language though the input file Arnaud Lacombe
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

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.