Commit e7d0019bf48ac6b554d46a545242515db9d72644

Authored by Jay Berkenbilt
1 parent 6247aaa5

Generate libqpdf.map from autoconf

Rather than checking consistency of libqpdf.map, generate it.
.gitignore
... ... @@ -14,6 +14,7 @@ doc/qpdf.1
14 14 doc/zlib-flate.1
15 15 examples/build/
16 16 external-libs
  17 +libqpdf.map
17 18 libqpdf.pc
18 19 libqpdf/build/
19 20 libqpdf/qpdf/qpdf-config.h
... ...
Makefile
... ... @@ -102,7 +102,7 @@ distclean: clean
102 102 $(RM) manual/html.xsl
103 103 $(RM) manual/print.xsl
104 104 $(RM) doc/*.1
105   - $(RM) libqpdf.pc
  105 + $(RM) libqpdf.pc libqpdf.map
106 106  
107 107 maintainer-clean: distclean
108 108 $(RM) configure doc/qpdf-manual.* libqpdf/qpdf/qpdf-config.h.in
... ...
autoconf.mk.in
1 1 PACKAGE_TARNAME=@PACKAGE_TARNAME@
2 2 PACKAGE_VERSION=@PACKAGE_VERSION@
  3 +LT_CURRENT=@LT_CURRENT@
  4 +LT_REVISION=@LT_REVISION@
  5 +LT_AGE=@LT_AGE@
3 6 top_builddir=@top_builddir@
4 7 prefix=@prefix@
5 8 exec_prefix=@exec_prefix@
... ...
configure.ac
... ... @@ -8,6 +8,7 @@ AC_CONFIG_MACRO_DIR([m4])
8 8 AC_CONFIG_FILES([autoconf.mk])
9 9 AC_CONFIG_FILES([manual/html.xsl manual/print.xsl])
10 10 AC_CONFIG_FILES([libqpdf.pc])
  11 +AC_CONFIG_FILES([libqpdf.map])
11 12 AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
12 13  
13 14 AC_PROG_CC
... ... @@ -16,6 +17,25 @@ AC_PROG_CXX
16 17 AC_HEADER_STDC
17 18 LT_INIT([win32-dll])
18 19  
  20 +# * If any interfaces have been removed or changed, or if any private
  21 +# member variables or virtual functions have been added to any
  22 +# class, we are not binary compatible. Increment LT_CURRENT, and set
  23 +# LT_AGE and LT_REVISION to 0.
  24 +#
  25 +# * Otherwise, if any interfaces have been added since the last public
  26 +# release, then increment LT_CURRENT and LT_AGE, and set LT_REVISION
  27 +# to 0.
  28 +#
  29 +# * Otherwise, increment LT_REVISION
  30 +
  31 +# LT = libtool
  32 +LT_CURRENT=17
  33 +LT_REVISION=0
  34 +LT_AGE=0
  35 +AC_SUBST(LT_CURRENT)
  36 +AC_SUBST(LT_REVISION)
  37 +AC_SUBST(LT_AGE)
  38 +
19 39 AC_ARG_ENABLE(insecure-random,
20 40 AS_HELP_STRING([--enable-insecure-random],
21 41 [whether to use stdlib's random number generator (default is no)]),
... ...
libqpdf.map renamed to libqpdf.map.in
1   -LIBQPDF_17 {
  1 +LIBQPDF_@LT_CURRENT@ {
2 2 global:
3 3 *;
4 4 };
... ...
libqpdf/build.mk
... ... @@ -81,36 +81,5 @@ $(CCOBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.cc
81 81 $(COBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.c
82 82 $(call c_libcompile,$<,$(INCLUDES_libqpdf))
83 83  
84   -# Last three arguments to makelib are CURRENT,REVISION,AGE.
85   -#
86   -# * If any interfaces have been removed or changed, we are not binary
87   -# compatible. Increment CURRENT, and set AGE and REVISION to 0.
88   -# Also update libqpdf.map, changing the numeric portion to match
89   -# CURRENT.
90   -#
91   -# * Otherwise, if any interfaces have been added since the last
92   -# public release, then increment CURRENT and AGE, and set REVISION
93   -# to 0.
94   -#
95   -# * Otherwise, increment REVISION
96   -
97   -CURRENT := 17
98   -REVISION := 0
99   -AGE := 0
100   -$(TARGETS_libqpdf): $(OBJS_libqpdf) libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp
101   - $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(CURRENT),$(REVISION),$(AGE))
102   -
103   -libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp: libqpdf.map
104   - @if [ $$(head -1 libqpdf.map | awk '{print $$1}') = LIBQPDF_$(CURRENT) ]; then \
105   - touch $@; \
106   - else \
107   - echo ''; \
108   - echo '****'; \
109   - echo libqpdf.map is out of date; \
110   - echo first line should contain LIBQPDF_$(CURRENT); \
111   - echo '****'; \
112   - echo ''; \
113   - rm -f $@; \
114   - false; \
115   - fi
116   -
  84 +$(TARGETS_libqpdf): $(OBJS_libqpdf)
  85 + $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(LT_CURRENT),$(LT_REVISION),$(LT_AGE))
... ...