From 52b3d184ce098c773c8faaa8d91ba1eeb37b0a1f Mon Sep 17 00:00:00 2001 From: "henryk@ploetzli.ch" Date: Mon, 31 Aug 2009 03:12:45 +0000 Subject: [PATCH] Have the Windows batch files check for make --- Makefile | 6 ++++-- cockpit/1makearm.bat | 3 +++ cockpit/2makeboot.bat | 3 +++ cockpit/_checkmake.bat | 14 ++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 cockpit/_checkmake.bat diff --git a/Makefile b/Makefile index 2c95cc145..458ad7ab0 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,12 @@ all clean: %: $(MAKE) -C armsrc $@ $(MAKE) -C $(HOST_BINARY) $@ -.PHONY: all clean help +.PHONY: all clean help _test help: @echo Multi-OS Makefile, you are running on $(DETECTED_OS) @echo Possible targets: @echo + all - Make bootrom, armsrc and the OS-specific host directory @echo + clean - Clean in bootrom, armsrc and the OS-specific host directory - \ No newline at end of file + +# Dummy target to test for GNU make availability +_test: diff --git a/cockpit/1makearm.bat b/cockpit/1makearm.bat index d925fd3c6..8efdd5561 100644 --- a/cockpit/1makearm.bat +++ b/cockpit/1makearm.bat @@ -1,5 +1,8 @@ @echo off +call _checkmake +IF %MAKE_FAILED%==1 GOTO end cd ..\armsrc rem make clean make cd ..\cockpit +:end diff --git a/cockpit/2makeboot.bat b/cockpit/2makeboot.bat index 4258d9bb3..aa8161e9d 100644 --- a/cockpit/2makeboot.bat +++ b/cockpit/2makeboot.bat @@ -1,5 +1,8 @@ @echo off +call _checkmake +IF %MAKE_FAILED%==1 GOTO end cd ..\bootrom rem make clean make cd ..\cockpit +:end diff --git a/cockpit/_checkmake.bat b/cockpit/_checkmake.bat new file mode 100644 index 000000000..fabb72e6d --- /dev/null +++ b/cockpit/_checkmake.bat @@ -0,0 +1,14 @@ +@echo off +make -C .. -s _test +IF ERRORLEVEL 1 GOTO fail +SET MAKE_FAILED=0 +GOTO end +:fail +echo ************************************************ +echo * A compatible (GNU) make was not detected * +echo * Please get an updated version of the Windows * +echo * compile environment, or install GNU make * +echo * manually * +echo ************************************************ +SET MAKE_FAILED=1 +:end