From eb1c4db03967f28efd280ecb869009e9fe9c9dab Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 13 Jan 2009 03:21:25 +0000 Subject: add support for an optional staging directory for debug binaries SVN-Revision: 14018 --- include/package-debug.mk | 26 ++++++++++++++++++++++++++ include/package.mk | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 include/package-debug.mk (limited to 'include') diff --git a/include/package-debug.mk b/include/package-debug.mk new file mode 100644 index 0000000000..2a85bfebb8 --- /dev/null +++ b/include/package-debug.mk @@ -0,0 +1,26 @@ +# +# Copyright (C) 2006,2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(DUMP),) + define BuildTarget/debug + + DEBUG_STAMP_$(1) := $(DEBUG_DIR)/stamp/$(1) + + ifdef Package/$(1)/install + ifneq ($(CONFIG_PACKAGE_$(1))$(SDK)$(DEVELOPER),) + compile: $$(DEBUG_STAMP_$(1)) + endif + endif + + $$(DEBUG_STAMP_$(1)): $(PKG_BUILD_DIR)/.built + mkdir -p $(DEBUG_DIR)/stamp + $(call Package/$(1)/install,$(DEBUG_DIR)) + touch $$(DEBUG_STAMP_$(1)) + + + endef +endif diff --git a/include/package.mk b/include/package.mk index 4e31258305..04625d9b94 100644 --- a/include/package.mk +++ b/include/package.mk @@ -27,6 +27,7 @@ include $(INCLUDE_DIR)/quilt.mk include $(INCLUDE_DIR)/package-defaults.mk include $(INCLUDE_DIR)/package-dumpinfo.mk include $(INCLUDE_DIR)/package-ipkg.mk +include $(INCLUDE_DIR)/package-debug.mk include $(INCLUDE_DIR)/package-bin.mk include $(INCLUDE_DIR)/autotools.mk @@ -146,7 +147,7 @@ endif $(Dumpinfo), \ $(foreach target, \ $(if $(Package/$(1)/targets),$(Package/$(1)/targets), \ - $(if $(PKG_TARGETS),$(PKG_TARGETS), ipkg ) \ + $(if $(PKG_TARGETS),$(PKG_TARGETS), ipkg $(if $(CONFIG_DEBUG_DIR),debug)) \ ), $(BuildTarget/$(target)) \ ) \ ) -- cgit v1.2.3