|
1 @echo off |
|
2 rem |
|
3 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 rem All rights reserved. |
|
5 rem This component and the accompanying materials are made available |
|
6 rem under the terms of "Eclipse Public License v1.0" |
|
7 rem which accompanies this distribution, and is available |
|
8 rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 rem |
|
10 rem Initial Contributors: |
|
11 rem Nokia Corporation - initial contribution. |
|
12 rem |
|
13 rem Contributors: |
|
14 rem |
|
15 rem Description: Helper utility for building by developers |
|
16 rem |
|
17 rem ------------------- |
|
18 rem Determine java root |
|
19 setlocal |
|
20 set JAVA_SRC_ROOT= |
|
21 for %%a in (. .. ..\.. ..\..\.. ..\..\..\.. ..\..\..\..\.. ..\..\..\..\..\.. ..\..\..\..\..\..\..) do if "%JAVA_SRC_ROOT%" == "" if exist %%a\build\Makefile.comp call :setroot %%a |
|
22 |
|
23 echo JAVA_SRC_ROOT=%JAVA_SRC_ROOT% |
|
24 |
|
25 rem Make sbs to flush stdout immediately |
|
26 set PYTHONUNBUFFERED=True |
|
27 |
|
28 rem ------------------- |
|
29 rem Run with correct makefile |
|
30 |
|
31 for %%i in (%CD%) do set BUILDDIR=%%~nxi |
|
32 if %BUILDDIR% == build ( |
|
33 if exist *.pro ( |
|
34 make -f %JAVA_SRC_ROOT%\build\Makefile.comp %* |
|
35 ) else ( |
|
36 make -f %JAVA_SRC_ROOT%\build\Makefile.nonqt %* |
|
37 ) |
|
38 ) else if exist subsystem.mk ( |
|
39 make -f subsystem.mk %* |
|
40 ) else if exist Makefile ( |
|
41 make %* |
|
42 ) else ( |
|
43 echo Could not determine component type - please check current directory |
|
44 ) |
|
45 |
|
46 goto :EOF |
|
47 |
|
48 :setroot |
|
49 pushd %1 |
|
50 set JAVA_SRC_ROOT=%CD% |
|
51 popd |