[goffice] win32: fix generation of goffice.def



commit b00b294b807b4af4320b2224b171631aca9482ec
Author: Morten Welinder <terra gnome org>
Date:   Sun Sep 29 10:29:17 2013 -0400

    win32: fix generation of goffice.def

 goffice-win32.mk    |   30 ------------------------------
 goffice.mk          |    2 --
 goffice/Makefile.am |   22 +++++++++-------------
 3 files changed, 9 insertions(+), 45 deletions(-)
---
diff --git a/goffice.mk b/goffice.mk
index 6b8b0a7..d25e430 100644
--- a/goffice.mk
+++ b/goffice.mk
@@ -7,5 +7,3 @@ AM_CPPFLAGS = \
 
 GOFFICE_PLUGIN_FLAGS = $(GOFFICE_PLUGIN_LDFLAGS)
 goffice_include_dir = $(includedir)/libgoffice- GOFFICE_API_VER@/goffice
-
-include $(top_srcdir)/goffice-win32.mk
diff --git a/goffice/Makefile.am b/goffice/Makefile.am
index 46c3933..1b40660 100644
--- a/goffice/Makefile.am
+++ b/goffice/Makefile.am
@@ -536,20 +536,16 @@ if WITH_WIN32
 LIB_PUBLIC_HDRS = $(libgoffice_ GOFFICE_API_VER@_la_HEADERS)
 
 
-if WITH_GTK
-GTK_DEFS = gtk/local.def drawing/local.def component/local.def \
-       canvas/local.def
-else
-GTK_DEFS =
-endif
-
-goffice.def: local.def app/local.def \
-       data/local.def graph/local.def \
-       math/local.def \
-       ms-compat/local.def utils/local.def \
-       $(GTK_DEFS)
+goffice.def: $(app_HEADERS) $(top_srcdir)/tools/dumpdef.pl
+       cat $(top_builddir)/goffice/goffice-config.h $(app_HEADERS) | \
+       sed -e 's/^#[   ]*include[      ]\+.*$$//g' | \
+       $(CPP) $(AM_CPPFLAGS) "-DGO_VAR_DECL=__declspec(dllexport)" -P - > xgen-localdef.1
+       @PERL@ $(top_srcdir)/tools/dumpdef.pl \
+               xgen-localdef.1 > xgen-localdef.2
+       (cmp -s xgen-localdef.2 local.def || cp xgen-localdef.2 local.def)
+       rm -f xgen-localdef.1 xgen-localdef.2
        echo EXPORTS > $@ && \
-       cat $^ | sort >> $@
+       cat local.def | sort >> $@
 
 if HAVE_LIBEXE
 goffice_mslibdir = $(DESTDIR)$(libdir)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]