diff options
Diffstat (limited to 'xorg-server/xkeyboard-config/rules')
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/ml1_s.sh | 19 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh | 11 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh | 11 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/ml_s.sh | 15 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/mln_s.sh | 22 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh | 14 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/bin/mlv_s.sh | 11 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/compat/makefile | 53 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/extras/makefile | 53 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/makefile | 189 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/rules/merge.py | 13 |
11 files changed, 341 insertions, 70 deletions
diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh index b2d222432..b09459a5d 100644 --- a/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh @@ -1,18 +1,9 @@ -#!/bin/sh +@echo off -INDIR=$1 -OUTFILE=base.ml1_s.part +set OUTFILE=base.ml1_s.part -> $OUTFILE +if exist %OUTFILE% del %OUTFILE% -awk '{ - if (index($2, "(") == 0) { - printf " * %s = pc+%s%%(v[1])\n", $1, $2; - } else { - printf " * %s = pc+%s\n", $1, $2; - } -}' < $INDIR/layoutsMapping.lst >> $OUTFILE +gawk "{ if (index($2, """(""") == 0) { printf """ * %%s = pc+%%s%%%%(v[1])\n""", $1, $2; } else { printf """ * %%s = pc+%%s\n""", $1, $2; }}" < layoutsMapping.lst >> %OUTFILE% -awk '{ - printf " * %s(%s) = pc+%s(%s)\n", $1, $2, $3, $4; -}' < $INDIR/variantsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s(%%s) = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE% diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh index 7c2b1a84c..4d492e02b 100644 --- a/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh @@ -1,10 +1,7 @@ -#!/bin/sh +@echo off -INDIR=$1 -OUTFILE=base.ml1v1_s.part +set OUTFILE=base.ml1v1_s.part -> $OUTFILE +if exist %OUTFILE% del %OUTFILE% -awk '{ - printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4; -}' < $INDIR/variantsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE% diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh index 084d4c0be..cec1334c0 100644 --- a/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh @@ -1,10 +1,7 @@ -#!/bin/sh +@echo off -INDIR=$1 -OUTFILE=base.ml1v_s.part +set OUTFILE=base.ml1v_s.part -> $OUTFILE +if exist %OUTFILE% del %OUTFILE% -awk '{ - printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4; -}' < $INDIR/variantsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE% diff --git a/xorg-server/xkeyboard-config/rules/bin/ml_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml_s.sh index 666ba870f..b7f0d9c46 100644 --- a/xorg-server/xkeyboard-config/rules/bin/ml_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/ml_s.sh @@ -1,14 +1,9 @@ -#!/bin/sh +@echo off -INDIR=$1 -OUTFILE=base.ml_s.part +set OUTFILE=base.ml_s.part -> $OUTFILE +if exist %OUTFILE% del %OUTFILE% -awk '{ - printf " * %s = pc+%s\n", $1, $2; -}' < $INDIR/layoutsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s = pc+%%s\n""", $1, $2; }" < layoutsMapping.lst >> %OUTFILE% -awk '{ - printf " * %s(%s) = pc+%s(%s)\n", $1, $2, $3, $4; -}' < $INDIR/variantsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s(%%s) = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE% diff --git a/xorg-server/xkeyboard-config/rules/bin/mln_s.sh b/xorg-server/xkeyboard-config/rules/bin/mln_s.sh index 4a615fe7d..66794a4fc 100644 --- a/xorg-server/xkeyboard-config/rules/bin/mln_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/mln_s.sh @@ -1,20 +1,10 @@ -#!/bin/sh
+@echo off
+set variant=%1
-variant=$1
+set OUTFILE=base.ml%variant%_s.part
-INDIR=$2
-OUTFILE=base.ml${variant}_s.part
+if exist %OUTFILE% del %OUTFILE%
-> $OUTFILE
+echo "{ if (index($2, """(""") == 0) { printf """ * %%s = +%%s%%%%(v[%variant%]):%variant%\n""", $1, $2; } else { printf """ * %%s = +%%s:%variant%\n""", $1, $2; }}" < layoutsMapping.lst >> %OUTFILE%
-awk '{
- if (index($2, "(") == 0) {
- printf " * %s = +%s%%(v['${variant}']):'${variant}'\n", $1, $2;
- } else {
- printf " * %s = +%s:'${variant}'\n", $1, $2;
- }
-}' < $INDIR/layoutsMapping.lst >> $OUTFILE
-
-awk '{
- printf " * %s(%s) = +%s(%s):'${variant}'\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s(%%s) = +%%s(%%s):%variant%\n""", $1, $2, $3, $4;}" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh b/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh index 30123874b..8e252943b 100644 --- a/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh @@ -1,12 +1,8 @@ -#!/bin/sh
+@echo off
+set variant=%1
-variant=$1
+set OUTFILE=base.ml%variant%v%variant%_s.part
-INDIR=$2
-OUTFILE=base.ml${variant}v${variant}_s.part
+if exist %OUTFILE% del %OUTFILE%
-> $OUTFILE
-
-awk '{
- printf " * %s %s = +%s(%s):'${variant}'\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s %%s = +%%s(%%s):%variant%\n""", $1, $2, $3, $4;}" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh b/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh index 5b466d59c..573cb930f 100644 --- a/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh +++ b/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh @@ -1,10 +1,7 @@ -#!/bin/sh +@echo off -INDIR=$1 -OUTFILE=base.mlv_s.part +set OUTFILE=base.mlv_s.part -> $OUTFILE +if exist %OUTFILE% del %OUTFILE% -awk '{ - printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4; -}' < $INDIR/variantsMapping.lst >> $OUTFILE +gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE% diff --git a/xorg-server/xkeyboard-config/rules/compat/makefile b/xorg-server/xkeyboard-config/rules/compat/makefile new file mode 100644 index 000000000..75610a8e9 --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/compat/makefile @@ -0,0 +1,53 @@ +transform_files=layoutsMapping.lst variantsMapping.lst + +scripts_dir=..\bin + +SCRIPTS= \ +base.ml2_s.part \ +base.ml3_s.part \ +base.ml4_s.part \ +base.ml2v2_s.part \ +base.ml3v3_s.part \ +base.ml4v4_s.part \ +base.ml_s.part \ +base.ml1_s.part \ +base.mlv_s.part \ +base.ml1v1_s.part \ +base.ml_s.part + +SH=cmd /c + +base.ml2_s.part: mln_s.bat $(transform_files) + $(SH) $< 2 + +base.ml3_s.part: mln_s.bat $(transform_files) + $(SH) $< 3 + +base.ml4_s.part: mln_s.bat $(transform_files) + $(SH) $< 4 + +base.ml2v2_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 2 + +base.ml3v3_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 3 + +base.ml4v4_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 4 + +base.ml_s.part: ml_s.bat $(transform_files) + $(SH) $< + +base.ml1_s.part: ml1_s.bat $(transform_files) + $(SH) $< + +base.mlv_s.part: mlv_s.bat $(transform_files) + $(SH) $< + +base.ml1v1_s.part: ml1v1_s.bat $(transform_files) + $(SH) $< + +%.bat: $(scripts_dir)\%.sh + copy $< $@ + +all: $(SCRIPTS) diff --git a/xorg-server/xkeyboard-config/rules/extras/makefile b/xorg-server/xkeyboard-config/rules/extras/makefile new file mode 100644 index 000000000..2712ec269 --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/extras/makefile @@ -0,0 +1,53 @@ +transform_files=layoutsMapping.lst variantsMapping.lst + +scripts_dir=..\bin + +SCRIPTS= \ +base.ml2_s.part \ +base.ml3_s.part \ +base.ml4_s.part \ +base.ml2v2_s.part \ +base.ml3v3_s.part \ +base.ml4v4_s.part \ +base.ml_s.part \ +base.ml1_s.part \ +base.mlv_s.part \ +base.ml1v1_s.part \ +base.ml_s.part + +SH=cmd /c + +base.ml2_s.part: mln_s.bat $(transform_files) + $(SH) $< 2 + +base.ml3_s.part: mln_s.bat $(transform_files) + $(SH) $< 3 + +base.ml4_s.part: mln_s.bat $(transform_files) + $(SH) $< 4 + +base.ml2v2_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 2 + +base.ml3v3_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 3 + +base.ml4v4_s.part: mlnvn_s.bat $(transform_files) + $(SH) $< 4 + +base.ml_s.part: ml_s.bat $(transform_files) + $(SH) $< + +base.ml1_s.part: ml1_s.bat $(transform_files) + $(SH) $< + +base.mlv_s.part: mlv_s.bat $(transform_files) + $(SH) $< + +base.ml1v1_s.part: ml1v1_s.bat $(transform_files) + $(SH) $< + +%.bat: $(scripts_dir)\%.sh + copy $< $@ + +all=$(SCRIPTS) diff --git a/xorg-server/xkeyboard-config/rules/makefile b/xorg-server/xkeyboard-config/rules/makefile new file mode 100644 index 000000000..6b822c4c9 --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/makefile @@ -0,0 +1,189 @@ +ifeq ($(MAKESERVER),1) +$(error Please do not specify MAKESERVER=1) +endif + +load_makefile compat\makefile DEBUG=$(DEBUG) +load_makefile extras\makefile DEBUG=$(DEBUG) + +DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\rules + +BASE_PARTS_NO_COMPAT = base.hdr.part base.lists.part \ +compat/base.lists.part \ +HDR base.m_k.part \ +HDR base.l1_k.part \ +HDR base.l_k.part \ +HDR base.o_k.part \ +HDR base.ml_g.part \ +HDR base.m_g.part \ +HDR compat/base.mlv_s.part extras/base.mlv_s.part base.mlv_s.part \ +HDR compat/base.ml_s.part extras/base.ml_s.part base.ml_s.part \ +HDR compat/base.ml1_s.part extras/base.ml1_s.part base.ml1_s.part \ +HDR compat/base.ml1v1_s.part extras/base.ml1v1_s.part \ +HDR compat/base.ml2_s.part extras/base.ml2_s.part base.ml2_s.part \ +HDR compat/base.ml3_s.part extras/base.ml3_s.part base.ml3_s.part \ +HDR compat/base.ml4_s.part extras/base.ml4_s.part base.ml4_s.part \ +HDR compat/base.ml2v2_s.part extras/base.ml2v2_s.part \ +HDR compat/base.ml3v3_s.part extras/base.ml3v3_s.part \ +HDR compat/base.ml4v4_s.part extras/base.ml4v4_s.part \ +HDR base.m_s.part \ +HDR compat/base.lv_c.part \ +HDR compat/base.l1v1_c.part \ +HDR compat/base.l2v2_c.part \ +HDR compat/base.l3v3_c.part \ +HDR compat/base.l4v4_c.part \ +HDR base.ml_c.part \ +HDR base.ml1_c.part \ +HDR base.m_t.part \ +HDR base.lo_s.part \ +HDR base.l1o_s.part \ +HDR base.l2o_s.part \ +HDR base.l3o_s.part \ +HDR base.l4o_s.part \ +HDR compat/base.o_s.part base.o_s.part \ +HDR base.o_c.part \ +HDR base.o_t.part + +EVDEV_PARTS_NO_COMPAT = base.hdr.part base.lists.part \ +compat/base.lists.part \ +HDR evdev.m_k.part \ +HDR base.l1_k.part \ +HDR base.l_k.part \ +HDR base.o_k.part \ +HDR base.ml_g.part \ +HDR base.m_g.part \ +HDR compat/base.mlv_s.part extras/base.mlv_s.part base.mlv_s.part \ +HDR compat/base.ml_s.part extras/base.ml_s.part base.ml_s.part \ +HDR compat/base.ml1_s.part extras/base.ml1_s.part base.ml1_s.part \ +HDR compat/base.ml1v1_s.part extras/base.ml1v1_s.part \ +HDR compat/base.ml2_s.part extras/base.ml2_s.part base.ml2_s.part \ +HDR compat/base.ml3_s.part extras/base.ml3_s.part base.ml3_s.part \ +HDR compat/base.ml4_s.part extras/base.ml4_s.part base.ml4_s.part \ +HDR compat/base.ml2v2_s.part extras/base.ml2v2_s.part \ +HDR compat/base.ml3v3_s.part extras/base.ml3v3_s.part \ +HDR compat/base.ml4v4_s.part extras/base.ml4v4_s.part \ +HDR evdev.m_s.part \ +HDR compat/base.lv_c.part \ +HDR compat/base.l1v1_c.part \ +HDR compat/base.l2v2_c.part \ +HDR compat/base.l3v3_c.part \ +HDR compat/base.l4v4_c.part \ +HDR base.ml_c.part \ +HDR base.ml1_c.part \ +HDR base.m_t.part \ +HDR base.lo_s.part \ +HDR base.l1o_s.part \ +HDR base.l2o_s.part \ +HDR base.l3o_s.part \ +HDR base.l4o_s.part \ +HDR compat/base.o_s.part base.o_s.part \ +HDR base.o_c.part \ +HDR base.o_t.part + +BASE_PARTS = base.hdr.part base.lists.part \ +HDR base.m_k.part \ +HDR base.l1_k.part \ +HDR base.l_k.part \ +HDR \ +HDR base.ml_g.part \ +HDR base.m_g.part \ +HDR extras/base.mlv_s.part base.mlv_s.part \ +HDR extras/base.ml_s.part base.ml_s.part \ +HDR extras/base.ml1_s.part base.ml1_s.part \ +HDR extras/base.ml1v1_s.part \ +HDR extras/base.ml2_s.part base.ml2_s.part \ +HDR extras/base.ml3_s.part base.ml3_s.part \ +HDR extras/base.ml4_s.part base.ml4_s.part \ +HDR extras/base.ml2v2_s.part \ +HDR extras/base.ml3v3_s.part \ +HDR extras/base.ml4v4_s.part \ +HDR base.m_s.part \ +HDR \ +HDR \ +HDR \ +HDR \ +HDR \ +HDR base.ml_c.part \ +HDR base.ml1_c.part \ +HDR base.m_t.part \ +HDR \ +HDR base.l1o_s.part \ +HDR base.l2o_s.part \ +HDR base.l3o_s.part \ +HDR base.l4o_s.part \ +HDR base.o_s.part \ +HDR base.o_c.part \ +HDR base.o_t.part + +EVDEV_PARTS = base.hdr.part base.lists.part \ +HDR evdev.m_k.part \ +HDR base.l1_k.part \ +HDR base.l_k.part \ +HDR \ +HDR base.ml_g.part \ +HDR base.m_g.part \ +HDR extras/base.mlv_s.part base.mlv_s.part \ +HDR extras/base.ml_s.part base.ml_s.part \ +HDR extras/base.ml1_s.part base.ml1_s.part \ +HDR extras/base.ml1v1_s.part \ +HDR extras/base.ml2_s.part base.ml2_s.part \ +HDR extras/base.ml3_s.part base.ml3_s.part \ +HDR extras/base.ml4_s.part base.ml4_s.part \ +HDR extras/base.ml2v2_s.part \ +HDR extras/base.ml3v3_s.part \ +HDR extras/base.ml4v4_s.part \ +HDR evdev.m_s.part \ +HDR \ +HDR \ +HDR \ +HDR \ +HDR \ +HDR base.ml_c.part \ +HDR base.ml1_c.part \ +HDR base.m_t.part \ +HDR \ +HDR base.l1o_s.part \ +HDR base.l2o_s.part \ +HDR base.l3o_s.part \ +HDR base.l4o_s.part \ +HDR base.o_s.part \ +HDR base.o_c.part \ +HDR base.o_t.part + +RULES_FILES = base evdev xfree98 + +LST_FILES = base.lst evdev.lst + +$(DESTDIR)\%.lst: $(DESTDIR)\%.xml + perl xml2lst.pl < $< > $@ + +$(DESTDIR)\base: compat\all $(BASE_PARTS_NO_COMPAT) + merge $@ $(BASE_PARTS) + +$(DESTDIR)\evdev: compat\all $(EVDEV_PARTS_NO_COMPAT) + merge $@ $(EVDEV_PARTS) + +ALL_RULES_FILES = $(RULES_FILES) $(LST_FILES) \ +xkb.dtd README + +COMPATFILES=xorg xorg.xml xorg.lst +$(DESTDIR)\xorg: $(DESTDIR)\base + copy $< $@ +$(DESTDIR)\xorg%: $(DESTDIR)\base% + copy $< $@ + +rules_DATA = $(ALL_RULES_FILES) $(COMPATFILES) + +xml_DATA = base.xml evdev.xml base.extras.xml evdev.extras.xml + +$(DESTDIR)\%.xml: %.xml.in + copy $< $@ + +$(DESTDIR)\evdev.xml: base.xml.in + copy $< $@ + +$(DESTDIR)\evdev.extras.xml: base.extras.xml.in + copy $< $@ + +DATA_FILES=$(rules_DATA:%=$(DESTDIR)\%) $(xml_DATA:%=$(DESTDIR)\%) + +include ..\xkbrules.mak diff --git a/xorg-server/xkeyboard-config/rules/merge.py b/xorg-server/xkeyboard-config/rules/merge.py new file mode 100644 index 000000000..442a866f2 --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/merge.py @@ -0,0 +1,13 @@ +import sys + +pOUT=open(sys.argv[1],"wb") +pHDR=open("HDR","r") +for item in sys.argv[2:]: + if item == 'HDR': + pOUT.write("\n") + pOUT.write(pHDR.readline()) + else: + pOUT.write(open(item,"rb").read()) + +pOUT.close() + |