1 # various tests to make sure we dist the win32 stuff (for MSVC builds) right
3 # the MANIFEST contains all win32 related files that should be disted
4 win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
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')
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')
16 echo win32 = $(win32); \
18 echo win32defs = $(win32defs); \
20 echo win32crlf = $(win32crlf); \
24 @echo Checking win32 files for CR LF line endings ...; \
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 ; \
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 )
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 \
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 '-----------------------------------------------------------'; \
59 # complain about nonportable 64-bit printf format strings (%lld, %llu etc.)
60 check-nonportable-int64-print-format:
62 loc=`find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[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]'; \
70 dist-hook: check-exports win32-check-crlf