File: gsettings-desktop-schemas-msvc.mak.in

package info (click to toggle)
gsettings-desktop-schemas 3.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,836 kB
  • ctags: 214
  • sloc: sh: 728; python: 200; ansic: 170; makefile: 103
file content (102 lines) | stat: -rw-r--r-- 3,369 bytes parent folder | download | duplicates (2)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# NMake Makefile to Generate The
# Complete gschema.xml Files, create the
# enums.xml file, and install the schemas

!include detectenv-msvc.mak

CHECK_PACKAGE=gio-2.0

# Python.exe either needs to be in your PATH or you need to pass
# in PYTHON=<full-path-to-your-Python-executable> for this to work

!IF "$(PYTHON)" == ""
PYTHON=python
!ENDIF

# Prefix of your installation.  Pass in PREFIX=<your-installation-prefix>
# if needed.  glib-compile-schemas.exe and glib-mkenums need to be found
# in $(PREFIX)\bin
!IF "$(PREFIX)" == ""
PREFIX=..\..\..\vs$(VSVER)\$(PLAT)
!ENDIF

!include introspection-msvc.mak

# The PERL interpretor is required as we need to run the glib-mkenums
# PERL script to generate the schemas from the enumerations.  It needs to
# be in your path or you need to pass in PERL=<full-path-to-your-PERL-executable>
!IF "$(PERL)" == ""
PERL=perl.exe
!ENDIF

ERRNUL  = 2>NUL
_HASH=^#

# Get the Full URI representation of the PREFIX
!if ![echo PREFIX_POSIX= ^\> uri.x] \
&& ![$(PYTHON) uri.py $(PREFIX) >> uri.x]
!include uri.x
!endif

!if ![del $(ERRNUL) /q/f uri.x]
!endif

!include ..\..\schemas\Makefile-schemas.include

!if ![@echo gschemas = ^\> schemas.files] \
&&  ![for %f in ($(desktop_gschemas_in)) do @echo.  %~nf ^\>> schemas.files]
!endif

!include schemas.files

!if ![del schemas.files]
!endif

all: $(gschemas) org.gnome.desktop.enums.xml

.SUFFIXES: .xml.in .xml

{..\..\schemas\}.xml.in{}.xml:
	$(PYTHON) genschema.py --input=$< --output=$@ --package=@GETTEXT_PACKAGE@ --prefix=$(PREFIX_POSIX)

org.gnome.desktop.enums.xml:
	$(PERL) $(PREFIX)\bin\glib-mkenums --comments "<!-- @comment@ -->"	\
	--fhead "<schemalist>"	\
	--vhead "  <@type@ id='org.gnome.desktop.@EnumName@'>"	\
	--vprod "    <value nick='@valuenick@' value='@valuenum@'/>"	\
	--vtail "  </@type@>" --ftail "</schemalist>" ..\..\headers\gdesktop-enums.h	\
	> $@

introspection: setgirbuildenv GDesktopEnums-3.0.gir GDesktopEnums-3.0.typelib

setgirbuildenv:
	@set PYTHONPATH=$(BASEDIR)\lib\gobject-introspection
	@set PATH=$(BASEDIR)\bin;$(PATH)
	@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)

!include introspection.body.mak

gsettings-desktop-schemas.pc: ..\..\gsettings-desktop-schemas.pc.in
	@echo Generating gsettings-desktop-schemas.pc...
	$(PYTHON) genpc.py --prefix=$(PREFIX) --version=@PACKAGE_VERSION@

install: $(gschemas) org.gnome.desktop.enums.xml gsettings-desktop-schemas.pc
	@-if not exist $(PREFIX)\share\glib-2.0\schemas mkdir $(PREFIX)\share\glib-2.0\schemas
	@-copy *.gschema.xml $(PREFIX)\share\glib-2.0\schemas
	@-copy org.gnome.desktop.enums.xml $(PREFIX)\share\glib-2.0\schemas
	@-if not exist $(PREFIX)\include\gsettings-desktop-schemas mkdir $(PREFIX)\include\gsettings-desktop-schemas
	@-copy ..\..\headers\gdesktop-enums.h $(PREFIX)\include\gsettings-desktop-schemas
	@-if exist *.gir @copy *.gir $(PREFIX)\share\gir-1.0
	@-if exist *.typelib @copy *.typelib $(PREFIX)\lib\girepository-1.0
	$(PREFIX)\bin\glib-compile-schemas.exe $(PREFIX)\share\glib-2.0\schemas
	@-if not exist $(PREFIX)\share\pkgconfig mkdir $(PREFIX)\share\pkgconfig
	@-copy gsettings-desktop-schemas.pc $(PREFIX)\share\pkgconfig

clean:
	@-del gsettings-desktop-schemas.pc
	@-if exist *.typelib @del *.typelib
	@-if exist *.gir @del *.gir
	@-del $(gschemas)
	@-del org.gnome.desktop.enums.xml
	@-if exist *.pyc @del *.pyc
	@-if exist __pycache__ @rmdir /s /q __pycache__