diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-09-02 21:20:28 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2019-11-14 05:06:13 +0000 |
commit | d3238bcaf0d0c3dcb2b979dbb9556988c0c1483a (patch) | |
tree | 71e44c3d4a3b08c8e6a92296b966c4debf3f8a32 | |
parent | 57c745a9a373b4c9d272d00ff4f16dbcc6d3c48b (diff) |
rules: de-duplicate the parts assignment
There are only a few files that are rule-dependent, the majority of the files
are the same. So let's de-duplicate this here and use a substitute MODEL
The only difference between the base and the evdev parts is that there are
only a few files in each which are rule-dependent. Let's just use a substitute
here which has the nice benefit of making it more obvious where base and evdev
differ.
One file for evdev is now an empty file (the header gets removed during
merge) but we can live with that.
The output is identical where compat rules are enabled, where disabled the new
rules file is now missing a few empty sections - i.e. the functional output is
identical.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | rules/Makefile.am | 91 | ||||
-rw-r--r-- | rules/evdev.lists.base.part (renamed from rules/evdev.lists.part) | 0 | ||||
-rw-r--r-- | rules/evdev.ml_s1.part | 1 |
3 files changed, 16 insertions, 76 deletions
diff --git a/rules/Makefile.am b/rules/Makefile.am index 40b80e67..2772b67d 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -22,11 +22,11 @@ endif if USE_COMPAT_RULES -base_parts = \ +parts = \ base.hdr.part base.lists.part \ - base.lists.base.part \ + RULESET.lists.base.part \ compat/base.lists.part \ - base.m_k.part \ + RULESET.m_k.part \ base.l1_k.part \ base.l_k.part \ base.o_k.part \ @@ -42,46 +42,8 @@ base_parts = \ compat/base.ml2v2_s.part \ compat/base.ml3v3_s.part \ compat/base.ml4v4_s.part \ - base.m_s.part \ - base.ml_s1.part \ - compat/base.lv_c.part \ - compat/base.l1v1_c.part \ - compat/base.l2v2_c.part \ - compat/base.l3v3_c.part \ - compat/base.l4v4_c.part \ - base.ml_c.part \ - base.ml1_c.part \ - base.m_t.part \ - base.lo_s.part \ - base.l1o_s.part \ - base.l2o_s.part \ - base.l3o_s.part \ - base.l4o_s.part \ - compat/base.o_s.part base.o_s.part \ - base.o_c.part \ - base.o_t.part - -evdev_parts = \ - base.hdr.part base.lists.part \ - evdev.lists.part \ - compat/base.lists.part \ - evdev.m_k.part \ - base.l1_k.part \ - base.l_k.part \ - base.o_k.part \ - base.ml_g.part \ - base.m_g.part \ - compat/base.mlv_s.part base.mlv_s.part \ - compat/base.ml_s.part base.ml_s.part \ - compat/base.ml1_s.part base.ml1_s.part \ - compat/base.ml1v1_s.part \ - compat/base.ml2_s.part base.ml2_s.part \ - compat/base.ml3_s.part base.ml3_s.part \ - compat/base.ml4_s.part base.ml4_s.part \ - compat/base.ml2v2_s.part \ - compat/base.ml3v3_s.part \ - compat/base.ml4v4_s.part \ - evdev.m_s.part \ + RULESET.m_s.part \ + RULESET.ml_s1.part \ compat/base.lv_c.part \ compat/base.l1v1_c.part \ compat/base.l2v2_c.part \ @@ -101,10 +63,10 @@ evdev_parts = \ else -base_parts = \ +parts = \ base.hdr.part base.lists.part \ - base.lists.base.part \ - base.m_k.part \ + RULESET.lists.base.part \ + RULESET.m_k.part \ base.l1_k.part \ base.l_k.part \ base.ml_g.part \ @@ -115,34 +77,8 @@ base_parts = \ base.ml2_s.part \ base.ml3_s.part \ base.ml4_s.part \ - base.m_s.part \ - base.ml_s1.part \ - base.ml_c.part \ - base.ml1_c.part \ - base.m_t.part \ - base.l1o_s.part \ - base.l2o_s.part \ - base.l3o_s.part \ - base.l4o_s.part \ - base.o_s.part \ - base.o_c.part \ - base.o_t.part - -evdev_parts = \ - base.hdr.part base.lists.part \ - evdev.lists.part \ - evdev.m_k.part \ - base.l1_k.part \ - base.l_k.part \ - base.ml_g.part \ - base.m_g.part \ - base.mlv_s.part \ - base.ml_s.part \ - base.ml1_s.part \ - base.ml2_s.part \ - base.ml3_s.part \ - base.ml4_s.part \ - evdev.m_s.part \ + RULESET.m_s.part \ + RULESET.ml_s1.part \ base.ml_c.part \ base.ml1_c.part \ base.m_t.part \ @@ -159,7 +95,7 @@ endif all_parts_dist = base.hdr.part \ base.lists.part \ base.lists.base.part \ - evdev.lists.part \ + evdev.lists.base.part \ base.m_k.part \ base.l1_k.part \ base.l_k.part \ @@ -174,6 +110,7 @@ all_parts_dist = base.hdr.part \ base.ml4_s.part \ base.m_s.part \ base.ml_s1.part \ + evdev.ml_s1.part \ base.ml_c.part \ base.ml1_c.part \ base.m_t.part \ @@ -197,10 +134,12 @@ SUFFIXES = .xml .lst .xml.lst: perl $(srcdir)/xml2lst.pl < $< > $@ +base_parts=$(subst RULESET,base,$(parts)) base: $(base_parts) merge.py $(srcdir)/merge.py $@ $(srcdir) $(builddir) $(base_parts) -evdev: $(evdev_parts) merge.py +evdev_parts=$(subst RULESET,evdev,$(parts)) +evdev: $(evdev_sources) merge.py $(srcdir)/merge.py $@ $(srcdir) $(builddir) $(evdev_parts) dist_files = xkb.dtd xkb.its README diff --git a/rules/evdev.lists.part b/rules/evdev.lists.base.part index 7b5d0d46..7b5d0d46 100644 --- a/rules/evdev.lists.part +++ b/rules/evdev.lists.base.part diff --git a/rules/evdev.ml_s1.part b/rules/evdev.ml_s1.part new file mode 100644 index 00000000..8ff2163a --- /dev/null +++ b/rules/evdev.ml_s1.part @@ -0,0 +1 @@ +! model layout = symbols |