File: introspection-msvc.mak

package info (click to toggle)
gjs 1.58.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,140 kB
  • sloc: cpp: 24,189; sh: 4,931; ansic: 573; makefile: 206; xml: 75
file content (73 lines) | stat: -rw-r--r-- 2,249 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Common NMake Makefile module for checking the build environment is sane
# for building introspection files under MSVC/NMake.
# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
# that support MSVC builds and introspection under MSVC.

# Can override with env vars as needed
# You will need to have built gobject-introspection for this to work.
# Change or pass in or set the following to suit your environment

!if "$(PREFIX)" == ""
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
!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
# PYTHON=<full path to your Python interpreter> will do

# This is required, and gobject-introspection needs to be built
# before this can be successfully run.
!if "$(PYTHON)" == ""
PYTHON=python
!endif

# Don't change anything following this line!

GIR_SUBDIR = share\gir-1.0
GIR_TYPELIBDIR = lib\girepository-1.0
G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)

VALID_PKG_CONFIG_PATH = FALSE

MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files

ERROR_MSG =

BUILD_INTROSPECTION = TRUE

!if ![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]	\
	&& ![del $(ERRNUL) /q/f pkgconfig.x]
!endif

!include pkgconfig.chksize
!if "$(PKG_CHECK_SIZE)" == "0"
VALID_PKG_CONFIG_PATH = TRUE
!else
VALID_PKG_CONFIG_PATH = FALSE
!endif

!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
!endif

VALID_CFGSET = FALSE
!if "$(CFG)" == "release" || "$(CFG)" == "Release" || "$(CFG)" == "debug" || "$(CFG)" == "Debug"
VALID_CFGSET = TRUE
!endif

!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
BUILD_INTROSPECTION = FALSE
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
!endif

!if "$(VALID_CFGSET)" != "TRUE"
BUILD_INTROSPECTION = FALSE
ERROR_MSG = $(MSG_INVALID_CFG)
!endif