Commit 70545e8f authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Provide shipped versions of the keymap files

The keyboard maps are generated from appropriate .map files by running
loadkeys --mktable. However, there are two reasons to provide shipped
versions and use those by default

1) Not everybody has loadkeys installed.
2) As pointed out by Andries Brouwer, if changes to the tables occur in
   the kernel tree, that may require a new/recompiled version of loadkeys,
   so that the version of loadkeys required for the kernel build is
   often ahead of the installed base.

For these reasons, we provide shipped versions of the generated files and
use them unless the user explicitly asks for regenerating by uncommenting
the appropriate line in the Makefile.
 
parent 6e529b03
...@@ -20,5 +20,14 @@ obj-y += $(obj-$(MACHINE)) ...@@ -20,5 +20,14 @@ obj-y += $(obj-$(MACHINE))
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
$(obj)/%.c: $(src)/%.map # Uncomment if you're changing the keymap and have an appropriate
loadkeys --mktable $< > $@ # loadkeys version for the map. By default, we'll use the shipped
# versions.
# GENERATE_KEYMAP := 1
ifdef GENERATE_KEYMAP
$(obj)/defkeymap-acorn.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@
endif
...@@ -219,8 +219,16 @@ include $(TOPDIR)/Rules.make ...@@ -219,8 +219,16 @@ include $(TOPDIR)/Rules.make
$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash
$(obj)/conmakehash $< > $@ $(obj)/conmakehash $< > $@
$(obj)/defkeymap.c: $(src)/defkeymap.map # Uncomment if you're changing the keymap and have an appropriate
set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ # loadkeys version for the map. By default, we'll use the shipped
# versions.
# GENERATE_KEYMAP := 1
$(obj)/qtronixmap.c: $(src)/qtronixmap.map ifdef GENERATE_KEYMAP
set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
$(obj)/defkeymap.c $(obj)/qtronixmap.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@.tmp
sed -e 's/^static *//' $@.tmp > $@
rm $@.tmp
endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -15,5 +15,14 @@ obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o ...@@ -15,5 +15,14 @@ obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
$(obj)/lk201-map.c: $(src)/lk201-map.map # Uncomment if you're changing the keymap and have an appropriate
loadkeys --mktable $< > $@ # loadkeys version for the map. By default, we'll use the shipped
# versions.
# GENERATE_KEYMAP := 1
ifdef GENERATE_KEYMAP
$(obj)/lk201-map.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@
endif
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment