File: Makefile.am

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 (251 lines) | stat: -rw-r--r-- 7,349 bytes parent folder | download
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# http://people.gnome.org/~walters/docs/build-api.txt
.buildapi-allow-builddir:

-include $(INTROSPECTION_MAKEFILE)

bin_PROGRAMS =
lib_LTLIBRARIES =
noinst_HEADERS =
noinst_LTLIBRARIES =
noinst_DATA =
dist_gjsjs_DATA =
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
check_PROGRAMS =
check_LTLIBRARIES =
INTROSPECTION_GIRS =
## ACLOCAL_AMFLAGS can be removed for Automake 1.13
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(WARN_CFLAGS) $(CODE_COVERAGE_CFLAGS)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gjs\" $(CODE_COVERAGE_CPPFLAGS)
AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LIBS)
MAINTAINERCLEANFILES =					\
	$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL)	\
	$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN)	\
	$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL)	\
	tap-driver.sh					\
	$(NULL)
GITIGNOREFILES = INSTALL m4 tools/__pycache__

gjsjsdir = @gjsjsdir@
gjsoverridedir = $(gjsjsdir)/overrides

gjs_public_includedir = $(includedir)/gjs-1.0

########################################################################
include gjs-srcs.mk
include gjs-modules-srcs.mk
########################################################################
nobase_gjs_public_include_HEADERS = $(gjs_public_headers)

########################################################################
pkgconfig_DATA = gjs-1.0.pc

EXTRA_DIST += gjs-1.0.pc.in

valgrinddir = $(datadir)/gjs-1.0/valgrind
dist_valgrind_DATA = installed-tests/extra/gjs.supp

lsandir = $(datadir)/gjs-1.0/lsan
dist_lsan_DATA = installed-tests/extra/lsan.supp

########################################################################
gjs_directory_defines = 				\
	-DGJS_JS_DIR=\"$(gjsjsdir)\"			\
	-DPKGLIBDIR=\"$(pkglibdir)\"

########################################################################
lib_LTLIBRARIES += libgjs.la

libgjs_la_CPPFLAGS =		\
	$(AM_CPPFLAGS)		\
	$(GJS_CFLAGS)	\
	$(gjs_directory_defines)\
	-I$(top_srcdir)/gi	\
	-DGJS_COMPILATION
libgjs_la_LDFLAGS = 			\
	$(AM_LDFLAGS)			\
	-export-symbols-regex "^[^_]"	\
	-version-info 0:0:0		\
	$(NO_UNDEFINED_FLAG)		\
	$(NULL)
libgjs_la_LIBADD = 		\
	$(GJS_LIBS)		\
	$(READLINE_LIBS)	\
	$(NULL)

# Please see gjs-srcs.mk for brief expanations
# of the layout of the sources due to historical
# reasons
libgjs_la_SOURCES = $(gjs_srcs)

if ENABLE_PROFILER
libgjs_la_CPPFLAGS += $(SYSPROF_CAPTURE_CFLAGS)
libgjs_la_LIBADD += $(LIB_TIMER_TIME) $(SYSPROF_CAPTURE_LIBS)
endif

# Also, these files used to be a separate library
libgjs_private_source_files = $(gjs_private_srcs)

libgjs_la_SOURCES += $(libgjs_private_source_files)

# The built-in modules also used to be compiled separately

modules_resource_files := $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/modules/modules.gresource.xml)
modules-resources.h: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
	$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name modules_resources $<
modules-resources.c: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
	$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name modules_resources $<

EXTRA_DIST += $(modules_resource_files) $(srcdir)/modules/modules.gresource.xml

modules_source_files =		\
	$(module_system_srcs)	\
	$(module_console_srcs)	\
	$(NULL)

if ENABLE_CAIRO
modules_source_files += $(module_cairo_srcs)
libgjs_la_CPPFLAGS += $(GJS_CAIRO_CFLAGS) $(GJS_CAIRO_XLIB_CFLAGS)
libgjs_la_LIBADD += $(GJS_CAIRO_LIBS) $(GJS_CAIRO_XLIB_LIBS)
endif

CLEANFILES += $(module_resource_srcs)

libgjs_la_SOURCES += $(modules_source_files)
nodist_libgjs_la_SOURCES = $(module_resource_srcs)

GjsPrivate-1.0.gir: libgjs.la
GjsPrivate_1_0_gir_LIBS = libgjs.la
GjsPrivate_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
GjsPrivate_1_0_gir_CFLAGS = -I$(top_srcdir)
GjsPrivate_1_0_gir_FILES = $(libgjs_private_source_files)
GjsPrivate_1_0_gir_SCANNERFLAGS =	\
	--identifier-prefix=Gjs		\
	--symbol-prefix=gjs_		\
	--warn-all			\
	$(WARN_SCANNERFLAGS)		\
	$(NULL)

INTROSPECTION_GIRS += GjsPrivate-1.0.gir

if ENABLE_DTRACE
gjs_gi_probes.h: gi/gjs_gi_probes.d
	$(DTRACE) -C -h -s $< -o $@
gjs_gi_probes.o: gi/gjs_gi_probes.d
	$(DTRACE) -G -s $< -o $@
BUILT_SOURCES += gjs_gi_probes.h gjs_gi_probes.o
libgjs_la_LIBADD += gjs_gi_probes.o
endif
EXTRA_DIST += gi/gjs_gi_probes.d

tapset_in_files = gjs/gjs.stp.in
EXTRA_DIST += $(tapset_in_files)
if ENABLE_SYSTEMTAP
gjs/gjs.stp: gjs/gjs.stp.in Makefile
	$(AM_V_GEN)$(MKDIR_P) $(@D) && \
	$(SED) -e s,@EXPANDED_LIBDIR@,$(libdir), < $< > $@.tmp && mv $@.tmp $@
tapsetdir   = $(datadir)/systemtap/tapset
tapset_DATA = $(tapset_in_files:.stp.in=.stp)
endif

include Makefile-examples.am

typelibdir = $(pkglibdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(INTROSPECTION_GIRS) $(typelib_DATA)

########################################################################
bin_PROGRAMS += gjs-console

gjs_console_CPPFLAGS = 		\
	$(AM_CPPFLAGS)		\
	$(GJS_CONSOLE_CFLAGS)	\
	$(NULL)
gjs_console_LDADD =		\
	$(GJS_CONSOLE_LIBS)	\
	libgjs.la
gjs_console_LDFLAGS = $(AM_LDFLAGS) -rdynamic
gjs_console_SOURCES = $(gjs_console_srcs)

install-exec-hook:
	(cd $(DESTDIR)$(bindir) && $(LN_S) -f gjs-console$(EXEEXT) gjs$(EXEEXT))

include Makefile-test.am
include Makefile-insttest.am

EXTRA_DIST +=					\
	autogen.sh				\
	build/choose-tests-locale.sh		\
	COPYING.LGPL				\
	doc/ByteArray.md			\
	doc/cairo.md				\
	doc/Hacking.md				\
	doc/SpiderMonkey_Memory.md		\
	doc/Style_Guide.md			\
	win32/build-rules-msvc.mak		\
	win32/config-msvc.mak			\
	win32/config.h.win32			\
	win32/create-lists-msvc.mak		\
	win32/create-lists.bat			\
	win32/detectenv-msvc.mak		\
	win32/generate-msvc.mak			\
	win32/gjs-introspection-msvc.mak	\
	win32/info-msvc.mak			\
	win32/install.mak			\
	win32/introspection-msvc.mak		\
	win32/Makefile.vc			\
	win32/README.txt			\
	$(NULL)

# Colin's handy Makefile bits for:
# 1) stuffing tarballs with pre-generated scripts from your workstation
# 2) bumping configure.ac version post-release
# 3) tagging correctly in git
# 4) uploading to gnome.org
# To use:
#  $ make check
#  $ make dist
#  $ make prepare-minor-release

# Customize to taste
TAG_PREFIX=GJS_
COMPRESSION=.bz2

DISTCLEANFILES=gjs-*.syscap

PACKAGE=@PACKAGE@
VERSION=@VERSION@
DISTNAME=$(PACKAGE)-$(VERSION).tar$(COMPRESSION)
TAG_VERSION := $(shell echo $(VERSION) | $(SED) s/\\\./_/g)

prepare-release-tag: Makefile
	git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)

prepare-minor-release: $(DISTNAME) prepare-release-tag Makefile
	env top_srcdir=$(top_srcdir) python $(top_srcdir)/verbump.py

upload-release: $(DISTNAME) Makefile
	git log origin/master..master
	@echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
	git push --tags origin master:master
	scp $(DISTNAME) master.gnome.org:
	ssh master.gnome.org install-module $(DISTNAME)


CPPCHECK=cppcheck
### cppcheck static code analysis
#
cppcheck:
	$(CPPCHECK) --inline-suppr \
		--enable=warning,performance,portability,information,missingInclude \
		--force -q $(top_srcdir) -I $(top_builddir)

# Include What You Use: run 'make iwyu | tee iwyu.log'
iwyu: tools/run_iwyu.sh
	SRCDIR=$(abs_top_srcdir) BUILDDIR=$(abs_top_builddir) tools/run_iwyu.sh 2>&1

-include $(top_srcdir)/git.mk