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.
This commit is contained in:
Behdad Esfahbod 2018-06-12 19:20:20 -04:00
parent cc0b04f48f
commit f6893ef82c
3 changed files with 19 additions and 9 deletions

View File

@ -506,7 +506,6 @@ dnl ===========================================================================
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
src/Makefile src/Makefile
src/hb-version.h
src/harfbuzz-config.cmake src/harfbuzz-config.cmake
src/hb-ucdn/Makefile src/hb-ucdn/Makefile
util/Makefile util/Makefile

View File

@ -105,6 +105,17 @@ endif
DIST_SUBDIRS += hb-ucdn 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 # Put the library together
HBLIBS += $(HBNONPCLIBS) HBLIBS += $(HBNONPCLIBS)
@ -147,7 +158,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = harfbuzz.pc pkgconfig_DATA = harfbuzz.pc
cmakedir = $(libdir)/cmake/harfbuzz cmakedir = $(libdir)/cmake/harfbuzz
cmake_DATA = harfbuzz-config.cmake 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 lib_LTLIBRARIES += libharfbuzz-subset.la
libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources) libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources)
@ -266,13 +277,13 @@ endif
check: $(DEF_FILES) # For check-symbols.sh check: $(DEF_FILES) # For check-symbols.sh
CLEANFILES += $(DEF_FILES) CLEANFILES += $(DEF_FILES)
harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) 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) 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) 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) harfbuzz-gobject.def: $(HB_GOBJECT_headers)
$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@ $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@"
GENERATORS = \ GENERATORS = \

View File

@ -37,10 +37,10 @@ HB_BEGIN_DECLS
#define HB_VERSION_MAJOR 1 #define HB_VERSION_MAJOR 1
#define HB_VERSION_MINOR 7 #define HB_VERSION_MINOR 8
#define HB_VERSION_MICRO 6 #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) \ #define HB_VERSION_ATLEAST(major,minor,micro) \
((major)*10000+(minor)*100+(micro) <= \ ((major)*10000+(minor)*100+(micro) <= \