summaryrefslogtreecommitdiff
path: root/drivers/accessibility/speakup/Makefile
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-06-12 20:22:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 16:15:55 +0300
commit6a5c94d92699b7f12f5dae32fa889d196bda3a80 (patch)
treedb44efee699af16bdc1431334b4a96bb2d183bb0 /drivers/accessibility/speakup/Makefile
parent5d40b918fdf144e9f7a1f032be1af808ce5902c1 (diff)
downloadlinux-6a5c94d92699b7f12f5dae32fa889d196bda3a80.tar.xz
speakup: Generate speakupmap.h automatically
speakupmap.h was not actually intended to be source code, speakupmap.map is. This resurrects the makemapdata.c and genmap.c tools to generate speakupmap.h automatically from the input and speakup headers, and the speakupmap.map keyboard mapping source file. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Link: https://lore.kernel.org/r/20220612172244.il3siyq7ueqnvah5@begin Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility/speakup/Makefile')
-rw-r--r--drivers/accessibility/speakup/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/accessibility/speakup/Makefile b/drivers/accessibility/speakup/Makefile
index 6e4bfac8af65..ba69b0803d42 100644
--- a/drivers/accessibility/speakup/Makefile
+++ b/drivers/accessibility/speakup/Makefile
@@ -30,3 +30,31 @@ speakup-y := \
thread.o \
varhandlers.o
speakup-$(CONFIG_SPEAKUP_SERIALIO) += serialio.o
+
+
+clean-files := mapdata.h speakupmap.h
+
+
+# Generate mapdata.h from headers
+hostprogs += makemapdata
+makemapdata-objs := makemapdata.o
+
+quiet_cmd_mkmap = MKMAP $@
+ cmd_mkmap = TOPDIR=$(srctree) $(obj)/makemapdata > $@
+
+$(obj)/mapdata.h: $(obj)/makemapdata
+ $(call cmd,mkmap)
+
+
+# Generate speakupmap.h from mapdata.h
+hostprogs += genmap
+genmap-objs := genmap.o
+$(obj)/genmap.o: $(obj)/mapdata.h
+
+quiet_cmd_genmap = GENMAP $@
+ cmd_genmap = $(obj)/genmap $< > $@
+
+$(obj)/speakupmap.h: $(src)/speakupmap.map $(obj)/genmap
+ $(call cmd,genmap)
+
+$(obj)/main.o: $(obj)/speakupmap.h