Quellcode durchsuchen

[build] Allow extra objects to be included in an all-drivers build

The build system allows for additional drivers (or other objects) to
be specified using build targets such as

  make bin/intel--realtek.usb
  make bin/8086100e--8086100f.mrom

This currently fails if the base target is the "bin/ipxe.*" all-drivers
target, e.g.

  make bin/ipxe--acm.usb

Fix the build target parsing logic to allow additional drivers (or
other objects) to be included on top of the base all-drivers target.

This can be used to include USB network card drivers, which are not
yet included by default in the all-drivers build.

Reported-by: Andrew Sloma <asloma@lenovo.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown vor 8 Jahren
Ursprung
Commit
91dd5524b7
1 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 5
    5
      src/Makefile.housekeeping

+ 5
- 5
src/Makefile.housekeeping Datei anzeigen

@@ -960,13 +960,13 @@ DRIVERS_ipxe	= $(DRIVERS_net) $(DRIVERS_infiniband) \
960 960
 # TGT_DRIVERS  : the driver for each element (e.g. "rtl8139 prism2_pci")
961 961
 # TGT_ROM_NAME : the ROM name (e.g. "dfe538")
962 962
 #
963
-CARD_DRIVER	= $(firstword $(DRIVER_$(1)) $(1))
964 963
 TGT_ELEMENTS	= $(subst --, ,$(firstword $(subst ., ,$(notdir $@))))
965 964
 TGT_ROM_NAME	= $(firstword $(TGT_ELEMENTS))
966
-TGT_DRIVERS	= $(strip $(if $(DRIVERS_$(TGT_ROM_NAME)), \
967
-			       $(DRIVERS_$(TGT_ROM_NAME)), \
968
-			       $(foreach TGT_ELEMENT,$(TGT_ELEMENTS), \
969
-			         $(call CARD_DRIVER,$(TGT_ELEMENT))) ))
965
+TGT_DRIVERS	= $(strip $(foreach TGT_ELEMENT,$(TGT_ELEMENTS), \
966
+				    $(if $(DRIVERS_$(TGT_ELEMENT)), \
967
+					 $(DRIVERS_$(TGT_ELEMENT)), \
968
+					 $(firstword $(DRIVER_$(TGT_ELEMENT)) \
969
+						     $(TGT_ELEMENT)))))
970 970
 TGT_PREFIX_NAME	= $(word 2,$(subst ., ,$(notdir $@)))
971 971
 TGT_PREFIX	= $(strip $(if $(filter rom,$(TGT_PREFIX_NAME)), \
972 972
 			       $(ROM_TYPE_$(TGT_ROM_NAME))rom, \

Laden…
Abbrechen
Speichern