add implicit rule for %.a to help debugging in subdirs
authorMike Frysinger <vapier@gentoo.org>
Wed, 10 May 2006 18:12:16 +0000 (18:12 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 10 May 2006 18:12:16 +0000 (18:12 -0000)
Rules.mak

index 17e136712967bd677f8d8b8f840b979b7ec0f82d..ff6ea32db038ba32bc5f234c9baa5354bf81feab 100644 (file)
--- 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