diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in index 70edcf91d..219eeca9d 100644 --- a/libdm/make.tmpl.in +++ b/libdm/make.tmpl.in @@ -509,20 +509,21 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor ifeq (,$(firstword $(EXPORTED_SYMBOLS))) $(Q) set -e; (echo "Base {"; echo " global:";\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\ + echo " local:"; echo " *;";\ echo "};";\ - echo "Local {"; echo " local:"; echo " *;"; echo "};";\ ) > $@ else $(Q) set -e;\ R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\ test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\ - ( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\ + LAST=;\ + for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\ echo "$${i##*.} {"; echo " global:";\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\ - echo "};";\ - done;\ - echo "Local {"; echo " local:"; echo " *;"; echo "};";\ - ) > $@ + if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\ + echo "}$$LAST;";\ + LAST=" $${i##*.}";\ + done > $@ endif ifeq ("@USE_TRACKING@","yes") diff --git a/make.tmpl.in b/make.tmpl.in index 99998f9fd..b28ef6f8f 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -551,20 +551,21 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor ifeq (,$(firstword $(EXPORTED_SYMBOLS))) $(Q) set -e; (echo "Base {"; echo " global:";\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\ + echo " local:"; echo " *;";\ echo "};";\ - echo "Local {"; echo " local:"; echo " *;"; echo "};";\ ) > $@ else $(Q) set -e;\ R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\ test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\ - ( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\ + LAST=;\ + for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\ echo "$${i##*.} {"; echo " global:";\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\ - echo "};";\ - done;\ - echo "Local {"; echo " local:"; echo " *;"; echo "};";\ - ) > $@ + if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\ + echo "}$$LAST;";\ + LAST=" $${i##*.}";\ + done > $@ endif ifeq ("$(USE_TRACKING)","yes")