From f6893ef82c51a35dd075973b2041b1b19f81faff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Jun 2018 19:20:20 -0400 Subject: [PATCH] Move hb-version.h generation to Makefile Fixes https://github.com/harfbuzz/harfbuzz/issues/864 Unfortunately 1.7.7 and 1.8.0 went out with the wrong hb-version.h contents. --- configure.ac | 1 - src/Makefile.am | 21 ++++++++++++++++----- src/hb-version.h | 6 +++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 0061403c9..6f5ae8f02 100644 --- a/configure.ac +++ b/configure.ac @@ -506,7 +506,6 @@ dnl =========================================================================== AC_CONFIG_FILES([ Makefile src/Makefile -src/hb-version.h src/harfbuzz-config.cmake src/hb-ucdn/Makefile util/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index be9cd73ca..9d5662e4a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -105,6 +105,17 @@ endif DIST_SUBDIRS += hb-ucdn +BUILT_SOURCES += \ + hb-version.h + +$(srcdir)/hb-version.h: hb-version.h.in $(top_srcdir)/configure.ac + $(AM_V_GEN) $(SED) \ + -e 's/[@]HB_VERSION_MAJOR@/$(HB_VERSION_MAJOR)/' \ + -e 's/[@]HB_VERSION_MINOR@/$(HB_VERSION_MINOR)/' \ + -e 's/[@]HB_VERSION_MICRO@/$(HB_VERSION_MICRO)/' \ + -e 's/[@]HB_VERSION@/$(HB_VERSION)/' \ + "$<" > "$@" || ($(RM) "$@"; false) + # Put the library together HBLIBS += $(HBNONPCLIBS) @@ -147,7 +158,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = harfbuzz.pc cmakedir = $(libdir)/cmake/harfbuzz cmake_DATA = harfbuzz-config.cmake -EXTRA_DIST += harfbuzz.pc.in harfbuzz-config.cmake.in +EXTRA_DIST += hb-version.h.in harfbuzz.pc.in harfbuzz-config.cmake.in lib_LTLIBRARIES += libharfbuzz-subset.la libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources) @@ -266,13 +277,13 @@ endif check: $(DEF_FILES) # For check-symbols.sh CLEANFILES += $(DEF_FILES) harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) - $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@ + $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@" harfbuzz-subset.def: $(HB_SUBSET_headers) - $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@ + $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@" harfbuzz-icu.def: $(HB_ICU_headers) - $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@ + $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@" harfbuzz-gobject.def: $(HB_GOBJECT_headers) - $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@ + $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@" GENERATORS = \ diff --git a/src/hb-version.h b/src/hb-version.h index 275093260..f02e8078a 100644 --- a/src/hb-version.h +++ b/src/hb-version.h @@ -37,10 +37,10 @@ HB_BEGIN_DECLS #define HB_VERSION_MAJOR 1 -#define HB_VERSION_MINOR 7 -#define HB_VERSION_MICRO 6 +#define HB_VERSION_MINOR 8 +#define HB_VERSION_MICRO 0 -#define HB_VERSION_STRING "1.7.6" +#define HB_VERSION_STRING "1.8.0" #define HB_VERSION_ATLEAST(major,minor,micro) \ ((major)*10000+(minor)*100+(micro) <= \