]> xenbits.xensource.com Git - libvirt.git/commitdiff
Generate libvirt_qemu.def from libvirt_qemu.syms for MinGW builds
authorMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 12 Aug 2010 21:43:16 +0000 (23:43 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 14 Aug 2010 17:19:24 +0000 (19:19 +0200)
configure.ac
src/.gitignore
src/Makefile.am

index a2dcfa34f3d61eeb0a349837a10b30db08d5df2f..39686175f20b23335cc293139ec45b36e114a12e 100644 (file)
@@ -1873,6 +1873,7 @@ case "$host" in
     # Also set the symbol file to .def, so src/Makefile generates libvirt.def
     # from libvirt.syms and passes libvirt.def instead of libvirt.syms to the linker
     LIBVIRT_SYMBOL_FILE=libvirt.def
+    LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def
     # mingw's ld has the --version-script parameter, but it requires a .def file
     # instead to work properly, therefore clear --version-script here and use
     # -Wl, to pass the .def file to the linker
index 5d114c9814796dc6bda25d879e19566c34edc0bc..7ea8d8909a367f6c231a590ba405d0b0402c3e95 100644 (file)
@@ -11,6 +11,7 @@ libvirt_parthelper
 libvirt_lxc
 libvirt.def
 libvirt.syms
+libvirt_qemu.def
 *.i
 *.s
 virt-aa-helper
index a66eb2a29e04befafcef34cfe0005a7ff7d590cc..b3216579c7da231230fe1ad8627a242f436ef2c2 100644 (file)
@@ -1010,7 +1010,7 @@ EXTRA_DIST += \
   libvirt_daemon.syms          \
   libvirt_nwfilter.syms
 
-BUILT_SOURCES += libvirt.syms libvirt.def
+BUILT_SOURCES += libvirt.syms libvirt.def libvirt_qemu.def
 
 libvirt.syms: libvirt_public.syms $(USED_SYM_FILES)
        $(AM_V_GEN)rm -f $@-tmp $@ ; \
@@ -1033,6 +1033,13 @@ libvirt.def: libvirt.syms
        chmod a-w $@-tmp && \
        mv $@-tmp libvirt.def
 
+libvirt_qemu.def: $(srcdir)/libvirt_qemu.syms
+       $(AM_V_GEN)rm -f -- $@-tmp $@ ; \
+       printf 'EXPORTS\n' > $@-tmp && \
+       sed -e '/^$$/d; /#/d; /:/d; /\}/d; /\*/d; /LIBVIRT_/d; s/[ \t]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
+       chmod a-w $@-tmp && \
+       mv $@-tmp libvirt_qemu.def
+
 # Empty source list - it merely links a bunch of convenience libs together
 libvirt_la_SOURCES =
 libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \