new Makefile with errorchecks for make version number and checks that

$(MC1322X) exists.
This commit is contained in:
Mariano Alvira 2010-03-12 16:43:21 -05:00
parent 0c0f1ab7ca
commit 61ef708342

View File

@ -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