-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.am
181 lines (140 loc) · 4.46 KB
/
Makefile.am
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
include $(top_srcdir)/autotools/Makefile.am.common
xml2txt_stylesheet= $(abs_srcdir)/docs/docbook2txt.xsl
xml2txt_command= $(AM_V_GEN)if test -x $(XSLTPROC) ; then : ; else \
echo ' *WARN libxslt-1.0.19 or later is required to generate $@' ; \
touch $@ ; \
exit 0 ; \
fi ; \
$(XSLTPROC) --novalid -o $@ $(xml2txt_stylesheet)
hicolor_snapshot= autotools/hicolor-snapshot-0.11.tar.bz2
minitheme_snapshot= autotools/minitheme-snapshot.tar.bz2
ACLOCAL_AMFLAGS= -I autotools
ADG_DIST_CONFIGURE_FLAGS= --enable-pango \
--with-gtk=gtk3 \
--enable-gtk-doc \
--enable-gtk-doc-html
AM_DISTCHECK_CONFIGURE_FLAGS= $(ADG_DIST_CONFIGURE_FLAGS) \
--enable-test-framework \
--enable-introspection \
--with-glade-catalogdir \
--with-girdir='$$(datadir)/gir-1.0' \
--with-typelibdir='$$(libdir)/girepository-1.0'
BUILT_SOURCES= ChangeLog \
README \
NEWS \
TODO \
CONTRIBUTING \
HACKING
EXTRA_DIST= COPYING \
ChangeLog-0.2.1 \
INSTALL \
THANKS \
adg.doap \
autotools/config.rpath \
autotools/build-win \
autotools/adg.nsi \
autotools/adg-header.bmp \
autotools/adg-welcome.bmp \
autotools/adg.ico \
autotools/gschemas.compiled \
autotools/settings.ini \
$(hicolor_snapshot) \
$(minitheme_snapshot) \
autotools/minitheme-snapshot.tar.bz2 \
$(BUILT_SOURCES)
CLEANFILES= test-report.xml \
test-report.html \
perf-report.xml \
perf-report.html \
full-report.xml \
full-report.html
SUBDIRS= src
if HAVE_GTK
SUBDIRS+= demo
endif
SUBDIRS+= po \
docs
if OS_WINDOWS
INSTALLER=adg-$(PACKAGE_VERSION)-win$(PACKAGE_ARCH).exe
installer: $(INSTALLER)
_host:
mkdir _host
# The installer needs the docs but the MinGW toolchain does not have
# gtk-doc installed. Issue #148: http://dev.entidi.com/p/adg/issues/148/
_host/docs/adg/adg.pdf: _host $(srcdir)/configure
cd _host ; \
$(abs_srcdir)/configure \
$(ADG_DIST_CONFIGURE_FLAGS) \
--prefix= \
--disable-dependency-tracking \
--disable-fast-install \
--disable-nls \
--disable-introspection \
--disable-test-framework \
--without-glade-catalogdir \
--enable-gtk-doc-pdf && \
$(MAKE) -j ; \
cd ..
_host/hicolor: _host $(srcdir)/$(hicolor_snapshot)
cd _host ; \
$(BZIP2) -dc $(abs_srcdir)/$(hicolor_snapshot) | $(TAR) xf - ; \
cd ..
_host/minitheme: _host $(srcdir)/$(minitheme_snapshot)
cd _host ; \
$(BZIP2) -dc $(abs_srcdir)/$(minitheme_snapshot) | $(TAR) xf - ; \
cd ..
$(INSTALLER): _host/docs/adg/adg.pdf _host/hicolor _host/minitheme $(srcdir)/autotools/adg.nsi
$(MAKENSIS) -NOCD $(srcdir)/autotools/adg.nsi
clean-installer:
-rm -fr _host
mostlyclean-installer:
-rm $(INSTALLER)
else
clean-installer:
mostlyclean-installer:
endif
coverage: src/cpml/cpml-primitive.c.gcov src/adg/adg-canvas.c.gcov
src/cpml/cpml-primitive.c.gcov:
$(MAKE) -C src/cpml $(AM_MAKEFLAGS) coverage
src/adg/adg-canvas.c.gcov:
$(MAKE) -C src/adg $(AM_MAKEFLAGS) coverage
# Compilation database, used by language servers
cdb: autotools/compile_commands.json
autotools/compile_commands.json:
$(AM_V_GEN)if test -x $(BEAR) ; then \
$(MAKE) $(AM_MAKEFLAGS) clean ; \
$(BEAR) --output $@ -- $(MAKE) $(AM_MAKEFLAGS) ; \
else \
echo ' *WARN bear is required to generate $@' ; \
exit 1 ; \
fi
clean-cdb:
-rm -f autotools/compile_commands.json
.PHONY: installer coverage database
# Creating ChangeLog files from git log:
# idea stolen from cairo/build/Makefile.am.changelog
ChangeLog:
$(AM_V_GEN)if test -d "$(abs_srcdir)/.git" ; then \
( cd "$(abs_srcdir)" && git log --stat > $@ ) ; \
else \
echo ' *WARN A git checkout is required to generate $@' ; \
touch $@ ; \
fi
# Ensure ChangeLog is up to date on dist
dist-hook:
@-rm -f $(builddir)ChangeLog ; \
make Changelog
# Autogenerated text docs
README: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/README.xml
$(xml2txt_command) $(abs_srcdir)/docs/adg/README.xml
NEWS: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/NEWS.xml
$(xml2txt_command) $(abs_srcdir)/docs/adg/NEWS.xml
TODO: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/TODO.xml
$(xml2txt_command) $(abs_srcdir)/docs/adg/TODO.xml
CONTRIBUTING: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/CONTRIBUTING.xml
$(xml2txt_command) $(abs_srcdir)/docs/adg/CONTRIBUTING.xml
HACKING: $(xml2txt_stylesheet) $(abs_srcdir)/docs/adg/HACKING.xml
$(xml2txt_command) $(abs_srcdir)/docs/adg/HACKING.xml
clean-local: clean-installer clean-cdb
mostlyclean-local: mostlyclean-installer
-rm -f *.gcno