cli: use vlc_dup2()
[vlc.git] / src / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 AUTOMAKE_OPTIONS = subdir-objects
6
7 NULL =
8 EXTRA_DIST = \
9         vlc-plugin.pc.in \
10         libvlccore.sym \
11         revision.txt
12
13 BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
14 CLEANFILES = $(BUILT_SOURCES)
15
16 SUFFIXES = .pc.in .pc .rc.in .rc
17
18 ###############################################################################
19 # Headers
20 ###############################################################################
21
22 pluginsincludedir = $(pkgincludedir)/plugins
23
24 pluginsinclude_HEADERS = \
25         ../include/vlc_access.h \
26         ../include/vlc_actions.h \
27         ../include/vlc_addons.h \
28         ../include/vlc_aout.h \
29         ../include/vlc_aout_volume.h \
30         ../include/vlc_arrays.h \
31         ../include/vlc_atomic.h \
32         ../include/vlc_avcodec.h \
33         ../include/vlc_bits.h \
34         ../include/vlc_block.h \
35         ../include/vlc_block_helper.h \
36         ../include/vlc_boxes.h \
37         ../include/vlc_charset.h \
38         ../include/vlc_codec.h \
39         ../include/vlc_common.h \
40         ../include/vlc_config.h \
41         ../include/vlc_config_cat.h \
42         ../include/vlc_configuration.h \
43         ../include/vlc_cpu.h \
44         ../include/vlc_cxx_helpers.hpp \
45         ../include/vlc_decoder.h \
46         ../include/vlc_demux.h \
47         ../include/vlc_dialog.h \
48         ../include/vlc_epg.h \
49         ../include/vlc_es.h \
50         ../include/vlc_es_out.h \
51         ../include/vlc_events.h \
52         ../include/vlc_executor.h \
53         ../include/vlc_filter.h \
54         ../include/vlc_fingerprinter.h \
55         ../include/vlc_fourcc.h \
56         ../include/vlc_fs.h \
57         ../include/vlc_gcrypt.h \
58         ../include/vlc_hash.h \
59         ../include/vlc_http.h \
60         ../include/vlc_httpd.h \
61         ../include/vlc_image.h \
62         ../include/vlc_inhibit.h \
63         ../include/vlc_input.h \
64         ../include/vlc_input_item.h \
65         ../include/vlc_interface.h \
66         ../include/vlc_interrupt.h \
67         ../include/vlc_keystore.h \
68         ../include/vlc_list.h \
69         ../include/vlc_media_library.h \
70         ../include/vlc_media_source.h \
71         ../include/vlc_memstream.h \
72         ../include/vlc_messages.h \
73         ../include/vlc_meta.h \
74         ../include/vlc_meta_fetcher.h \
75         ../include/vlc_mime.h \
76         ../include/vlc_modules.h \
77         ../include/vlc_mouse.h \
78         ../include/vlc_network.h \
79         ../include/vlc_objects.h \
80         ../include/vlc_opengl.h \
81         ../include/vlc_picture.h \
82         ../include/vlc_picture_fifo.h \
83         ../include/vlc_picture_pool.h \
84         ../include/vlc_player.h \
85         ../include/vlc_playlist.h \
86         ../include/vlc_playlist_export.h \
87         ../include/vlc_plugin.h \
88         ../include/vlc_probe.h \
89         ../include/vlc_queue.h \
90         ../include/vlc_rand.h \
91         ../include/vlc_renderer_discovery.h \
92         ../include/vlc_services_discovery.h \
93         ../include/vlc_sort.h \
94         ../include/vlc_sout.h \
95         ../include/vlc_spawn.h \
96         ../include/vlc_spu.h \
97         ../include/vlc_stream.h \
98         ../include/vlc_stream_extractor.h \
99         ../include/vlc_strings.h \
100         ../include/vlc_subpicture.h \
101         ../include/vlc_text_style.h \
102         ../include/vlc_threads.h \
103         ../include/vlc_thumbnailer.h \
104         ../include/vlc_tick.h \
105         ../include/vlc_timestamp_helper.h \
106         ../include/vlc_tls.h \
107         ../include/vlc_url.h \
108         ../include/vlc_variables.h \
109         ../include/vlc_vector.h \
110         ../include/vlc_video_splitter.h \
111         ../include/vlc_viewpoint.h \
112         ../include/vlc_vlm.h \
113         ../include/vlc_vout.h \
114         ../include/vlc_vout_display.h \
115         ../include/vlc_vout_osd.h \
116         ../include/vlc_vout_window.h \
117         ../include/vlc_xlib.h \
118         ../include/vlc_xml.h \
119         $(NULL)
120 nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
121
122 noinst_HEADERS = \
123         ../include/vlc_codecs.h \
124         ../include/vlc_extensions.h \
125         ../include/vlc_fixups.h \
126         ../include/vlc_intf_strings.h \
127         ../include/vlc_iso_lang.h \
128         ../include/vlc_pgpkey.h \
129         ../include/vlc_update.h \
130         $(NULL)
131
132 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
133         $(AM_V_at)rm -f -- "$@.tmp"
134         $(AM_V_at)mkdir -p -- ../include
135         $(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
136         echo "static const char psz_license[] =" && \
137         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
138         echo ";" && \
139         echo "static const char psz_thanks[] =" && \
140         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
141                 "$(top_srcdir)/THANKS" && \
142         echo ";" && \
143         echo "static const char psz_authors[] =" && \
144         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
145                 "$(top_srcdir)/AUTHORS" && \
146         echo ";") >> "$@.tmp"
147         $(AM_V_at)mv -f -- "$@.tmp" "$@"
148
149 ###############################################################################
150 # pkg-config integration
151 ###############################################################################
152
153 pkgconfigdir = $(libdir)/pkgconfig
154 pkgconfig_DATA = vlc-plugin.pc
155 CLEANFILES += $(pkgconfig_DATA)
156
157 vlc-plugin.pc: vlc-plugin.pc.in $(top_builddir)/config.status
158         $(AM_V_GEN)cd "$(top_builddir)" && \
159         $(SHELL) ./config.status --file="src/$@"
160
161 ##############################################################################
162 # Windows resource files
163 ##############################################################################
164
165 if HAVE_WIN32
166 noinst_DATA = libvlc_win32_rc.rc
167 endif
168 EXTRA_DIST += libvlc_win32_rc.rc.in
169
170 libvlc_win32_rc.rc: libvlc_win32_rc.rc.in $(top_builddir)/config.status
171         $(AM_V_GEN)cd "$(top_builddir)" && \
172         $(SHELL) ./config.status --file="src/$@"
173
174 ###############################################################################
175 # Building libvlc
176 ###############################################################################
177
178 lib_LTLIBRARIES = libvlccore.la
179
180 AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
181         -DMODULE_STRING=\"core\" \
182         -DSYSDATADIR=\"$(datadir)\" \
183         -DLIBDIR=\"$(libdir)\" \
184         -DLIBEXECDIR=\"$(libexecdir)\" \
185         -DLOCALEDIR=\"$(localedir)\" \
186         -DPKGDATADIR=\"$(pkgdatadir)\" \
187         -DPKGLIBDIR=\"$(pkglibdir)\" \
188         -DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
189 AM_CFLAGS = $(CFLAGS_libvlccore)
190 if HAVE_DYNAMIC_PLUGINS
191 AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
192 endif
193 if HAVE_DBUS
194 AM_CPPFLAGS += -DHAVE_DBUS
195 AM_CFLAGS += $(DBUS_CFLAGS)
196 endif
197
198 libvlccore_la_SOURCES = \
199         libvlc.c \
200         libvlc.h \
201         libvlc-module.c \
202         missing.c \
203         revision.c \
204         version.c \
205         config/configuration.h \
206         config/core.c \
207         config/chain.c \
208         config/file.c \
209         config/help.c \
210         config/intf.c \
211         config/cmdline.c \
212         config/getopt.c \
213         config/vlc_getopt.h \
214         extras/libc.c \
215         media_source/media_source.c \
216         media_source/media_source.h \
217         media_source/media_tree.c \
218         media_source/media_tree.h \
219         modules/modules.h \
220         modules/modules.c \
221         modules/bank.c \
222         modules/cache.c \
223         modules/entry.c \
224         modules/textdomain.c \
225         interface/dialog.c \
226         interface/interface.c \
227         playlist/content.c \
228         playlist/content.h \
229         playlist/control.c \
230         playlist/control.h \
231         playlist/export.c \
232         playlist/item.c \
233         playlist/item.h \
234         playlist/notify.c \
235         playlist/notify.h \
236         playlist/player.c \
237         playlist/player.h \
238         playlist/playlist.c \
239         playlist/playlist.h \
240         playlist/preparse.c \
241         playlist/preparse.h \
242         playlist/randomizer.c \
243         playlist/randomizer.h \
244         playlist/request.c \
245         playlist/shuffle.c \
246         playlist/sort.c \
247         preparser/art.c \
248         preparser/art.h \
249         preparser/fetcher.c \
250         preparser/fetcher.h \
251         preparser/preparser.c \
252         preparser/preparser.h \
253         input/item.c \
254         input/access.c \
255         clock/clock_internal.c \
256         clock/input_clock.c \
257         clock/clock.c \
258         input/decoder.c \
259         input/decoder_helpers.c \
260         input/demux.c \
261         input/demux_chained.c \
262         input/es_out.c \
263         input/es_out_source.c \
264         input/es_out_timeshift.c \
265         input/input.c \
266         input/info.h \
267         input/meta.c \
268         input/attachment.c \
269         player/player.c \
270         player/player.h \
271         player/input.c \
272         player/timer.c \
273         player/track.c \
274         player/title.c \
275         player/aout.c \
276         player/vout.c \
277         player/osd.c \
278         player/medialib.c \
279         player/metadata.c \
280         clock/input_clock.h \
281         clock/clock.h \
282         clock/clock_internal.h \
283         input/decoder.h \
284         input/demux.h \
285         input/es_out.h \
286         input/event.h \
287         input/item.h \
288         input/mrl_helpers.h \
289         input/stream.h \
290         input/input_internal.h \
291         input/input_interface.h \
292         input/vlm_internal.h \
293         input/vlm_event.h \
294         input/resource.h \
295         input/resource.c \
296         input/services_discovery.c \
297         input/stats.c \
298         input/stream.c \
299         input/stream_fifo.c \
300         input/stream_extractor.c \
301         input/stream_filter.c \
302         input/stream_memory.c \
303         input/subtitles.c \
304         input/thumbnailer.c \
305         input/var.c \
306         audio_output/aout_internal.h \
307         audio_output/common.c \
308         audio_output/dec.c \
309         audio_output/filters.c \
310         audio_output/meter.c \
311         audio_output/output.c \
312         audio_output/volume.c \
313         video_output/chrono.h \
314         video_output/control.c \
315         video_output/control.h \
316         video_output/display.c \
317         video_output/display.h \
318         video_output/inhibit.c \
319         video_output/inhibit.h \
320         video_output/interlacing.c \
321         video_output/snapshot.c \
322         video_output/snapshot.h \
323         video_output/statistic.h \
324         video_output/video_output.c \
325         video_output/video_text.c \
326         video_output/video_epg.c \
327         video_output/video_widgets.c \
328         video_output/vout_subpictures.c \
329         video_output/vout_spuregion_helper.h \
330         video_output/vout_wrapper.h \
331         video_output/window.c \
332         video_output/window.h \
333         video_output/opengl.c \
334         video_output/vout_intf.c \
335         video_output/vout_internal.h \
336         video_output/vout_private.h \
337         video_output/vout_wrapper.c \
338         network/getaddrinfo.c \
339         network/http_auth.c \
340         network/httpd.c \
341         network/io.c \
342         network/tcp.c \
343         network/udp.c \
344         network/rootbind.c \
345         network/stream.c \
346         network/tls.c \
347         text/charset.c \
348         text/memstream.c \
349         text/strings.c \
350         text/unicode.c \
351         text/url.c \
352         text/filesystem.c \
353         text/iso_lang.c \
354         text/iso-639_def.h \
355         misc/actions.c \
356         misc/executor.c \
357         misc/md5.c \
358         misc/probe.c \
359         misc/rand.c \
360         misc/mtime.c \
361         misc/block.c \
362         misc/fifo.c \
363         misc/fourcc.c \
364         misc/fourcc_list.h \
365         misc/es_format.c \
366         misc/picture.c \
367         misc/picture.h \
368         misc/picture_fifo.c \
369         misc/picture_pool.c \
370         misc/interrupt.h \
371         misc/interrupt.c \
372         misc/keystore.c \
373         misc/renderer_discovery.c \
374         misc/threads.c \
375         misc/cpu.c \
376         misc/epg.c \
377         misc/exit.c \
378         misc/events.c \
379         misc/image.c \
380         misc/messages.c \
381         misc/mime.c \
382         misc/objects.c \
383         misc/objres.c \
384         misc/queue.c \
385         misc/variables.h \
386         misc/variables.c \
387         misc/xml.c \
388         misc/addons.c \
389         misc/filter.c \
390         misc/filter_chain.c \
391         misc/httpcookies.c \
392         misc/fingerprinter.c \
393         misc/text_style.c \
394         misc/sort.c \
395         misc/subpicture.c \
396         misc/subpicture.h \
397         misc/medialibrary.c \
398         misc/viewpoint.c
399 libvlccore_la_LIBADD = $(LIBS_libvlccore) \
400         ../compat/libcompat.la \
401         $(LTLIBINTL) $(LTLIBICONV) \
402         $(IDN_LIBS) $(SOCKET_LIBS) $(ATOMIC_LIB) $(LIBRT) $(LIBDL) $(LIBM)
403
404 if HAVE_WIN32
405 libvlccore_la_SOURCES += \
406         win32/error.c \
407         win32/filesystem.c \
408         win32/netconf.c \
409         win32/plugin.c \
410         win32/rand.c \
411         win32/specific.c \
412         win32/thread.c \
413         win32/winsock.c
414 if HAVE_WINSTORE
415 libvlccore_la_SOURCES += posix/timer.c win32/dirs-uap.c
416 else
417 libvlccore_la_SOURCES += win32/timer.c win32/dirs.c
418 endif
419 endif
420
421 if HAVE_OS2
422 libvlccore_la_SOURCES += \
423         os2/dirs.c \
424         darwin/error.c \
425         os2/filesystem.c \
426         os2/getaddrinfo.c \
427         os2/netconf.c \
428         os2/plugin.c \
429         os2/specific.c \
430         os2/rand.c \
431         os2/thread.c
432 endif
433
434 if HAVE_NACL
435 libvlccore_la_SOURCES += \
436         android/error.c \
437         posix/dirs.c \
438         posix/filesystem.c \
439         posix/netconf.c \
440         posix/rand.c \
441         posix/specific.c \
442         posix/timer.c
443 endif
444
445 if HAVE_DARWIN
446 libvlccore_la_SOURCES += \
447         darwin/error.c \
448         darwin/specific.c
449 libvlccore_objc_la_SOURCES = \
450         darwin/dirs.m \
451         darwin/netconf.m
452 noinst_LTLIBRARIES = libvlccore_objc.la
453 endif
454
455 if HAVE_FREEBSD
456 libvlccore_la_SOURCES += \
457         freebsd/thread.c
458 endif
459
460 if HAVE_LINUX
461 libvlccore_la_SOURCES += \
462         linux/cpu.c \
463         linux/dirs.c \
464         linux/thread.c
465 if !HAVE_ANDROID
466 libvlccore_la_SOURCES += \
467         linux/filesystem.c
468 else
469 libvlccore_la_SOURCES += \
470         android/error.c \
471         android/specific.c \
472         android/thread.c
473 endif
474 endif
475
476 if !HAVE_WIN32
477 if !HAVE_OS2
478 if !HAVE_NACL
479 libvlccore_la_SOURCES += \
480         posix/filesystem.c \
481         posix/plugin.c \
482         posix/rand.c \
483         posix/timer.c
484 if !HAVE_LINUX
485 libvlccore_la_SOURCES += posix/wait.c
486 endif
487 if !HAVE_ANDROID
488 libvlccore_la_SOURCES += \
489         posix/sort.c \
490         posix/thread.c
491 if !HAVE_DARWIN
492 libvlccore_la_SOURCES += \
493         posix/dirs.c \
494         posix/error.c \
495         posix/netconf.c \
496         posix/picture.c \
497         posix/spawn.c \
498         posix/specific.c
499 if HAVE_LIBANL
500 libvlccore_la_SOURCES += \
501         linux/getaddrinfo.c
502 libvlccore_la_LIBADD += -lanl
503 else
504 libvlccore_la_SOURCES += \
505         posix/getaddrinfo.c
506 endif
507 endif
508 endif
509 endif
510 endif
511 endif
512
513 if ENABLE_SOUT
514 libvlccore_la_SOURCES += \
515         stream_output/sap.c \
516         stream_output/stream_output.c stream_output/stream_output.h
517 if ENABLE_VLM
518 libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
519 endif
520 endif
521
522 if UPDATE_CHECK
523 libvlccore_la_SOURCES += \
524         misc/update.h misc/update.c \
525         misc/update_crypto.c
526 AM_CPPFLAGS += -DUPDATE_CHECK
527 AM_CFLAGS += $(GCRYPT_CFLAGS)
528 libvlccore_la_LIBADD += $(GCRYPT_LIBS)
529 endif
530
531 libvlccore_la_LDFLAGS = \
532         $(LDFLAGS_libvlccore) \
533         -no-undefined \
534         -export-symbols $(srcdir)/libvlccore.sym \
535         -version-info 9:0:0
536 libvlccore_la_DEPENDENCIES = libvlccore.sym
537 if HAVE_WIN32
538 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
539 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
540 endif
541 if HAVE_OS2
542 libvlccore_la_LDFLAGS += -avoid-version
543 endif
544 if HAVE_DBUS
545 libvlccore_la_LIBADD += $(DBUS_LIBS)
546 endif
547 if HAVE_DARWIN
548 $(libvlccore_la_OBJECTS): libvlccore_objc.la
549 libvlccore_objc_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
550 libvlccore_objc_la_LDFLAGS = -static
551 libvlccore_la_LIBADD += libvlccore_objc.la
552 libvlccore_la_LDFLAGS +=  -Wl,-framework,Foundation -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib -Wl,-U,_vlc_static_modules
553 endif
554
555 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc $(top_srcdir)/extras/package/win32/libvlc.dll.manifest
556         $(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
557
558 # FourCC tables
559 BUILT_SOURCES += fourcc_tables.h
560 EXTRA_DIST += misc/fourcc_gen.c
561 MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
562
563 fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
564         $(AM_V_at)rm -f -- $@
565         $(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<
566
567 fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
568         $(AM_V_at)rm -f -- $@.tmp
569         $(AM_V_GEN)$(builddir)/fourcc_gen$(BUILDEXEEXT) > $@.tmp
570         $(AM_V_at)mv -f -- $@.tmp $@
571
572 # Unit/regression tests
573 #
574 check_PROGRAMS = \
575         test_block \
576         test_dictionary \
577         test_executor \
578         test_i18n_atof \
579         test_interrupt \
580         test_list \
581         test_md5 \
582         test_picture_pool \
583         test_sort \
584         test_timer \
585         test_url \
586         test_utf8 \
587         test_xmlent \
588         test_headers \
589         test_mrl_helpers \
590         test_arrays \
591         test_vector \
592         test_shared_data_ptr \
593         test_playlist \
594         test_randomizer \
595         test_media_source \
596         test_extensions \
597         test_thread
598
599 TESTS = $(check_PROGRAMS) check_symbols
600
601 test_block_SOURCES = test/block_test.c
602 test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
603 test_block_DEPENDENCIES =
604
605 test_dictionary_SOURCES = test/dictionary.c
606 test_executor_SOURCES = test/executor.c
607 test_i18n_atof_SOURCES = test/i18n_atof.c
608 test_interrupt_SOURCES = test/interrupt.c
609 test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore)
610 test_list_SOURCES = test/list.c
611 test_md5_SOURCES = test/md5.c
612 test_picture_pool_SOURCES = test/picture_pool.c
613 test_sort_SOURCES = test/sort.c
614 test_timer_SOURCES = test/timer.c
615 test_url_SOURCES = test/url.c
616 test_utf8_SOURCES = test/utf8.c
617 test_xmlent_SOURCES = test/xmlent.c
618 test_headers_SOURCES = test/headers.c
619 test_mrl_helpers_SOURCES = test/mrl_helpers.c
620 test_arrays_SOURCES = test/arrays.c
621 test_vector_SOURCES = test/vector.c
622 test_shared_data_ptr_SOURCES = test/shared_data_ptr.cpp
623 test_extensions_SOURCES = test/extensions.c
624 test_playlist_SOURCES = playlist/test.c \
625         playlist/content.c \
626         playlist/control.c \
627         playlist/item.c \
628         playlist/notify.c \
629         playlist/player.c \
630         playlist/playlist.c \
631         playlist/preparse.c \
632         playlist/randomizer.c \
633         playlist/request.c \
634         playlist/shuffle.c \
635         playlist/sort.c
636 test_playlist_CFLAGS = -DTEST_PLAYLIST
637 test_randomizer_SOURCES = playlist/randomizer.c
638 test_randomizer_CFLAGS = -DTEST_RANDOMIZER
639 test_media_source_LDADD = $(LDADD) $(LIBS_libvlccore)
640 test_media_source_CFLAGS = -DTEST_MEDIA_SOURCE
641 test_media_source_SOURCES = media_source/test.c \
642         media_source/media_source.c \
643         media_source/media_tree.c
644 test_thread_SOURCES = test/thread.c
645
646 AM_LDFLAGS = -no-install
647 LDADD = libvlccore.la \
648         ../compat/libcompat.la
649
650 ###############################################################################
651 # GIT revision
652 ###############################################################################
653
654 BUILT_SOURCES += stamp-revision
655 MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
656
657 $(srcdir)/revision.c: $(srcdir)/revision.txt
658         $(AM_V_at)rm -f -- $@
659         $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
660                 > $@
661
662 $(srcdir)/revision.txt:
663         $(AM_V_at)$(MAKE) stamp-revision
664         $(AM_V_GEN)touch $@
665
666 stamp-revision:
667         $(AM_V_at)rm -f -- revision.tmp
668         $(AM_V_GEN)if ! git \
669                         -C "$(top_srcdir)" describe \
670                         --tags --long --match '?.*.*' --always; then \
671                 cat $(srcdir)/revision.txt ; \
672         fi > revision.tmp
673         $(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
674                 rm -f -- revision.tmp; \
675         else \
676                 mv -f -- revision.tmp $(srcdir)/revision.txt; \
677         fi
678 #2>&1
679
680 ###############################################################################
681 # Unit/regression test
682 ###############################################################################
683
684 dist_check_SCRIPTS = check_headers check_symbols
685
686 check-local:
687         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
688         do \
689                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
690                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
691                 then \
692                         echo "Header $$h not included in test/headers.c!"; \
693                         exit 1; \
694                 fi ; \
695         done
696         $(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
697
698 FORCE:
699         @echo "Generated source cannot be phony. Go away." >&2
700         @exit 1
701
702 .PHONY: FORCE