Commit 6126f86b authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild/eisa: Makefile update

- Nice output when generating devlist.h
- Defer DEVICE_NAME_SIZE assignment until needed
No funtional changes
parent b7e9bd24
...@@ -10,15 +10,15 @@ obj-${CONFIG_EISA_PCI_EISA} += pci_eisa.o ...@@ -10,15 +10,15 @@ obj-${CONFIG_EISA_PCI_EISA} += pci_eisa.o
# so leave it at the end of the list. # so leave it at the end of the list.
obj-${CONFIG_EISA_VIRTUAL_ROOT} += virtual_root.o obj-${CONFIG_EISA_VIRTUAL_ROOT} += virtual_root.o
clean-files:= devlist.h
# Ugly hack to get DEVICE_NAME_SIZE value... # Ugly hack to get DEVICE_NAME_SIZE value...
DEVICE_NAME_SIZE:=$(shell awk '$$1=="\#define" && $$2=="DEVICE_NAME_SIZE" {print $$3-1}' $(srctree)/include/linux/device.h) DEVICE_NAME_SIZE =$(shell awk '$$1=="\#define" && $$2=="DEVICE_NAME_SIZE" {print $$3-1}' $(srctree)/include/linux/device.h)
$(obj)/eisa-bus.o: $(obj)/devlist.h $(obj)/eisa-bus.o: $(obj)/devlist.h
$(obj)/devlist.h: $(src)/eisa.ids $(srctree)/include/linux/device.h quiet_cmd_eisaid = GEN $@
sed -e '/^#/D' -e 's/^\([[:alnum:]]\{7\}\) \+"\([^"]\{1,$(DEVICE_NAME_SIZE)\}\).*"/EISA_DEVINFO ("\1", "\2"),/' $< > $@ cmd_eisaid = sed -e '/^\#/D' -e 's/^\([[:alnum:]]\{7\}\) \+"\([^"]\{1,$(DEVICE_NAME_SIZE)\}\).*"/EISA_DEVINFO ("\1", "\2"),/' $< > $@
$(src)/eisa.ids: clean-files := devlist.h
touch $@ $(obj)/devlist.h: $(src)/eisa.ids include/linux/device.h
$(call cmd,eisaid)
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