Skip to contentSkip to conversation

LVM2 ./WHATS_NEW ./make.tmpl.in libdm/.exporte ...

PATCH [email protected] 1 participant 1 message Jun 25, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-06-25 18:17:39

Modified files:

	.              : WHATS_NEW make.tmpl.in 
	libdm          : .exported_symbols Makefile.in 
	liblvm         : .exported_symbols Makefile.in 

Log message:
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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1636&r2=1.1637
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/make.tmpl.in.diff?cvsroot=lvm2&r1=1.103&r2=1.104
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/.exported_symbols.diff?cvsroot=lvm2&r1=1.54&r2=1.55
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/Makefile.in.diff?cvsroot=lvm2&r1=1.55&r2=1.56
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/Makefile.in.diff?cvsroot=lvm2&r1=1.24&r2=1.25

WHATS_NEW +1 -2
@@ -1,7 +1,6 @@
 Version 2.02.69 - 
 ================================
-  Update liblvm2app exported symbols.
-  Add manual Makefile target to generate current list of lvm2app.h functions.
+  Generate liblvm2app and libdevmapper exported symbols from header file.
   Preload libc locale messages to prevent reading it in memory locked state.
   Fix handling of simultaneous mirror image and mirrored log image failure.
 
make.tmpl.in +10 -1
@@ -355,7 +355,16 @@
 	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 "};") > $@
libdm/.exported_symbols +0 -175

177 lines not on this page · raw message

libdm/Makefile.in +3 -0
@@ -45,6 +45,9 @@
 CFLOW_LIST = $(SOURCES)
 CFLOW_LIST_TARGET = libdevmapper.cflow
 
+EXPORTED_HEADER = $(srcdir)/libdevmapper.h
+EXPORTED_FN_PREFIX = dm
+
 include $(top_builddir)/make.tmpl
 
 DEFS += -DDM_DEVICE_UID=@DM_DEVICE_UID@ -DDM_DEVICE_GID=@DM_DEVICE_GID@ \
liblvm/.exported_symbols +0 -59

59 lines not on this page · raw message

liblvm/Makefile.in +3 -4
@@ -34,6 +34,9 @@
 
 CLEAN_TARGETS += liblvm.cflow $(LIB_NAME).a
 
+EXPORTED_HEADER = $(srcdir)/lvm2app.h
+EXPORTED_FN_PREFIX = lvm
+
 include $(top_builddir)/make.tmpl
 
 LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
@@ -75,8 +78,4 @@
 
 cflow: liblvm.cflow
 
-.exported_symbols_new: $(srcdir)/lvm2app.h
-	$(CPP) -P $< | \
-	$(SED) -ne '/^(typedef|})/!s/.*[ \*]\(lvm_[a-z_]*\)(.*/\1/p' > $@
-
 DISTCLEAN_TARGETS += $(LIB_NAME).pc