diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-15 15:29:46 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-15 16:48:22 +0200 |
commit | 797c18d543947f4c2777b4dcf3ceff57cb55352b (patch) | |
tree | a4ec6906f1b67954f4a2b9503abcd264292ef9da /make.tmpl.in | |
parent | 3f10dfd6c79e05de89a9ef09bd92239ec1681b13 (diff) | |
download | lvm2-797c18d543947f4c2777b4dcf3ceff57cb55352b.tar.gz |
libdm: new dm_task_get_info with internal_suspend
Introduce new implmentation of dm_task_get_info() function
with support for reading internal_suspend.
.
This time it is done in a 'versioned' way.
We keep the old fashion dm_task_get_info(Base) to implement
the old behavior of 1.02.95 libdm code.
libdm version 1.02.96 introduced 'macro' wrapper
dm_task_get_info_with_deferred_remove with new implementation
of dm_task_get_info() - we cannot do anything else then to
provide compatible version of this symbol.
Now in version 1.02.97 we add new versioned implementation of
dm_task_get_info(DM_1_02_97) symbol.
This has the effect that i.e. rpm build will finaly resolve proper
dependency on a new symbol - so it will be no longer possible,
to build a new binary and use old library
(rpm -q --provides will show libdevmapper.so.1.02(DM_1_02_97)(64bit))
Also the history is now tracked. If a new function is added (or
reimplemented), it needs to be placed in proper file,
so it could be exported with right versioning symbol.
File .exported_symbols.Base should and any existing older DM
should be treated as read-only after a release.
Also - only libdm has been currently enhanced with versioned .Base
file, as soon as other libs (liblvm, libdevmapper-event) needs changes
they should also get their exported symbol files - meanwhile
make.tmpl handles both cases.
Diffstat (limited to 'make.tmpl.in')
-rw-r--r-- | make.tmpl.in | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/make.tmpl.in b/make.tmpl.in index 4311490c6..33d79c2e6 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -485,7 +485,7 @@ distclean: cleandir $(SUBDIRS.distclean) test -z "$(DISTCLEAN_DIRS)" || $(RM) -r $(DISTCLEAN_DIRS) $(RM) $(DISTCLEAN_TARGETS) Makefile -.exported_symbols_generated: $(EXPORTED_HEADER) .exported_symbols +.exported_symbols_generated: $(EXPORTED_HEADER) .exported_symbols $(DEPS) set -e; \ ( cat $(srcdir)/.exported_symbols; \ if test x$(EXPORTED_HEADER) != x; then \ @@ -494,11 +494,28 @@ distclean: cleandir $(SUBDIRS.distclean) fi \ ) > $@ +EXPORTED_UC := $(shell echo $(EXPORTED_FN_PREFIX) | tr '[a-z]' '[A-Z]') +EXPORTED_FILES := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.exported_symbols.$(EXPORTED_UC)_[0-9_]*[0-9]) + +ifeq (0,$(words $(EXPORTED_FILES))) .export.sym: .exported_symbols_generated set -e; (echo "Base {"; echo " global:"; \ - sed "s/^/ /;s/$$/;/" < $<; \ + $(SED) "s/^/ /;s/$$/;/" < $<; \ echo " local:"; echo " *;"; echo "};") > $@ +else +.export.sym: .exported_symbols_generated $(EXPORTED_FILES) + set -e; \ + R=$(shell sort $^ | uniq -u);\ + test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\ + (for i in $(EXPORTED_FILES) ; do\ + echo "$${i##*.} {"; echo " global:";\ + $(SED) "s/^/ /;s/$$/;/" < $$i;\ + test "$$i" = Base && { echo " local:"; echo " *;"; };\ + echo "};";\ + done ) > $@ +endif + ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov \ help check check_local check_cluster check_lvmetad check_lvmpolld)) ifdef SOURCES |