Skip to content
Browse files

Use regular module to build wpa_supplicant.conf

Now PRODUCT_COPY_FILES is not allowed in module makefiles.
Bug: 3003508

Change-Id: I55d641c470858de87097f1af3531df0e8e3ca5b1
  • Loading branch information...
1 parent a8b5ba4 commit f56257d1cd63de66b500c6b08211c8775b7e449d Ying Wang committed Sep 24, 2010
Showing with 13 additions and 6 deletions.
  1. +13 −6 wpa_supplicant_conf.mk
View
19 wpa_supplicant_conf.mk
@@ -22,16 +22,23 @@ LOCAL_PATH := $(call my-dir)
########################
-WPA_SUPPLICANT_CONF_GENERATED := $(call intermediates-dir-for,ETC,wpa_supplicant.conf)/wpa_supplicant.conf
+LOCAL_MODULE := wpa_supplicant.conf
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant.conf
WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh
-$(WPA_SUPPLICANT_CONF_GENERATED): $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT)
+$(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE)
+$(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE)
+$(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT)
+$(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT)
@echo Target wpa_supplicant.conf: $@
@mkdir -p $(dir $@)
- $(hide) WIFI_DRIVER_SOCKET_IFACE="$(WIFI_DRIVER_SOCKET_IFACE)" \
- bash $(WPA_SUPPLICANT_CONF_SCRIPT) $(WPA_SUPPLICANT_CONF_TEMPLATE) > $@
-
-PRODUCT_COPY_FILES += $(WPA_SUPPLICANT_CONF_GENERATED):system/etc/wifi/wpa_supplicant.conf
+ $(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \
+ bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@
########################

0 comments on commit f56257d

Please sign in to comment.
Something went wrong with that request. Please try again.