Generate libqpdf.map from autoconf

Rather than checking consistency of libqpdf.map, generate it.
This commit is contained in:
Jay Berkenbilt 2017-08-11 04:56:22 -04:00
parent 6247aaa57c
commit e7d0019bf4
7 changed files with 31 additions and 38 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ doc/qpdf.1
doc/zlib-flate.1
examples/build/
external-libs
libqpdf.map
libqpdf.pc
libqpdf/build/
libqpdf/qpdf/qpdf-config.h

View File

@ -102,7 +102,7 @@ distclean: clean
$(RM) manual/html.xsl
$(RM) manual/print.xsl
$(RM) doc/*.1
$(RM) libqpdf.pc
$(RM) libqpdf.pc libqpdf.map
maintainer-clean: distclean
$(RM) configure doc/qpdf-manual.* libqpdf/qpdf/qpdf-config.h.in

View File

@ -1,5 +1,8 @@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
LT_CURRENT=@LT_CURRENT@
LT_REVISION=@LT_REVISION@
LT_AGE=@LT_AGE@
top_builddir=@top_builddir@
prefix=@prefix@
exec_prefix=@exec_prefix@

View File

@ -8,6 +8,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([autoconf.mk])
AC_CONFIG_FILES([manual/html.xsl manual/print.xsl])
AC_CONFIG_FILES([libqpdf.pc])
AC_CONFIG_FILES([libqpdf.map])
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
AC_PROG_CC
@ -16,6 +17,25 @@ AC_PROG_CXX
AC_HEADER_STDC
LT_INIT([win32-dll])
# * If any interfaces have been removed or changed, or if any private
# member variables or virtual functions have been added to any
# class, we are not binary compatible. Increment LT_CURRENT, and set
# LT_AGE and LT_REVISION to 0.
#
# * Otherwise, if any interfaces have been added since the last public
# release, then increment LT_CURRENT and LT_AGE, and set LT_REVISION
# to 0.
#
# * Otherwise, increment LT_REVISION
# LT = libtool
LT_CURRENT=17
LT_REVISION=0
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AC_ARG_ENABLE(insecure-random,
AS_HELP_STRING([--enable-insecure-random],
[whether to use stdlib's random number generator (default is no)]),

View File

@ -1,4 +0,0 @@
LIBQPDF_17 {
global:
*;
};

4
libqpdf.map.in Normal file
View File

@ -0,0 +1,4 @@
LIBQPDF_@LT_CURRENT@ {
global:
*;
};

View File

@ -81,36 +81,5 @@ $(CCOBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.cc
$(COBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.c
$(call c_libcompile,$<,$(INCLUDES_libqpdf))
# Last three arguments to makelib are CURRENT,REVISION,AGE.
#
# * If any interfaces have been removed or changed, we are not binary
# compatible. Increment CURRENT, and set AGE and REVISION to 0.
# Also update libqpdf.map, changing the numeric portion to match
# CURRENT.
#
# * Otherwise, if any interfaces have been added since the last
# public release, then increment CURRENT and AGE, and set REVISION
# to 0.
#
# * Otherwise, increment REVISION
CURRENT := 17
REVISION := 0
AGE := 0
$(TARGETS_libqpdf): $(OBJS_libqpdf) libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp
$(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(CURRENT),$(REVISION),$(AGE))
libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp: libqpdf.map
@if [ $$(head -1 libqpdf.map | awk '{print $$1}') = LIBQPDF_$(CURRENT) ]; then \
touch $@; \
else \
echo ''; \
echo '****'; \
echo libqpdf.map is out of date; \
echo first line should contain LIBQPDF_$(CURRENT); \
echo '****'; \
echo ''; \
rm -f $@; \
false; \
fi
$(TARGETS_libqpdf): $(OBJS_libqpdf)
$(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(LT_CURRENT),$(LT_REVISION),$(LT_AGE))