Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / common / win32.mak
1 # various tests to make sure we dist the win32 stuff (for MSVC builds) right
2
3 # the MANIFEST contains all win32 related files that should be disted
4 win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
5
6 # wildcard is apparently not portable to other makes, hence the use of find
7 # these are library .def files with the symbols to export
8 win32defs = $(shell find $(top_srcdir)/win32/common -name '*.def')
9
10 # wildcard is apparently not portable to other makes, hence the use of find
11 # these are files that need to be disted with CRLF line endings:
12 win32crlf = $(shell find $(top_srcdir)/win32 -name '*.dsw' -o -name '*.dsp')
13
14 win32-debug:
15         @echo; \
16         echo win32     = $(win32); \
17         echo; \
18         echo win32defs = $(win32defs); \
19         echo; \
20         echo win32crlf = $(win32crlf); \
21         echo
22
23 win32-check-crlf:
24         @echo Checking win32 files for CR LF line endings ...; \
25         fail=0 ; \
26         for each in $(win32crlf) ; do \
27           result=`perl -e 'print grep(/\r\n/,<>)' "$$each" | wc -l`; \
28           if test "$$result" = 0 ; then \
29             echo $$each must be fixed to have CRLF line endings ; \
30             fail=1; \
31           fi ; \
32         done ; \
33         exit $$fail
34
35 # make sure all symbols we export on linux are defined in the win32 .def too
36 # (don't care about other unixes for now, it's enough if it works on one of
37 # the linux build bots; we assume .so )
38 check-exports:
39         @fail=0 ; \
40         for l in $(win32defs); do \
41           libbase=`basename "$$l" ".def"`; \
42           libso=`find "$(top_builddir)" -name "$$libbase-@GST_MAJORMINOR@.so" | grep -v /_build/ | head -n1`; \
43           libdef="$(top_srcdir)/win32/common/$$libbase.def"; \
44           if test "x$$libso" != "x"; then \
45             echo Checking symbols in $$libso; \
46             if ! ($(top_srcdir)/common/check-exports $$libdef $$libso) ; then \
47               fail=1; \
48             fi; \
49           fi; \
50         done ; \
51         if test $$fail != 0; then \
52           echo '-----------------------------------------------------------'; \
53           echo 'Run this to update the .def files:'; \
54           echo 'make check-exports 2>&1 | patch -p1'; \
55           echo '-----------------------------------------------------------'; \
56         fi; \
57         exit $$fail
58
59 # complain about nonportable printf format strings (%lld, %llu, %zu etc.)
60 check-nonportable-print-format:
61         @fail=0 ; \
62         loc=`find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'`; \
63         if test "x$$loc" != "x"; then \
64           echo "Please fix the following print format strings:" ; \
65           find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'; \
66           fail=1; \
67         fi; \
68         exit $$fail
69
70 dist-hook: check-exports win32-check-crlf
71
72