"Initial commit to Gerrit"
[profile/ivi/libgsf.git] / gsf.mk
1 if WITH_WIN32
2
3 noinst_DATA = lib.def
4
5 lib.def: stamp-lib.def
6         @true
7
8 stamp-lib.def: $(LIB_PUBLIC_HDRS) Makefile $(top_srcdir)/dumpdef.pl
9         hdrs='$(LIB_PUBLIC_HDRS)'; \
10         hdrs_list=''; \
11         for hdr in $$hdrs; do \
12           if test -f $(srcdir)/$$hdr; then \
13             hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \
14           else \
15             hdrs_list="$$hdrs_list $$hdr"; \
16           fi; \
17         done; \
18         cat $(top_builddir)/gsf-config.h $$hdrs_list | \
19                 sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \
20                 $(CPP) $(AM_CPPFLAGS) $(CPP_CFLAGS) -P - > xgen-libdef.1 && \
21         echo EXPORTS> xgen-libdef.2 && \
22         perl $(top_srcdir)/dumpdef.pl \
23                 xgen-libdef.1 >> xgen-libdef.2 \
24         && (cmp -s xgen-libdef.2 lib.def || \
25                 cp xgen-libdef.2 lib.def) \
26         && rm -f xgen-libdef.1 xgen-libdef.2 \
27         && echo timestamp > $@  
28
29 CLEANFILES = lib.def stamp-lib.def
30
31 endif