summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 9d91ee501744cad95263543bb5c9ba321baef4f8 (plain)
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

SUBDIRS = po help

enum_data = \
	libcheese/cheese-enums.c \
	libcheese/cheese-enums.h

cheese_enum_headers = \
	$(top_srcdir)/libcheese/cheese-widget.h

libcheese/cheese-enums.c: $(cheese_enum_headers) libcheese/cheese-enums.h
	$(AM_V_GEN)$(GLIB_MKENUMS) \
		--fhead "#include \"cheese-enums.h\"\n\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--fprod "#include \"@filename@\"\n" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n" \
		--vhead "  static GType type = 0;\n\n" \
		--vhead "  if (!type)\n  {\n" \
		--vhead "    static const G@Type@Value _@enum_name@_values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n\n" \
		--vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n  }\n\n" \
		--vtail "  return type;\n}\n\n" \
		$(cheese_enum_headers) > $@

libcheese/cheese-enums.h: $(cheese_enum_headers)
	$(AM_V_GEN)$(GLIB_MKENUMS) \
		--fhead "#ifndef CHEESE_ENUMS_H_\n" \
		--fhead "#define CHEESE_ENUMS_H_\n\n" \
		--fhead "#include <glib-object.h>\n\n" \
		--fhead "G_BEGIN_DECLS\n\n" \
		--fprod "/* enumerations from @filename@ */\n" \
		--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n" \
		--vhead "#define CHEESE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "G_END_DECLS\n\n" \
		--ftail "#endif /* CHEESE_ENUMS_H_ */" \
		$(cheese_enum_headers) > $@

AM_CPPFLAGS = \
	-DDATADIR=\"$(datadir)\" \
	-DPREFIX=\""$(prefix)"\" \
	-DSYSCONFDIR=\""$(sysconfdir)"\" \
	-DLIBDIR=\""$(libdir)"\" \
	-DPACKAGE_DATADIR=\""$(pkgdatadir)"\" \
	-DPACKAGE_LOCALEDIR=\""$(datadir)/locale"\" \
	-DGNOME_DESKTOP_USE_UNSTABLE_API=1 \
	-I$(top_builddir) \
	$(CHEESE_CFLAGS) \
	$(CHEESE_GTK_FLAGS) \
	$(CHEESE_WFLAGS) \
	$(WARN_CFLAGS)

AM_VALAFLAGS = \
	--target-glib=2.38 \
	--thread \
	--vapidir $(top_srcdir)/src/vapi \
	--gresources $(top_srcdir)/data/org.gnome.Cheese.gresource.xml \
	--pkg config \
	--pkg posix \
	--pkg gtk+-3.0 \
	--pkg gmodule-2.0 \
	--pkg clutter-1.0 \
	--pkg clutter-gtk-1.0 \
	--pkg gstreamer-1.0 \
	--pkg libcanberra-gtk \
	--pkg libcanberra \
	--pkg eogthumbnav \
	--pkg cheese-thumbview \
	--pkg cheese-common \
	--pkg gdk-x11-3.0 \
	--pkg gio-2.0

lib_LTLIBRARIES = libcheese.la libcheese-gtk.la

libcheese_gtk_la_CFLAGS = \
	$(CHEESE_CFLAGS) \
	$(CHEESE_GTK_CFLAGS) \
	$(CHEESE_WFLAGS)

libcheese_gtk_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-DG_LOG_DOMAIN=\"cheese-gtk\" \
	-I$(top_builddir)/libcheese \
	-I$(top_srcdir)/libcheese \
	-I$(top_srcdir)/src

libcheese_gtk_la_LIBADD = \
	libcheese.la \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS)

libcheese_gtk_la_LDFLAGS = \
	-version-info $(LIBCHEESE_GTK_LT_VERSION) \
	-export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
	-no-undefined \
	$(AM_LDFLAGS)

libcheese_gtk_la_SOURCES = \
	libcheese/cheese-avatar-chooser.c \
	libcheese/cheese-avatar-widget.c \
	libcheese/totem-aspect-frame.c \
	libcheese/cheese-flash.c \
	libcheese/cheese-gtk.c \
	libcheese/cheese-widget.c \
	libcheese/um-crop-area.c

noinst_libcheese_gtk_headers = \
	libcheese/totem-aspect-frame.h \
	libcheese/cheese-avatar-chooser.h \
	libcheese/cheese-avatar-widget.h \
	libcheese/cheese-flash.h \
	libcheese/cheese-widget.h \
	libcheese/cheese-widget-private.h \
	libcheese/um-crop-area.h

libcheese_la_CFLAGS = \
	$(CHEESE_CFLAGS) \
	$(CHEESE_GTK_CFLAGS) \
	$(CHEESE_WFLAGS)

libcheese_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-DG_LOG_DOMAIN=\"cheese\" \
	-I$(top_builddir)/libcheese \
	-I$(top_srcdir)/libcheese

libcheese_la_LIBADD = \
	$(CHEESE_LIBS)

libcheese_la_LDFLAGS = \
	-version-info $(LIBCHEESE_LT_VERSION) \
	$(AM_LDFLAGS)

libcheese_la_SOURCES = \
	libcheese/cheese-enums.c \
	libcheese/cheese-camera.c \
	libcheese/cheese-camera-device.c \
	libcheese/cheese-camera-device-monitor.c \
	libcheese/cheese-effect.c \
	libcheese/cheese-fileutil.c \
	libcheese/cheese.c

noinst_libcheese_headers = \
	libcheese/cheese-camera.h \
	libcheese/cheese-camera-device.h \
	libcheese/cheese-camera-device-monitor.h \
	libcheese/cheese-effect.h \
	libcheese/cheese-fileutil.h

# FIXME when we have a .pc file, and sonames
cheesedir = $(includedir)/cheese
cheese_HEADERS = \
	libcheese/cheese-avatar-widget.h \
	libcheese/cheese-avatar-chooser.h \
	libcheese/cheese-camera.h \
	libcheese/cheese-camera-device.h \
	libcheese/cheese-camera-device-monitor.h \
	libcheese/cheese-effect.h \
	libcheese/cheese-gtk.h \
	libcheese/cheese.h \
	libcheese/cheese-widget.h

if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --warn-all

INTROSPECTION_GIRS = Cheese-3.0.gir

Cheese-3.0.gir: libcheese.la
Cheese_3_0_gir_CFLAGS = \
	-I$(top_srcdir)/libcheese \
	-I$(top_builddir)/libcheese \
	$(CHEESE_CFLAGS)
Cheese_3_0_gir_FILES = \
	$(libcheese_la_SOURCES) \
	$(noinst_libcheese_headers) \
	libcheese/cheese-enums.h
Cheese_3_0_gir_INCLUDES = \
	Gst-1.0 \
	Clutter-1.0 \
	GdkPixbuf-2.0
Cheese_3_0_gir_LIBS = libcheese.la
Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = Cheese-3.0.typelib
endif

noinst_resource_files = \
	data/cheese.css \
	data/cheese-viewport.json \
	data/cheese-main-window.ui \
	data/cheese-prefs.ui \
	data/headerbar.ui \
	data/menus.ui \
	data/pixmaps/cheese-1.svg \
	data/pixmaps/cheese-2.svg \
	data/pixmaps/cheese-3.svg \
	data/pixmaps/thumbnail-frame.png

src/cheese-resource.c src/cheese-resource.h: data/org.gnome.Cheese.gresource.xml Makefile $(noinst_resource_files)
	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/data --generate --c-name cheese $<

bin_PROGRAMS = cheese

nodist_cheese_SOURCES = \
	src/cheese-resource.c

# cheese-main.vala must go at the end of the Vala sources.
cheese_SOURCES = \
	src/cheese-application.vala \
	src/cheese-countdown.vala \
	src/cheese-effects-manager.vala \
	src/cheese-preferences.vala \
	src/cheese-window.vala \
	src/cheese-main.vala \
	src/thumbview/cheese-thumb-view.c \
	src/thumbview/cheese-thumbnail.c \
	src/thumbview/eog-thumb-nav.c

nodist_cheese_HEADERS = \
	src/cheese-resource.h

noinst_HEADERS = \
	src/thumbview/cheese-thumb-view.h \
	src/thumbview/cheese-thumbnail.h \
	src/thumbview/eog-thumb-nav.h

cheese_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	$(CHEESE_CFLAGS) \
	$(CHEESE_GTK_CFLAGS) \
	-include $(top_builddir)/$(CONFIG_HEADER) \
	-I$(top_srcdir)/libcheese \
	-I$(top_srcdir)/src

cheese_CFLAGS = -export-dynamic -w

cheese_LDADD = \
	libcheese.la \
	libcheese-gtk.la \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS)

libexec_PROGRAMS = \
	gnome-camera-service

service/camera.c: service/camera.h
service/camera.h: Makefile data/org.gnome.Camera.xml
	$(AM_V_GEN) $(GDBUS_CODEGEN) --interface-prefix org.gnome.Camera. \
		--generate-c-code service/camera \
		--c-namespace Gc $(srcdir)/data/org.gnome.Camera.xml

BUILT_SOURCES = \
	$(nodist_gnome_camera_service_SOURCES)

gnome_camera_service_SOURCES = \
	service/gc-application.c \
	service/gc-camera-client.c \
	service/gc-camera-manager.c \
	service/gc-client-monitor.c \
	service/gc-main.c

noinst_gnome_camera_service_headers = \
	service/gc-application.h \
	service/gc-camera-client.h \
	service/gc-camera-manager.h \
	service/gc-client-monitor.h

nodist_gnome_camera_service_headers = \
	service/camera.h

nodist_gnome_camera_service_SOURCES = \
	service/camera.c

gnome_camera_service_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-I$(top_builddir)/service \
	-I$(top_srcdir)/libcheese

gnome_camera_service_CFLAGS = \
	$(CHEESE_GTK_CFLAGS)

gnome_camera_service_LDADD = \
	libcheese-gtk.la \
	$(CHEESE_GTK_LIBS)

EXAMPLES = \
	tests/cheese-test-camera \
	tests/cheese-test-chooser \
	tests/cheese-test-flash \
	tests/cheese-test-monitor \
	tests/cheese-test-widget \
	tests/test-service-client

if HAVE_XTEST
noinst_PROGRAMS = \
	$(EXAMPLES) \
	tests/test-webcam-button
else
noinst_PROGRAMS = $(EXAMPLES)
endif

EXAMPLES_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	$(CHEESE_GTK_CFLAGS) \
	-I$(top_srcdir)/libcheese

tests_cheese_test_camera_SOURCES = tests/cheese-test-camera.c
tests_cheese_test_chooser_SOURCES = tests/cheese-test-chooser.c
tests_cheese_test_flash_SOURCES = tests/cheese-test-flash.c
tests_cheese_test_monitor_SOURCES = tests/cheese-test-monitor.c
tests_cheese_test_widget_SOURCES = tests/cheese-test-widget.c
tests_test_service_client_SOURCES = tests/test-service-client.c
nodist_tests_test_service_client_SOURCES = service/camera.c
tests_test_webcam_button_SOURCES = tests/test-webcam-button.c

tests_cheese_test_camera_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_cheese_test_chooser_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_cheese_test_flash_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_cheese_test_monitor_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_cheese_test_widget_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_test_service_client_CPPFLAGS = \
	$(EXAMPLES_CPPFLAGS) -I$(top_builddir)/service
tests_test_webcam_button_CPPFLAGS = $(EXAMPLES_CPPFLAGS)

tests_cheese_test_camera_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese.la
tests_cheese_test_chooser_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese.la \
	libcheese-gtk.la
tests_cheese_test_flash_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese.la \
	libcheese-gtk.la
tests_cheese_test_monitor_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese.la \
	libcheese-gtk.la
tests_cheese_test_widget_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese.la \
	libcheese-gtk.la
tests_test_service_client_LDADD = $(CHEESE_GTK_LIBS)
tests_test_webcam_button_LDADD = $(XTEST_LIBS)

@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = data/org.gnome.Cheese.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)

@APPDATA_XML_RULES@
@INTLTOOL_XML_RULE@
appdata_in_files = data/org.gnome.Cheese.appdata.xml.in
appdata_XML = $(appdata_in_files:.appdata.xml.in=.appdata.xml)

servicedir = $(datadir)/dbus-1/services
service_DATA = \
	data/org.gnome.Camera.service \
	data/org.gnome.Cheese.service

@GSETTINGS_RULES@
gsettings_SCHEMAS = data/org.gnome.Cheese.gschema.xml

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
	data/cheese.pc \
	data/cheese-gtk.pc

iconthemedir = $(datadir)/icons/hicolor

appsicon16dir = $(iconthemedir)/16x16/apps
appsicon22dir = $(iconthemedir)/22x22/apps
appsicon24dir = $(iconthemedir)/24x24/apps
appsicon32dir = $(iconthemedir)/32x32/apps
appsicon48dir = $(iconthemedir)/48x48/apps
appsicon256dir = $(iconthemedir)/256x256/apps

dist_appsicon16_DATA = data/icons/16x16/cheese.png
dist_appsicon22_DATA = data/icons/22x22/cheese.png
dist_appsicon24_DATA = data/icons/24x24/cheese.png
dist_appsicon32_DATA = data/icons/32x32/cheese.png
dist_appsicon48_DATA = data/icons/48x48/cheese.png
dist_appsicon256_DATA = data/icons/256x256/cheese.png

update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force

install-data-hook: install-update-icon-cache
uninstall-hook: uninstall-update-icon-cache
	touch libcheese_la_vala.stamp

install-update-icon-cache:
	$(AM_V_at)$(POST_INSTALL)
	test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"

uninstall-update-icon-cache:
	$(AM_V_at)$(POST_UNINSTALL)
	test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"

# Tests.
check_PROGRAMS = \
	tests/test-libcheese \
	tests/test-libcheese-gtk

tests_test_libcheese_gtk_SOURCES = \
	libcheese/um-crop-area.c \
	tests/test-libcheese-gtk.c
tests_test_libcheese_gtk_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_test_libcheese_gtk_LDADD = \
	$(CHEESE_LIBS) \
	$(CHEESE_GTK_LIBS) \
	libcheese-gtk.la \
	libcheese.la

tests_test_libcheese_SOURCES = \
	tests/test-libcheese.c
tests_test_libcheese_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
tests_test_libcheese_LDADD = \
	$(CHEESE_LIBS) \
	libcheese.la

if CHEESE_ENABLE_TESTS
# Not automake built-in TESTS_ENVIRONMENT!
TEST_ENVIRONMENT = MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))

# test: run all tests.
test: $(check_PROGRAMS)
	$(AM_V_at)$(TEST_ENVIRONMENT) $(GTESTER) --verbose $(check_PROGRAMS)

# test-report: run tests and generate report.
# perf-report: run tests with -m perf and generate report.
# full-report: like test-report: with -m perf and -m slow.
test-report perf-report full-report: $(check_PROGRAMS)
	$(AM_V_at)test -z "$(check_PROGRAMS)" || { \
	  case $@ in \
	  test-report) test_options="-k";; \
	  perf-report) test_options="-k -m=perf";; \
	  full-report) test_options="-k -m=perf -m=slow";; \
	  esac ; \
	  $(TEST_ENVIRONMENT) $(GTESTER) --verbose $$test_options -o test-log.xml $(check_PROGRAMS) ; \
	  if test -d "$(top_srcdir)/.git" ; then \
	    REVISION=`git describe` ; \
	  else \
	    REVISION=$(PACKAGE_VERSION) ; \
	  fi ; \
	  echo '<?xml version="1.0"?>' > $@.xml ; \
	  echo '<report-collection>' >> $@.xml ; \
	  echo '<info>' >> $@.xml ; \
	  echo '  <package>$(PACKAGE_NAME)</package>' >> $@.xml ; \
	  echo '  <version>$(PACKAGE_VERSION)</version>' >> $@.xml ; \
	  echo "  <revision>$$REVISION</revision>" >> $@.xml ; \
	  echo '</info>' >> $@.xml ; \
	  sed '1,1s/^<?xml\b[^>?]*?>//' < test-log.xml >> $@.xml ; \
	  rm test-log.xml ; \
	  echo >> $@.xml ; \
	  echo '</report-collection>' >> $@.xml ; \
	  $(GTESTER_REPORT) --version 2>/dev/null 1>&2 ; test "$$?" != 0 || $(GTESTER_REPORT) $@.xml >$@.html ; \
	}
else # !CHEESE_ENABLE_TESTS
test:
	echo "Test run disabled due to the lack of GLib testing utilities"
endif

# Code coverage reporting.
if CHEESE_ENABLE_LCOV
# Depend on full-report so that all the tests are run.
lcov: full-report
	$(AM_V_at)$(LCOV) --base-directory $(top_builddir) \
		--directory $(top_builddir)/libcheese --capture \
		--output-file cheese-lcov.info --test-name CHEESE \
		--no-checksum --compat-libtool
	$(AM_V_at)LANG=C $(LCOV_GENHTML) --prefix $(top_builddir) \
		--output-directory cheese-lcov --title "Cheese code coverage" \
		--legend --show-details cheese-lcov.info

lcov-clean:
	$(AM_V_at)$(LCOV) --directory $(top_builddir) -z
	$(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
	$(AM_V_at)find . -name '*.gcda' -exec rm -f {} +
else # !CHEESE_ENABLE_LCOV
lcov:
	$(AM_V_at)echo "Code coverage reporting not available"

lcov-clean:
	$(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
	$(AM_V_at)find . -name '*.gcda' -exec rm -f {} +
endif

# gtk-doc
gtkdoc_builddir = $(top_builddir)/docs/reference
gtkdoc_distdir = $(top_distdir)/docs/reference
gtkdoc_srcdir = $(top_srcdir)/docs/reference

all-local: $(bin_PROGRAMS)
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
# run make test as part of make check.
check-local: test
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFlAGS) check
clean-local: lcov-clean
	cd $(gtkdoc_builddir) && if test -e Makefile ; then \
		$(MAKE) $(AM_MAKEFLAGS) clean ; \
	fi
	find . -name '*.gcno' -exec rm -f {} +
distclean-local:
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
docs: $(lib_LTLIBRARIES)
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
install-data-local:
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
uninstall-local:
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall

dist-hook: git-changelog-hook
	$(MKDIR_P) $(gtkdoc_distdir)
	cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
	cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
	  distdir="../../$(gtkdoc_distdir)" \
	  top_distdir="../../$(top_distdir)" \
	  dist-hook

dist_noinst_DATA = \
	ChangeLog.pre-git \
	COPYING.GPL3 \
	$(desktop_in_files) \
	$(gsettings_SCHEMAS) \
	$(noinst_gnome_camera_service_headers) \
	$(noinst_resource_files) \
	$(appdata_in_files) \
	data/org.gnome.Cheese.gresource.xml \
	data/org.gnome.Camera.xml \
	build-aux/test-driver \
	$(gtkdoc_srcdir)/cheese-docs.xml \
	$(gtkdoc_srcdir)/cheese-sections.txt \
	$(gtkdoc_srcdir)/cheese.xml \
	$(gtkdoc_srcdir)/version.xml.in \
	gtk-doc.make \
	$(noinst_libcheese_headers) \
	$(noinst_libcheese_gtk_headers) \
	libcheese/cheese-gtk.symbols \
	m4/introspection.m4 \
	src/vapi/cheese-common.deps \
	src/vapi/cheese-common.vapi \
	src/vapi/cheese-thumbview.vapi \
	src/vapi/config.vapi \
	src/vapi/eogthumbnav.vapi

dist_noinst_SCRIPTS = \
	autogen.sh

CLEANFILES = \
	$(appdata_XML) \
	$(desktop_DATA) \
	$(pkgconfig_DATA) \
	$(enum_data) \
	$(gir_DATA) \
	$(typelib_DATA) \
	$(nodist_gnome_camera_service_headers) \
	$(nodist_gnome_camera_service_SOURCES) \
	src/cheese-resource.c \
	src/cheese-resource.h

DISTCLEANFILES = \
	libcheese_la_vala.stamp \
	po/.intltool-merge-cache

MAINTAINERCLEANFILES = \
	build-aux/compile \
	build-aux/config.guess \
	build-aux/config.sub \
	build-aux/depcomp \
	build-aux/install-sh \
	build-aux/ltmain.sh \
	build-aux/missing \
	build-aux/test-driver \
	aclocal.m4 \
	config.h.n \
	$(gsettings_SCHEMAS:.xml=.valid) \
	mkinstalldirs \
	omf.make \
	xmldocs.make

DISTCHECK_CONFIGURE_FLAGS = \
	--enable-appdata-check \
	--enable-gtk-doc \
	--enable-introspection \
	--enable-man

CHANGELOG_START = 2.26.0

git-changelog-hook:
	$(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
		--git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
		--stat -M -C --name-status --no-color $(CHANGELOG_START).. \
		| fmt --split-only >.ChangeLog.tmp; \
	then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
	else rm -f .ChangeLog.tmp; exit 1; fi

.PHONY: docs git-changelog-hook test test-report perf-report full-report
.PHONY: lcov lcov-clean