diff options
author | Alasdair Kergon <agk@redhat.com> | 2010-06-25 18:17:38 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2010-06-25 18:17:38 +0000 |
commit | 8b2055719d2ab712d51ba23394ae3c99bfc3c6ff (patch) | |
tree | 7d6bece05be9ee971cfd18a9160ea833d68bb19d /make.tmpl.in | |
parent | 9bce3d3bcf23517f1e603ddde50bcc97ca49cab3 (diff) | |
download | lvm2-8b2055719d2ab712d51ba23394ae3c99bfc3c6ff.tar.gz lvm2-8b2055719d2ab712d51ba23394ae3c99bfc3c6ff.tar.xz lvm2-8b2055719d2ab712d51ba23394ae3c99bfc3c6ff.zip |
Generate liblvm2app and libdevmapper exported symbols from header files.
Detection is simply by prefix - dm_ or lvm_ - and any additional symbols needed
but not detected this way are placed in .exported_symbols.
Diffstat (limited to 'make.tmpl.in')
-rw-r--r-- | make.tmpl.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/make.tmpl.in b/make.tmpl.in index e7c4e529..27d02d8c 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -355,7 +355,16 @@ distclean: cleandir $(SUBDIRS.distclean) test -z "$(DISTCLEAN_DIRS)" || $(RM) -r $(DISTCLEAN_DIRS) $(RM) $(DISTCLEAN_TARGETS) Makefile core -.export.sym: .exported_symbols +.exported_symbols_generated: $(EXPORTED_HEADER) .exported_symbols + set -e; \ + ( cat $(srcdir)/.exported_symbols; \ + if test x$(EXPORTED_HEADER) != x; then \ + $(CC) -E -P $(EXPORTED_HEADER) | \ + $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ + fi \ + ) > $@ + +.export.sym: .exported_symbols_generated set -e; (echo "Base {"; echo " global:"; \ sed "s/^/ /;s/$$/;/" < $<; \ echo " local:"; echo " *;"; echo "};") > $@ |