From 61ef7083420dd3a3c8d69162b53b2dc0d8ba959b Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 12 Mar 2010 16:43:21 -0500 Subject: [PATCH] new Makefile with errorchecks for make version number and checks that $(MC1322X) exists. --- tests/Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index f544da56a..652ae8387 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -18,8 +18,25 @@ TARGETS_WITH_ROM_VARS := nvm-read nvm-write romimg flasher \ rftest-rx rftest-tx \ per -submodule: +################################################## +# you shouldn't need to edit anything below here # +################################################## + +need := 3.81 +ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) \ + $(need)))) + +ifdef $(need) +$(error You need to use version 3.81 of Make or later) +endif + +# this rule will become the default_goal if +# $(MC1322X)/Makefile.include doesn't exist it will try to update the +# submodule, check if $(MC1322X) exists, and if it does +# try make again +submodule: git submodule update --init + if [ ! -d $(MC1322X) ] ; then echo "*** cannot find MC1322X directory $(MC1322X)" ; exit 2; fi $(MAKE) -include $(MC1322X)/Makefile.include