win32.mak: Move common win32 Makefile foo into this new file.
[platform/upstream/gst-common.git] / win32.mak
1 # various tests to make sure we dist the win32 stuff (for MSVC builds) right
2
3 win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
4
5 # wildcard is apparently not portable to other makes
6 win32defs = $(shell find $(top_srcdir)/win32/common -name '*.def')
7
8 win32-debug:
9         @echo; \
10         echo win32     = $(win32); \
11         echo; \
12         echo win32defs = $(win32defs); \
13         echo
14
15 # FIXME: this doesn't seem to work right yet
16 win32-check-crlf:
17         fail=0 ; \
18         for each in $(win32); do \
19           if ! (file $$each | grep CRLF >/dev/null) ; then \
20             echo $$each must be fixed to have CRLF line endings ; \
21             fail=1; \
22           fi ; \
23         done ; \
24         exit $$fail
25
26 # make sure all symbols we export on linux are defined in the win32 .def too
27 # (don't care about other unixes for now, it's enough if it works on one of
28 # the linux build bots; we assume .so )
29 check-exports:
30         fail=0 ; \
31         for l in $(win32defs); do \
32           libbase=`basename "$$l" ".def"`; \
33           libso=`find "$(top_builddir)" -name "$$libbase-0.10.so"`; \
34           libdef="$(top_srcdir)/win32/common/$$libbase.def"; \
35           if test "x$$libso" != "x"; then \
36             echo Checking symbols in $$libso; \
37             if ! ($(top_srcdir)/common/check-exports $$libdef $$libso) ; then \
38               fail=1; \
39             fi; \
40           fi; \
41         done
42
43
44 dist-hook: check-exports
45
46