[gtksourceview/gnome-3-20] MSVC builds: Sync common NMake Makefiles for introspection
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/gnome-3-20] MSVC builds: Sync common NMake Makefiles for introspection
- Date: Sat, 23 Apr 2016 11:07:10 +0000 (UTC)
commit 826d9651fbf26ecb67b2881bc38bbdc826ae6cd0
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Apr 11 14:56:33 2016 +0800
MSVC builds: Sync common NMake Makefiles for introspection
...with the ones in gobject-introspection, so that builds can be a bit more
flexible.
build/win32/detectenv-msvc.mak | 4 ++--
build/win32/introspection-msvc.mak | 25 +++++++++++++++++++++++--
2 files changed, 25 insertions(+), 4 deletions(-)
---
diff --git a/build/win32/detectenv-msvc.mak b/build/win32/detectenv-msvc.mak
index c23e444..61f979d 100644
--- a/build/win32/detectenv-msvc.mak
+++ b/build/win32/detectenv-msvc.mak
@@ -55,7 +55,7 @@ version is not supported.
!endif
VALID_CFGSET = FALSE
-!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
VALID_CFGSET = TRUE
!endif
@@ -63,7 +63,7 @@ VALID_CFGSET = TRUE
# using .pdb files for release builds
CFLAGS_BASE = /Zi
-!if "$(CFG)" == "release"
+!if "$(CFG)" == "release" || "$(CFG)" == "Release"
CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE)
!else
CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE)
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
index d32f7cf..8739844 100644
--- a/build/win32/introspection-msvc.mak
+++ b/build/win32/introspection-msvc.mak
@@ -11,6 +11,21 @@
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
!endif
+!if ![setlocal] && \
+ ![set PFX=$(PREFIX)] && \
+ ![for %P in (%PFX%) do @echo PREFIX_FULL=%~dpnfP > pfx.x]
+!endif
+!include pfx.x
+
+!if "$(PKG_CONFIG_PATH)" == ""
+PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig
+!else
+PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH)
+!endif
+
+!if ![del $(ERRNUL) /q/f pfx.x]
+!endif
+
# Note: The PYTHON must be the Python release series that was used to build
# the GObject-introspection scanner Python module!
# Either having python.exe your PATH will work or passing in
@@ -22,6 +37,11 @@ PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
PYTHON=python
!endif
+# Path to the pkg-config tool, if not already in the PATH
+!if "$(PKG_CONFIG)" == ""
+PKG_CONFIG=pkg-config
+!endif
+
# Don't change anything following this line!
GIR_SUBDIR = share\gir-1.0
@@ -40,7 +60,8 @@ ERROR_MSG =
BUILD_INTROSPECTION = TRUE
-!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
+!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \
+ && ![$(PKG_CONFIG) --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
&& ![setlocal] \
&& ![set file="pkgconfig.x"] \
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
@@ -58,7 +79,7 @@ VALID_PKG_CONFIG_PATH = FALSE
!endif
VALID_CFGSET = FALSE
-!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
VALID_CFGSET = TRUE
!endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]