Makefile.am 14.6 KB
Newer Older
1
###############################################################################
2 3 4
# Automake targets and declarations
###############################################################################

5 6
AUTOMAKE_OPTIONS = subdir-objects

7
NULL =
8
EXTRA_DIST = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
9
	vlc-plugin.pc.in \
10
	libvlccore.sym \
11
	revision.txt
12

13
BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
Christophe Mutricy's avatar
Christophe Mutricy committed
14
CLEANFILES = $(BUILT_SOURCES)
15

16
SUFFIXES = .pc.in .pc .rc.in .rc
17

18 19 20 21
###############################################################################
# Headers
###############################################################################

22
pluginsincludedir = $(pkgincludedir)/plugins
23

24
pluginsinclude_HEADERS = \
25
	../include/vlc_access.h \
Rafaël Carré's avatar
Rafaël Carré committed
26
	../include/vlc_addons.h \
27
	../include/vlc_aout.h \
28
	../include/vlc_aout_volume.h \
29
	../include/vlc_arrays.h \
30
	../include/vlc_atomic.h \
31
	../include/vlc_avcodec.h \
32 33 34 35 36
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
37 38
	../include/vlc_common.h \
	../include/vlc_config.h \
39
	../include/vlc_config_cat.h \
40
	../include/vlc_configuration.h \
41
	../include/vlc_cpu.h \
42
	../include/vlc_dialog.h \
43
	../include/vlc_demux.h \
44
	../include/vlc_epg.h \
45
	../include/vlc_es.h \
46 47
	../include/vlc_es_out.h \
	../include/vlc_events.h \
48
	../include/vlc_filter.h \
49
	../include/vlc_fourcc.h \
50
	../include/vlc_fs.h \
51
	../include/vlc_gcrypt.h \
52
	../include/vlc_opengl.h \
53
	../include/vlc_http.h \
54
	../include/vlc_httpd.h \
55
	../include/vlc_image.h \
56
	../include/vlc_inhibit.h \
57
	../include/vlc_input.h \
58
	../include/vlc_input_item.h \
59
	../include/vlc_interface.h \
Rafaël Carré's avatar
Rafaël Carré committed
60
	../include/vlc_keys.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
61
	../include/vlc_main.h \
62
	../include/vlc_md5.h \
63
	../include/vlc_messages.h \
64
	../include/vlc_meta.h \
65
	../include/vlc_meta_fetcher.h \
jetru's avatar
jetru committed
66
	../include/vlc_media_library.h \
67
	../include/vlc_mime.h \
68
	../include/vlc_modules.h \
Pierre Ynard's avatar
Pierre Ynard committed
69
	../include/vlc_mouse.h \
70
	../include/vlc_mtime.h \
71
	../include/vlc_network.h \
72
	../include/vlc_objects.h \
73
	../include/vlc_picture.h \
74 75
	../include/vlc_picture_fifo.h \
	../include/vlc_picture_pool.h \
76
	../include/vlc_playlist.h \
77
	../include/vlc_plugin.h \
78
	../include/vlc_probe.h \
79 80
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
81
	../include/vlc_fingerprinter.h \
82
	../include/vlc_interrupt.h \
83
	../include/vlc_sout.h \
84
	../include/vlc_spu.h \
85 86
	../include/vlc_stream.h \
	../include/vlc_strings.h \
87
	../include/vlc_subpicture.h \
88
	../include/vlc_text_style.h \
89
	../include/vlc_threads.h \
90
	../include/vlc_tls.h \
91
	../include/vlc_url.h \
92 93
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
94
	../include/vlc_video_splitter.h \
95
	../include/vlc_vout.h \
96
	../include/vlc_vout_display.h \
97
	../include/vlc_vout_osd.h \
98
	../include/vlc_vout_window.h \
99
	../include/vlc_xml.h \
100
	../include/vlc_xlib.h \
101
	$(NULL)
102
nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
103

104
noinst_HEADERS = \
105
	../include/vlc_codec_synchro.h \
106
	../include/vlc_codecs.h \
Pierre Ynard's avatar
Pierre Ynard committed
107
	../include/vlc_extensions.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
108
	../include/vlc_fixups.h \
109
	../include/vlc_intf_strings.h \
110
	../include/vlc_iso_lang.h \
Pierre Ynard's avatar
Pierre Ynard committed
111
	../include/vlc_memory.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
112
	../include/vlc_pgpkey.h \
113 114
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
115
	../include/vlc_vout_wrapper.h \
Pierre Ynard's avatar
Pierre Ynard committed
116
	../include/vlc_windows_interfaces.h \
117 118
	$(NULL)

119
../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
120 121 122 123 124 125 126
	$(AM_V_at)rm -f -- "$@.tmp"
	$(AM_V_at)mkdir -p -- ../include
	$(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
	echo "static const char psz_license[] =" && \
	sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
	echo ";" && \
	echo "static const char psz_thanks[] =" && \
JP Dinger's avatar
JP Dinger committed
127
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
128 129 130
		"$(top_srcdir)/THANKS" && \
	echo ";" && \
	echo "static const char psz_authors[] =" && \
131
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
132 133 134
		"$(top_srcdir)/AUTHORS" && \
	echo ";") >> "$@.tmp"
	$(AM_V_at)mv -f -- "$@.tmp" "$@"
135

136 137 138 139 140
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
141
pkgconfig_DATA = vlc-plugin.pc
142 143
CLEANFILES += $(pkgconfig_DATA)

144
.pc.in.pc: $(top_builddir)/config.status
145
	$(AM_V_GEN)cd "$(top_builddir)" && \
146 147
	$(SHELL) ./config.status --file="src/$@"

148 149 150 151 152 153 154 155 156 157 158 159 160
##############################################################################
# Windows resource files
##############################################################################

if HAVE_WIN32
noinst_DATA = libvlc_win32_rc.rc
endif
EXTRA_DIST += libvlc_win32_rc.rc.in

.rc.in.rc: $(top_builddir)/config.status
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="src/$@"

161 162 163 164
###############################################################################
# Building libvlc
###############################################################################

165
lib_LTLIBRARIES = libvlccore.la
166

167
AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
Rafaël Carré's avatar
Rafaël Carré committed
168
	-DMODULE_STRING=\"core\" \
169
	-DLOCALEDIR=\"$(localedir)\" \
170
	-DPKGDATADIR=\"$(vlcdatadir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
171
	-DPKGLIBDIR=\"$(vlclibdir)\"
172
AM_CFLAGS = $(CFLAGS_libvlccore)
173 174 175
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
endif
176 177 178 179
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
AM_CFLAGS += $(DBUS_CFLAGS)
endif
180 181 182 183

libvlccore_la_SOURCES = $(SOURCES_libvlc)
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
184
	-no-undefined \
185
	-export-symbols $(srcdir)/libvlccore.sym \
186
	-version-info 8:0:0
187
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
188
	../compat/libcompat.la \
189
	$(LTLIBINTL) $(LTLIBICONV) \
190
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
191
libvlccore_la_DEPENDENCIES = libvlccore.sym
192
if HAVE_WIN32
193
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
194 195
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version \
						 -Wc,--static -Wc,-static-libgcc
196
endif
197 198 199
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
endif
200 201 202
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
203

204
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
205
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
206

207
EXTRA_libvlccore_la_SOURCES = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
208
	$(SOURCES_libvlc_darwin) \
209
	$(SOURCES_libvlc_android) \
210
	$(SOURCES_libvlc_linux) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
211
	$(SOURCES_libvlc_win32) \
komh's avatar
komh committed
212
	$(SOURCES_libvlc_os2) \
213
	$(SOURCES_libvlc_other) \
214
	$(SOURCES_libvlc_httpd) \
215
	$(SOURCES_libvlc_sout) \
216
	$(SOURCES_libvlc_vlm) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
217
	$(NULL)
218
if HAVE_DARWIN
219
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
220
else
221 222 223
if HAVE_ANDROID
libvlccore_la_SOURCES += $(SOURCES_libvlc_android)
else
224
if HAVE_LINUX
225
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
226
else
227
if HAVE_WIN32
228
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
229
else
230
if HAVE_SYMBIAN
231
#libvlccore_la_SOURCES += $(SOURCES_libvlc_symbian)
232
else
komh's avatar
komh committed
233 234 235
if HAVE_OS2
libvlccore_la_SOURCES += $(SOURCES_libvlc_os2)
else
236
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
237
endif
238 239 240
endif
endif
endif
241
endif
242
endif
243 244 245
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
246
if ENABLE_SOUT
247
libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
248 249 250
if ENABLE_VLM
libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
endif
251
endif
252

253
SOURCES_libvlc_darwin = \
254
	darwin/dirs.c \
255
	posix/filesystem.c \
256
	posix/plugin.c \
257
	darwin/thread.c \
258
	posix/timer.c \
259
	darwin/specific.c \
260
	posix/rand.c \
261
	darwin/error.c \
262
	darwin/netconf.c \
263 264
	$(NULL)

265 266
SOURCES_libvlc_android = \
	android/dirs.c \
Rafaël Carré's avatar
Rafaël Carré committed
267
	android/thread.c \
268
	android/error.c \
269
	posix/filesystem.c \
270
	android/netconf.c \
271 272 273 274 275 276 277 278
	posix/plugin.c \
	posix/timer.c \
	posix/linux_cpu.c \
	posix/linux_specific.c \
	posix/specific.c \
	posix/rand.c \
	$(NULL)

279
SOURCES_libvlc_linux = \
280
	posix/dirs.c \
281
	posix/error.c \
282
	posix/filesystem.c \
283
	posix/netconf.c \
284
	posix/plugin.c \
285
	posix/thread.c \
286
	posix/timer.c \
287
	posix/linux_cpu.c \
288
	posix/linux_specific.c \
289
	posix/specific.c \
290
	posix/rand.c \
291 292
	$(NULL)

293
SOURCES_libvlc_win32 = \
294
	win32/dirs.c \
295
	win32/error.c \
296
	win32/filesystem.c \
297
	win32/netconf.c \
298
	win32/plugin.c \
299
	win32/thread.c \
300
	win32/specific.c \
301
	win32/winsock.c \
302
	win32/rand.c \
303 304
	$(NULL)

305 306
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
307
	symbian/dirs.c \
308
	win32/plugin.c \
309
	posix/rand.c \
310 311
	$(NULL)

komh's avatar
komh committed
312
SOURCES_libvlc_os2 = \
313
	os2/getaddrinfo.c \
314
	os2/dirs.c \
315
	darwin/error.c \
316
	os2/filesystem.c \
KO Myung-Hun's avatar
KO Myung-Hun committed
317
	os2/netconf.c \
318
	os2/plugin.c \
komh's avatar
komh committed
319
	os2/thread.c \
komh's avatar
komh committed
320
	os2/specific.c \
321
	os2/rand.c \
komh's avatar
komh committed
322 323
	$(NULL)

324
SOURCES_libvlc_other = \
325
	posix/dirs.c \
326
	posix/error.c \
327
	posix/filesystem.c \
328
	posix/netconf.c \
329
	posix/thread.c \
330
	posix/timer.c \
331
	posix/plugin.c \
332
	posix/specific.c \
333
	posix/rand.c \
334
	$(NULL)
335

336 337 338
SOURCES_libvlc_common = \
	libvlc.c \
	libvlc.h \
339
	libvlc-module.c \
340
	missing.c \
341
	revision.c \
342
	version.c \
343
	interface/dialog.c \
344
	interface/interface.c \
345
	playlist/playlist_internal.h \
346
	playlist/art.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
347
	playlist/art.h \
348
	playlist/aout.c \
349 350 351
	playlist/thread.c \
	playlist/control.c \
	playlist/engine.c \
352
	playlist/fetcher.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
353
	playlist/fetcher.h \
354 355
	playlist/sort.c \
	playlist/loadsave.c \
356
	playlist/preparser.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
357
	playlist/preparser.h \
358
	playlist/tree.c \
359
	playlist/item.c \
360
	playlist/search.c \
361
	playlist/services_discovery.c \
362
	input/item.c \
363 364 365 366
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
367
	input/decoder_synchro.c \
368 369
	input/demux.c \
	input/es_out.c \
370
	input/es_out_timeshift.c \
371
	input/event.c \
372
	input/input.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
373
	input/info.h \
374
	input/meta.c \
375
	input/access.h \
376 377
	input/clock.h \
	input/decoder.h \
378
	input/demux.h \
379
	input/es_out.h \
380
	input/es_out_timeshift.h \
381
	input/event.h \
382
	input/item.h \
383
	input/stream.h \
384
	input/input_internal.h \
385
	input/input_interface.h \
386
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
387
	input/vlm_event.h \
388 389
	input/resource.h \
	input/resource.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
390
	input/stats.c \
391
	input/stream.c \
392
	input/stream_demux.c \
393
	input/stream_filter.c \
394
	input/stream_memory.c \
395 396
	input/subtitles.c \
	input/var.c \
ivoire's avatar
ivoire committed
397
	video_output/chrono.h \
398 399
	video_output/control.c \
	video_output/control.h \
400 401
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
402
	video_output/event.h \
403 404
	video_output/inhibit.c \
	video_output/inhibit.h \
405 406
	video_output/interlacing.c \
	video_output/interlacing.h \
407 408
	video_output/snapshot.c \
	video_output/snapshot.h \
409
	video_output/statistic.h \
410 411
	video_output/video_output.c \
	video_output/video_text.c \
412
	video_output/video_epg.c \
413 414
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
415
	video_output/window.c \
416
	video_output/window.h \
417
	video_output/opengl.c \
418
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
419
	video_output/vout_internal.h \
420
	video_output/vout_control.h \
421
	video_output/vout_wrapper.c \
zorglub's avatar
zorglub committed
422
	audio_output/aout_internal.h \
423 424 425 426
	audio_output/common.c \
	audio_output/dec.c \
	audio_output/filters.c \
	audio_output/output.c \
427
	audio_output/volume.c \
428 429 430 431
	network/getaddrinfo.c \
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
432
	network/rootbind.c \
433
	network/tls.c \
434 435 436
	text/charset.c \
	text/strings.c \
	text/unicode.c \
437
	text/url.c \
438
	text/filesystem.c \
439 440
	text/iso_lang.c \
	text/iso-639_def.h \
441
	misc/md5.c \
442
	misc/probe.c \
443
	misc/rand.c \
444 445
	misc/mtime.c \
	misc/block.c \
446
	misc/fifo.c \
447
	misc/fourcc.c \
448
	misc/fourcc_list.h \
449
	misc/es_format.c \
450
	misc/picture.c \
451
	misc/picture.h \
452 453
	misc/picture_fifo.c \
	misc/picture_pool.c \
454 455
	misc/interrupt.h \
	misc/interrupt.c \
456 457
	modules/modules.h \
	modules/modules.c \
458
	modules/bank.c \
459
	modules/cache.c \
460
	modules/entry.c \
461
	modules/textdomain.c \
462 463
	misc/threads.c \
	misc/cpu.c \
464
	misc/epg.c \
465
	misc/exit.c \
466
	config/configuration.h \
467 468 469
	config/core.c \
	config/chain.c \
	config/file.c \
470
        config/help.c \
471
	config/intf.c \
472
	config/keys.c \
473
	config/cmdline.c \
474 475
	config/getopt.c \
	config/vlc_getopt.h \
476
	misc/events.c \
477 478
	misc/image.c \
	misc/messages.c \
479
	misc/mime.c \
480
	misc/objects.c \
zorglub's avatar
zorglub committed
481
	misc/variables.h \
482 483
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
484
	misc/update.h \
485
	misc/update.c \
486
	misc/update_crypto.c \
487 488
	misc/xml.c \
	extras/libc.c \
489
	extras/tdestroy.c \
490
	misc/addons.c \
Laurent Aimar's avatar
Laurent Aimar committed
491
	misc/filter.c \
492
	misc/filter_chain.c \
493
	misc/http_auth.c \
aajanki's avatar
aajanki committed
494
	misc/httpcookies.c \
495
	misc/fingerprinter.c \
496
	misc/text_style.c \
497 498
	misc/subpicture.c \
	misc/subpicture.h \
499 500
	$(NULL)

501 502 503 504
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

505 506 507 508 509 510 511
SOURCES_libvlc_sout = \
	stream_output/stream_output.c \
	stream_output/stream_output.h \
	stream_output/sap.c \
	stream_output/sdp.c \
	$(NULL)

512 513
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
514
	input/vlm_event.c \
515 516 517
	input/vlmshell.c \
	$(NULL)

518 519 520 521
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

522 523 524 525 526 527 528 529 530 531 532 533 534 535
# FourCC tables
BUILT_SOURCES += fourcc_tables.h
EXTRA_DIST += misc/fourcc_gen.c
MOSTLYCLEANFILES = fourcc_gen

fourcc_gen: misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
	$(AM_V_at)rm -f -- $@
	$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<

fourcc_tables.h: fourcc_gen
	$(AM_V_at)rm -f -- $@.tmp
	$(AM_V_GEN)$(builddir)/fourcc_gen > $@.tmp
	$(AM_V_at)mv -f -- $@.tmp $@

536 537 538 539 540 541 542
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
	test_md5 \
543
	test_picture_pool \
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
	test_timer \
	test_url \
	test_utf8 \
	test_xmlent \
	test_headers

TESTS = $(check_PROGRAMS)

test_block_SOURCES = test/block_test.c
test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
test_block_DEPENDENCIES =

test_dictionary_SOURCES = test/dictionary.c
test_i18n_atof_SOURCES = test/i18n_atof.c
test_md5_SOURCES = test/md5.c
559
test_picture_pool_SOURCES = test/picture_pool.c
560 561 562 563 564 565 566 567 568 569
test_timer_SOURCES = test/timer.c
test_url_SOURCES = test/url.c
test_utf8_SOURCES = test/utf8.c
test_xmlent_SOURCES = test/xmlent.c
test_headers_SOURCES = test/headers.c

AM_LDFLAGS = -no-install
LDADD = libvlccore.la \
	../compat/libcompat.la

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
570 571 572 573 574
###############################################################################
# GIT revision
###############################################################################

BUILT_SOURCES += stamp-revision
575
MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
576

577 578 579 580
$(srcdir)/revision.c: $(srcdir)/revision.txt
	$(AM_V_at)rm -f -- $@
	$(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
		> $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
581

582
$(srcdir)/revision.txt:
583
	$(AM_V_at)$(MAKE) stamp-revision
584
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
585 586

stamp-revision:
587
	$(AM_V_at)rm -f -- revision.tmp
588 589 590 591 592 593
	$(AM_V_GEN)if ! git \
			--git-dir="$(top_srcdir)/.git/" describe \
			--tags --long --match '?.*.*' --always; then \
		cat $(srcdir)/revision.txt ; \
	fi > revision.tmp
	$(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
594 595
		rm -f -- revision.tmp; \
	else \
596 597 598
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
599

600 601 602
###############################################################################
# Unit/regression test
###############################################################################
603

604
dist_check_SCRIPTS = check_headers
605

606
check-local:
607
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
608 609 610 611 612 613 614 615
	do \
		echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
		if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
		then \
			echo "Header $$h not included in test/headers.c!"; \
			exit 1; \
		fi ; \
	done
616
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
617

618
FORCE:
619 620 621 622
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE