Commit 7fbe6bfe authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Fix warnings and other buglets

o Add a + to $(MAKEBOOT), so that make knows that it's a recursive make
  invocation.
o For files which are generated like .map -> .c -> .o,
  add an explicit dependency for .c -> .o.
  Otherwise, make sees the .c as an intermediate object and removes it,
  causing an unnecessary recompilation at next invocation.
parent 2503de43
...@@ -102,7 +102,7 @@ SUBDIRS += arch/i386/pci ...@@ -102,7 +102,7 @@ SUBDIRS += arch/i386/pci
DRIVERS += arch/i386/pci/pci.o DRIVERS += arch/i386/pci/pci.o
endif endif
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot MAKEBOOT = +$(MAKE) -C arch/$(ARCH)/boot
vmlinux: arch/i386/vmlinux.lds vmlinux: arch/i386/vmlinux.lds
......
...@@ -20,6 +20,8 @@ obj-y += $(obj-$(MACHINE)) ...@@ -20,6 +20,8 @@ obj-y += $(obj-$(MACHINE))
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
$(obj)/defkeymap-acorn.o: $(obj)/defkeymap-acorn.c
# Uncomment if you're changing the keymap and have an appropriate # Uncomment if you're changing the keymap and have an appropriate
# loadkeys version for the map. By default, we'll use the shipped # loadkeys version for the map. By default, we'll use the shipped
# versions. # versions.
...@@ -28,6 +30,6 @@ include $(TOPDIR)/Rules.make ...@@ -28,6 +30,6 @@ include $(TOPDIR)/Rules.make
ifdef GENERATE_KEYMAP ifdef GENERATE_KEYMAP
$(obj)/defkeymap-acorn.c: $(obj)/%.c: $(src)/%.map $(obj)/defkeymap-acorn.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@ loadkeys --mktable $< > $@
endif endif
...@@ -219,6 +219,10 @@ include $(TOPDIR)/Rules.make ...@@ -219,6 +219,10 @@ 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.o: $(obj)/defkeymap.c
$(obj)/qtronixmap.o: $(obj)/qtronixmap.c
# Uncomment if you're changing the keymap and have an appropriate # Uncomment if you're changing the keymap and have an appropriate
# loadkeys version for the map. By default, we'll use the shipped # loadkeys version for the map. By default, we'll use the shipped
# versions. # versions.
...@@ -227,7 +231,7 @@ $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash ...@@ -227,7 +231,7 @@ $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash
ifdef GENERATE_KEYMAP ifdef GENERATE_KEYMAP
$(obj)/defkeymap.c $(obj)/qtronixmap.c: $(obj)/%.c: $(src)/%.map $(obj)/defkeymap.c $(obj)/qtronixmap.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@.tmp loadkeys --mktable $< > $@.tmp
sed -e 's/^static *//' $@.tmp > $@ sed -e 's/^static *//' $@.tmp > $@
rm $@.tmp rm $@.tmp
......
...@@ -15,6 +15,8 @@ obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o ...@@ -15,6 +15,8 @@ obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
$(obj)/lk201-map.o: $(obj)/lk201-map.c
# Uncomment if you're changing the keymap and have an appropriate # Uncomment if you're changing the keymap and have an appropriate
# loadkeys version for the map. By default, we'll use the shipped # loadkeys version for the map. By default, we'll use the shipped
# versions. # versions.
...@@ -23,6 +25,6 @@ include $(TOPDIR)/Rules.make ...@@ -23,6 +25,6 @@ include $(TOPDIR)/Rules.make
ifdef GENERATE_KEYMAP ifdef GENERATE_KEYMAP
$(obj)/lk201-map.c: $(obj)/%.c: $(src)/%.map $(obj)/lk201-map.c: $(obj)/%.c: $(src)/%.map
$(LOADKEYS) --mktable $< > $@ loadkeys --mktable $< > $@
endif endif
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