Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
scripts/gen-sym-files.sh | 15 +++++++++++++++
scripts/meson.build | 1 +
src/Makefile.am | 14 --------------
3 files changed, 16 insertions(+), 14 deletions(-)
create mode 100755 scripts/gen-sym-files.sh
diff --git a/scripts/gen-sym-files.sh b/scripts/gen-sym-files.sh
new file mode 100755
index 00000000000..913a684d064
--- /dev/null
+++ b/scripts/gen-sym-files.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+version="$1"
+shift
+public="$1"
+shift
+private="$@"
+
+printf "# WARNING: generated from the following files:\n\n"
+cat $public
+printf "\n\n# Private symbols\n\n"
+printf "$version {\n\n"
+printf "global:\n\n"
+cat $private
+printf "\n\nlocal:\n*;\n\n};"
diff --git a/scripts/meson.build b/scripts/meson.build
index aa8c872a814..0d2e48c3a36 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -12,6 +12,7 @@ scripts = [
'dtrace2systemtap.py',
'esx_vi_generator.py',
'gen-def-files.sh',
+ 'gen-sym-files.sh',
'genaclperms.py',
'genpolkit.py',
'gensystemtap.py',
diff --git a/src/Makefile.am b/src/Makefile.am
index b98169f27e7..b0990e94ec1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -288,20 +288,6 @@ else ! WITH_LIBSSH
SYM_FILES += $(srcdir)/libvirt_libssh.syms
endif ! WITH_LIBSSH
-libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
- $(ACCESS_DRIVER_SYM_FILES) \
- $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-tmp $@ ; \
- printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp
&& \
- cat $(srcdir)/libvirt_public.syms >>$@-tmp && \
- printf '\n\n# Private symbols\n\n' >>$@-tmp && \
- printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \
- printf 'global:\n\n' >>$@-tmp && \
- cat $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) >>$@-tmp && \
- printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
- chmod a-w $@-tmp && \
- mv $@-tmp libvirt.syms
-
# Empty source list - it merely links a bunch of convenience libs together
libvirt_la_SOURCES =
libvirt_la_LDFLAGS = \
--
2.26.2