Revision: 93
http://runnix.svn.sourceforge.net/runnix/?rev=93&view=rev
Author: pprindeville
Date: 2010-02-01 06:11:57 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Handy make rules for testing targets and macros, etc.
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-02-01 05:28:42 UTC (rev 92)
+++ trunk/Makefile 2010-02-01 06:11:57 UTC (rev 93)
@@ -37,6 +37,13 @@
TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
#"
+$(eval x$(shell env | grep SHELL))
+ifneq ($(xSHELL),/bin/sh)
+ ifneq ($(xSHELL),/bin/bash)
+ $(error This project will only build from within a bash or sh shell.)
+ endif
+endif
+
ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
#############################################################
@@ -210,6 +217,38 @@
endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
+show_targets: var.TARGETS
+
+show_version: val.ASTVER
+
+val.%:
+ @if [ "$(origin $*)" = "undefined" ]; then \
+ echo "Undefined!" >&2 ; \
+ else \
+ echo '$($*)' ; \
+ fi
+
+var.%:
+ @if [ "$(origin $*)" = "undefined" ]; then \
+ echo "Undefined!" >&2 ; \
+ else \
+ echo '$*='"'"'$($*)'"'" ; \
+ fi
+
+exp.%:
+ @if [ "$(origin $*)" = "undefined" ]; then \
+ echo "$*: Undefined!" 1>& 2 ; \
+ else \
+ echo '$*:=$($*)' ; \
+ fi
+
+host.%:
+ @which $* >/dev/null 2>&1 ; \
+ if [ $$? != 0 ]; then \
+ echo "Host tool missing: $*" >&2 ; \
+ exit 1 ; \
+ fi
+
.PHONY: dummy subdirs release distclean clean config oldconfig \
menuconfig tags check test depend defconfig
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|