Changeset 9575


Ignore:
Timestamp:
2007-11-17T15:14:16+01:00 (9 years ago)
Author:
nbd
Message:

fix hostapd rebuild check, isolate the common src/ directory for hostapd variants as well to fix compile errors when both variants are selected (#2722)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/hostapd/Makefile

    r9574 r9575  
    2121 
    2222include $(INCLUDE_DIR)/package.mk 
    23 $(eval $(call confvar,STAMP_CONFIGURED,CONFIG_PACKAGE_kmod-mac80211 CONFIG_PACKAGE_kmod-madwifi)) 
     23STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_kmod-mac80211 CONFIG_PACKAGE_kmod-madwifi CONFIG_PACKAGE_hostapd CONFIG_PACKAGE_hostapd-mini) 
    2424 
    2525define Package/hostapd/Default 
     
    7373define Build/ConfigureTarget 
    7474        rm -rf $(PKG_BUILD_DIR)/hostapd.$(1) 
    75         $(CP) $(PKG_BUILD_DIR)/hostapd $(PKG_BUILD_DIR)/hostapd.$(1) 
    76         $(CP) ./files/$(1).config $(PKG_BUILD_DIR)/hostapd.$(1)/.config 
     75        mkdir -p $(PKG_BUILD_DIR)/hostapd.$(1) 
     76        $(CP) \ 
     77                $(PKG_BUILD_DIR)/hostapd \ 
     78                $(PKG_BUILD_DIR)/src \ 
     79                $(PKG_BUILD_DIR)/hostapd.$(1)/ 
     80        $(CP) ./files/$(1).config $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/.config 
    7781        $(if $(CONFIG_PACKAGE_kmod-mac80211),,$(SED) 's,^CONFIG_DRIVER_DEVICESCAPE,#CONFIG_DRIVER_DEVICESCAPE,g' $(PKG_BUILD_DIR)/hostapd.$(1)/.config) 
    7882        $(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/hostapd.$(1)/.config) 
     
    8185define Build/CompileTarget 
    8286        CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include" \ 
    83         $(MAKE) -C $(PKG_BUILD_DIR)/hostapd.$(1) \ 
     87        $(MAKE) -C $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd \ 
    8488                $(TARGET_CONFIGURE_OPTS) \ 
    8589                LIBS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib \ 
     
    8791                        $(if $(findstring default,$(1)),-lssl -lcrypto)" \ 
    8892                hostapd hostapd_cli 
    89         $(CP) $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd_cli $(PKG_BUILD_DIR)/ 
     93        $(CP) $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/hostapd_cli $(PKG_BUILD_DIR)/ 
    9094endef 
    9195 
     
    9397        $(INSTALL_DIR) $$(1)/lib/wifi 
    9498        $(INSTALL_DATA) ./files/hostapd.sh $$(1)/lib/wifi/hostapd.sh 
     99        $(INSTALL_DIR) $$(1)/usr/sbin 
     100        $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd $$(1)/usr/sbin/ 
    95101# config is managed through uci 
    96102#       $(INSTALL_DIR) $$(1)/etc 
    97 #       $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd.conf $$(1)/etc/hostapd.conf  
    98         $(INSTALL_DIR) $$(1)/usr/sbin 
    99         $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd $$(1)/usr/sbin/ 
     103#       $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf  
    100104endef 
    101105 
  • trunk/rules.mk

    r9565 r9575  
    139139endef 
    140140 
    141 define confvar 
    142 $(1):=$$(strip $$($(1)))_ 
    143 $(foreach v,$(2), 
    144   $(1):=$$(strip $$($(1)))$(if $($(v)),y,n) 
    145 ) 
    146 endef 
     141empty:= 
     142space:= $(empty) $(empty) 
     143merge=$(subst $(space),,$(1)) 
     144confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n))) 
    147145 
    148146# file extension 
Note: See TracChangeset for help on using the changeset viewer.