From f57610dc787fcf05c02bcc5c07244c8c726df949 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 4 Apr 2013 23:57:43 +0300 Subject: [PATCH] tools: Makefile and sh.cmd minor updates (mostly comments) --- Makefile | 15 +++++++++++++-- make/winx86/cmd/sh.cmd | 18 +++++++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ce21b2904..c86b21090 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,17 @@ export OPENPILOT_IS_COOL := Fuck Yeah! # Set up a default goal .DEFAULT_GOAL := help +# It is possible to set OPENPILOT_DL_DIR and/or OPENPILOT_TOOLS_DIR environment +# variables to override local tools download and installation directorys. So the +# same toolchains can be used for all working copies. Particularly useful for CI +# server build agents, but also for local installations. +# +# NOTE: paths should use forward (unix-style) slashes. +# +# If no OPENPILOT_* variables found, makefile internal DL_DIR and TOOLS_DIR paths +# will be used. They still can be overriden by the make command line parameters: +# make DL_DIR=/path/to/download/directory TOOLS_DIR=/path/to/tools/directory targets... + # Set up some macros for common directories within the tree export ROOT_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) export DL_DIR := $(if $(OPENPILOT_DL_DIR),$(OPENPILOT_DL_DIR),$(ROOT_DIR)/downloads) @@ -111,10 +122,10 @@ export VERSION_INFO := $(PYTHON) "$(ROOT_DIR)/make/scripts/version-info.py" --pa # Test if quotes are needed for the echo-command ifeq (${shell $(ECHO) "test"}, test) - export QUOTE := ' + export QUOTE := ' # This line is just to clear out the single quote above ' else - export QUOTE := + export QUOTE := endif # Include tools installers diff --git a/make/winx86/cmd/sh.cmd b/make/winx86/cmd/sh.cmd index d9e74033b..dbffc479c 100644 --- a/make/winx86/cmd/sh.cmd +++ b/make/winx86/cmd/sh.cmd @@ -15,6 +15,10 @@ rem Based on the msys.bat file from the MSYS package rem http://www.mingw.org/wiki/msys rem +rem Shared directories for toolchains +rem set OPENPILOT_DL_DIR=C:/OpenPilot/downloads +rem set OPENPILOT_TOOLS_DIR=C:/OpenPilot/tools + rem this should let run MSYS shell on x64 if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( SET COMSPEC=%WINDIR%\SysWOW64\cmd.exe @@ -53,13 +57,13 @@ rem -------------------------------------------------------------------------- set NOT_FOUND= set PATH_DIRS= -call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe -call :which QTMINGW "C:\QtSDK\mingw\bin" mingw32-make.exe -call :which QTSDK "C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin" qmake.exe -call :which CODESOURCERY "%ProgramFiles%\CodeSourcery\Sourcery G++ Lite\bin" cs-make.exe -call :which PYTHON "C:\Python27" python.exe -call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe -call :which OPENOCDBIN "C:\OpenOCD\0.4.0\bin" openocd.exe +rem Replace %ProgramFiles% by %ProgramFiles(x86)% for 64bit system +call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe +call :which QTMINGW "C:\QtSDK\mingw\bin" mingw32-make.exe +call :which QTSDK "C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin" qmake.exe +call :which ARMGCC "C:\OpenPilot\gcc-arm-none-eabi-4_6-2012q4\bin" arm-none-eabi-gcc.exe +call :which PYTHON "C:\Python27" python.exe +call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe if "%NOT_FOUND%" == "" goto set_path