Initial release
[adaptation/ap_samsung/gst-plugins-s5pc2xx.git] / 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           if ! (file $$each | grep CRLF >/dev/null) ; then \
28             echo $$each must be fixed to have CRLF line endings ; \
29             fail=1; \
30           fi ; \
31         done ; \
32         exit $$fail
33
34 # make sure all symbols we export on linux are defined in the win32 .def too
35 # (don't care about other unixes for now, it's enough if it works on one of
36 # the linux build bots; we assume .so )
37 check-exports:
38         fail=0 ; \
39         for l in $(win32defs); do \
40           libbase=`basename "$$l" ".def"`; \
41           libso=`find "$(top_builddir)" -name "$$libbase-@GST_MAJORMINOR@.so"`; \
42           libdef="$(top_srcdir)/win32/common/$$libbase.def"; \
43           if test "x$$libso" != "x"; then \
44             echo Checking symbols in $$libso; \
45             if ! ($(top_srcdir)/common/check-exports $$libdef $$libso) ; then \
46               fail=1; \
47             fi; \
48           fi; \
49         done
50
51
52 dist-hook: check-exports win32-check-crlf
53
54