build: Re-enable options for libwpa_client.so and wpa_passphrase

Commit a41a29192e ("build: Pull common fragments into a build.rules
file") introduced a regression into wpa_supplicant build process. The
build target libwpa_client.so is not built regardless of whether the
option CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because
this config option is used before it is imported from the configuration
file. Moving its use after including build.rules does not help: the
variable ALL is processed by build.rules and further changes are not
applied. Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work
as expected: wpa_passphrase is always built regardless of whether the
option is set or not.

Re-enable these options by adding both build targets to _all
dependencies.

Fixes: a41a29192e ("build: Pull common fragments into a build.rules file")
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
This commit is contained in:
Sergey Matyukevich 2022-02-22 11:52:19 +03:00 committed by Jouni Malinen
parent 08cd7a75bf
commit cb41c214b7

View file

@ -1,24 +1,29 @@
BINALL=wpa_supplicant wpa_cli BINALL=wpa_supplicant wpa_cli
ifndef CONFIG_NO_WPA_PASSPHRASE
BINALL += wpa_passphrase
endif
ALL = $(BINALL) ALL = $(BINALL)
ALL += systemd/wpa_supplicant.service ALL += systemd/wpa_supplicant.service
ALL += systemd/wpa_supplicant@.service ALL += systemd/wpa_supplicant@.service
ALL += systemd/wpa_supplicant-nl80211@.service ALL += systemd/wpa_supplicant-nl80211@.service
ALL += systemd/wpa_supplicant-wired@.service ALL += systemd/wpa_supplicant-wired@.service
ALL += dbus/fi.w1.wpa_supplicant1.service ALL += dbus/fi.w1.wpa_supplicant1.service
ifdef CONFIG_BUILD_WPA_CLIENT_SO
ALL += libwpa_client.so
endif
EXTRA_TARGETS=dynamic_eap_methods EXTRA_TARGETS=dynamic_eap_methods
CONFIG_FILE=.config CONFIG_FILE=.config
include ../src/build.rules include ../src/build.rules
ifdef CONFIG_BUILD_WPA_CLIENT_SO
# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
# being set in the config which is read by build.rules
_all: libwpa_client.so
endif
ifndef CONFIG_NO_WPA_PASSPHRASE
# add the dependency this way to allow CONFIG_NO_WPA_PASSPHRASE
# being set in the config which is read by build.rules
_all: wpa_passphrase
endif
ifdef LIBS ifdef LIBS
# If LIBS is set with some global build system defaults, clone those for # If LIBS is set with some global build system defaults, clone those for
# LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well. # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.