From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 10 May 2006 18:12:16 +0000 (-0000)
Subject: add implicit rule for %.a to help debugging in subdirs
X-Git-Tag: 1_2_0~390
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6143c0719befdac69e43d878d912e6abf5cce378;p=oweals%2Fbusybox.git

add implicit rule for %.a to help debugging in subdirs
---

diff --git a/Rules.mak b/Rules.mak
index 17e136712..ff6ea32db 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -353,4 +353,12 @@ do_elf2flt         = @$(disp_elf2flt)   ; $(cmd_elf2flt)
 %.o: %.c
 	$(compile.c)
 
+uppercase = $(shell echo $1 | tr '[:lower:]' '[:upper:]')
+%.a:
+	@if test -z "$($(call uppercase,$*)_DIR)" ; then \
+		echo "Invalid target $@" ; \
+		exit 1 ; \
+	fi
+	$(Q)$(MAKE) $($(call uppercase,$*)_DIR)$@
+
 .PHONY: dummy