build: add missing wildcard for ignoring .pkgdir in dependency checks
[openwrt/openwrt.git] / include / package-bin.mk
1 #
2 # Copyright (C) 2007-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 ifeq ($(DUMP),)
9 define BuildTarget/bin
10 ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
11 ifdef Package/$(1)/install
12 ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
13 $(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
14 compile: install-bin-$(1)
15 else
16 compile: $(1)-disabled
17 $(1)-disabled:
18 @echo "WARNING: skipping $(1) -- package not selected" >&2
19 endif
20 endif
21 endif
22
23 $(PKG_BUILD_DIR)/.pkgdir/$(1).installed: $(STAMP_BUILT)
24 rm -rf $(PKG_BUILD_DIR)/.pkgdir/$(1) $$@
25 mkdir -p $(PKG_BUILD_DIR)/.pkgdir/$(1)
26 $(call Package/$(1)/install,$(PKG_BUILD_DIR)/.pkgdir/$(1))
27 touch $$@
28
29 install-bin-$(1): $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
30 rm -rf $(BIN_DIR)/$(1)
31 -rmdir $(PKG_BUILD_DIR)/.pkgdir/$(1) >/dev/null 2>/dev/null
32 if [ -d $(PKG_BUILD_DIR)/.pkgdir/$(1) ]; then \
33 $(INSTALL_DIR) $(BIN_DIR)/$(1) && \
34 $(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(BIN_DIR)/$(1)/; \
35 fi
36
37 clean-$(1):
38 rm -rf $(BIN_DIR)/$(1)
39
40 clean: clean-$(1)
41 .PHONY: install-bin-$(1)
42 endef
43 endif