Blame win32/introspection-msvc.mak

Packit 874993
# Common NMake Makefile module for checking the build environment is sane
Packit 874993
# for building introspection files under MSVC/NMake.
Packit 874993
# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
Packit 874993
# that support MSVC builds and introspection under MSVC.
Packit 874993
Packit 874993
# Can override with env vars as needed
Packit 874993
# You will need to have built gobject-introspection for this to work.
Packit 874993
# Change or pass in or set the following to suit your environment
Packit 874993
Packit 874993
!if "$(PREFIX)" == ""
Packit 874993
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
Packit 874993
!endif
Packit 874993
Packit 874993
# Note: The PYTHON must be the Python release series that was used to build
Packit 874993
# the GObject-introspection scanner Python module!
Packit 874993
# Either having python.exe your PATH will work or passing in
Packit 874993
# PYTHON=<full path to your Python interpretor> will do
Packit 874993
Packit 874993
# This is required, and gobject-introspection needs to be built
Packit 874993
# before this can be successfully run.
Packit 874993
!if "$(PYTHON)" == ""
Packit 874993
PYTHON=python
Packit 874993
!endif
Packit 874993
Packit 874993
# Don't change anything following this line!
Packit 874993
Packit 874993
GIR_SUBDIR = share\gir-1.0
Packit 874993
GIR_TYPELIBDIR = lib\girepository-1.0
Packit 874993
G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
Packit 874993
G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
Packit 874993
G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
Packit 874993
G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)
Packit 874993
Packit 874993
VALID_PKG_CONFIG_PATH = FALSE
Packit 874993
Packit 874993
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
Packit 874993
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
Packit 874993
Packit 874993
ERROR_MSG =
Packit 874993
Packit 874993
BUILD_INTROSPECTION = TRUE
Packit 874993
Packit 874993
!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x]	\
Packit 874993
	&& ![setlocal]	\
Packit 874993
	&& ![set file="pkgconfig.x"]	\
Packit 874993
	&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize]	\
Packit 874993
	&& ![del $(ERRNUL) /q/f pkgconfig.x]
Packit 874993
!endif
Packit 874993
Packit 874993
!include pkgconfig.chksize
Packit 874993
!if "$(PKG_CHECK_SIZE)" == "0"
Packit 874993
VALID_PKG_CONFIG_PATH = TRUE
Packit 874993
!else
Packit 874993
VALID_PKG_CONFIG_PATH = FALSE
Packit 874993
!endif
Packit 874993
Packit 874993
!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
Packit 874993
!endif
Packit 874993
Packit 874993
VALID_CFGSET = FALSE
Packit 874993
!if "$(CFG)" == "release" || "$(CFG)" == "debug"
Packit 874993
VALID_CFGSET = TRUE
Packit 874993
!endif
Packit 874993
Packit 874993
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
Packit 874993
BUILD_INTROSPECTION = FALSE
Packit 874993
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
Packit 874993
!endif
Packit 874993
Packit 874993
!if "$(VALID_CFGSET)" != "TRUE"
Packit 874993
BUILD_INTROSPECTION = FALSE
Packit 874993
ERROR_MSG = $(MSG_INVALID_CFG)
Packit 874993
!endif