[cairo-commit] acinclude.m4 boilerplate/cairo-boilerplate.c boilerplate/cairo-boilerplate-test-surfaces.c boilerplate/check-link.c cairo-version.h doc/public Makefile.am meson.build perf/cairo-analyse-trace.c perf/cairo-perf-micro.c perf/cairo-perf-trace.c RELEASING src/cairo-version.c src/cairo-version.h src/check-link.c src/Makefile.am src/Makefile.sources src/Makefile.win32 src/meson.build test/cairo-test-runner.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 29 16:14:57 UTC 2020


 Makefile.am                                   |    3 ---
 RELEASING                                     |    8 ++++----
 acinclude.m4                                  |    2 +-
 boilerplate/cairo-boilerplate-test-surfaces.c |    2 --
 boilerplate/cairo-boilerplate.c               |    6 ------
 boilerplate/check-link.c                      |    7 -------
 cairo-version.h                               |    8 --------
 doc/public/Makefile.am                        |    2 +-
 meson.build                                   |    2 --
 perf/cairo-analyse-trace.c                    |    2 --
 perf/cairo-perf-micro.c                       |    2 --
 perf/cairo-perf-trace.c                       |    2 --
 src/Makefile.am                               |    2 --
 src/Makefile.sources                          |   13 +------------
 src/Makefile.win32                            |    1 -
 src/cairo-version.c                           |    6 ------
 src/cairo-version.h                           |   12 +++---------
 src/check-link.c                              |    7 -------
 src/meson.build                               |    1 +
 test/cairo-test-runner.c                      |    7 -------
 20 files changed, 11 insertions(+), 84 deletions(-)

New commits:
commit 4ea2991a40d547d3c7800f862206741625a84417
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Thu Sep 24 12:42:54 2020 +0100

    Retire dummy cairo-version.h header to fix meson subproject build
    
    It was originally added to make bisecting easier,
    but has outlived its usefuleness now.
    
    Going forward we'll have just a single cairo-version.h
    header file, the one with the real version numbers.
    
    This is needed to fix the case where cairo is being
    built as a Meson subproject, but also simplifies
    things in general.
    
    Fixes #421

diff --git a/Makefile.am b/Makefile.am
index 04990f524..7354c3e2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,8 +23,6 @@ if CAIRO_HAS_PNG_FUNCTIONS
 SUBDIRS += boilerplate test perf
 endif
 
-configure: cairo-version.h
-
 doc:
 	cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
 test retest recheck: all
@@ -52,7 +50,6 @@ EXTRA_DIST += \
 	README \
 	RELEASING \
 	autogen.sh \
-	cairo-version.h \
 	$(NULL)
 
 # Meson build system files
diff --git a/RELEASING b/RELEASING
index 98778f087..04c78e20a 100644
--- a/RELEASING
+++ b/RELEASING
@@ -106,7 +106,7 @@ Here are the steps to follow to create a new cairo release:
 
 		https://cairographics.org/releases/ChangeLog.cairo-${THIS_RELEASE}
 
-4) Increment cairo_version_{minor|micro} in cairo-version.h:
+4) Increment cairo_version_{minor|micro} in src/cairo-version.h:
 
 	If there are backward-incompatible changes in the API, stop
 	now and don't release. Go back and fix the API instead. Cairo
@@ -131,7 +131,7 @@ Here are the steps to follow to create a new cairo release:
 	  <title>Index of new symbols in X.Y</title>
 	</index>
 
-6) Commit the changes to NEWS and cairo-version.h
+6) Commit the changes to NEWS and src/cairo-version.h
 
 	It's especially important to mention the new version number in your
 	commit log.
@@ -186,7 +186,7 @@ Here are the steps to follow to create a new cairo release:
 9) Update master (or the stable branch) version number.
 
 	For Micro releases (X.Y.Z+2), increment cairo_version_micro to
-	the next larger (odd) number in cairo-version.h, commit, and
+	the next larger (odd) number in src/cairo-version.h, commit, and
 	push.
 
 		DEVEL_VERSION="X.Y.Z+1"  # e.g. 1.15.10 -> 1.15.11
@@ -197,7 +197,7 @@ Here are the steps to follow to create a new cairo release:
 
 	       DEVEL_VERSION="X.Y.Z+1"  # e.g. 1.16.0 -> 1.17.1
 
-	git commit cairo-version.h -m "Bump version for ${DEVEL_VERSION}"
+	git commit src/cairo-version.h -m "Bump version for ${DEVEL_VERSION}"
 
 10) Send out an announcement message.
 
diff --git a/acinclude.m4 b/acinclude.m4
index dcf54f935..ffff235f7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -36,7 +36,7 @@ dnl This has to be in acinclude.m4 as it includes other files
 dnl Parse Version.mk and declare m4 variables out of it
 m4_define([CAIRO_PARSE_VERSION],dnl
 		m4_translit(dnl
-		m4_bpatsubst(m4_include(cairo-version.h),
+		m4_bpatsubst(m4_include(src/cairo-version.h),
 			     [^.define \([a-zA-Z0-9_]*\)  *\([0-9][0-9]*\)],
 			     [[m4_define(\1, \2)]]),
 			    [A-Z], [a-z])dnl
diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c
index 293b77fff..64e669783 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces.c
+++ b/boilerplate/cairo-boilerplate-test-surfaces.c
@@ -24,8 +24,6 @@
  * Author: Carl D. Worth <cworth at cworth.org>
  */
 
-#include "../cairo-version.h"
-
 #include "cairo-boilerplate-private.h"
 
 #include <cairo-types-private.h>
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 4804deaff..383606177 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -24,8 +24,6 @@
  * Author: Carl D. Worth <cworth at cworth.org>
  */
 
-#define CAIRO_VERSION_H 1
-
 #include "cairo-boilerplate-private.h"
 #include "cairo-boilerplate-scaled-font.h"
 
@@ -38,10 +36,6 @@
 #include <cairo-script.h>
 #endif
 
-/* get the "real" version info instead of dummy cairo-version.h */
-#undef CAIRO_VERSION_H
-#include "../cairo-version.h"
-
 #include <stddef.h>
 #include <stdlib.h>
 #include <ctype.h>
diff --git a/boilerplate/check-link.c b/boilerplate/check-link.c
index f16444878..688339a95 100644
--- a/boilerplate/check-link.c
+++ b/boilerplate/check-link.c
@@ -1,11 +1,4 @@
-#define CAIRO_VERSION_H 1
-
 #include <cairo-boilerplate.h>
-
-/* get the "real" version info instead of dummy cairo-version.h */
-#undef CAIRO_VERSION_H
-#include "../cairo-version.h"
-
 #include <stdio.h>
 
 int
diff --git a/cairo-version.h b/cairo-version.h
deleted file mode 100644
index 605ec1a7c..000000000
--- a/cairo-version.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef CAIRO_VERSION_H
-#define CAIRO_VERSION_H
-
-#define CAIRO_VERSION_MAJOR 1
-#define CAIRO_VERSION_MINOR 17
-#define CAIRO_VERSION_MICRO 3
-
-#endif
diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am
index 33bccabb7..bf2a0e759 100644
--- a/doc/public/Makefile.am
+++ b/doc/public/Makefile.am
@@ -36,7 +36,7 @@ content_files =	\
 	version.xml \
 	$(NULL)
 
-version.xml: $(top_srcdir)/cairo-version.h
+version.xml: $(top_srcdir)/src/cairo-version.h
 	echo $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO) > $@
 
 # Images to copy into HTML directory
diff --git a/meson.build b/meson.build
index 13c5482b6..9889f5cdc 100644
--- a/meson.build
+++ b/meson.build
@@ -933,8 +933,6 @@ foreach feature: built_features
   )
 endforeach
 
-install_headers('cairo-version.h', subdir: 'cairo')
-
 # summary
 if meson.version().version_compare('>= 0.53')
   summary({
diff --git a/perf/cairo-analyse-trace.c b/perf/cairo-analyse-trace.c
index 994148660..95b7e6664 100644
--- a/perf/cairo-analyse-trace.c
+++ b/perf/cairo-analyse-trace.c
@@ -31,8 +31,6 @@
 
 #define _GNU_SOURCE 1	/* for sched_getaffinity() and getline() */
 
-#include "../cairo-version.h" /* for the real version */
-
 #include "cairo-perf.h"
 #include "cairo-stats.h"
 
diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c
index d6b52c446..d8745c205 100644
--- a/perf/cairo-perf-micro.c
+++ b/perf/cairo-perf-micro.c
@@ -28,8 +28,6 @@
 
 #define _GNU_SOURCE 1	/* for sched_getaffinity() */
 
-#include "../cairo-version.h" /* for the real version */
-
 #include "cairo-perf.h"
 #include "cairo-stats.h"
 
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index 6483631f4..7823089ae 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -30,8 +30,6 @@
 
 #define _GNU_SOURCE 1	/* for sched_getaffinity() and getline() */
 
-#include "../cairo-version.h" /* for the real version */
-
 #include "cairo-missing.h"
 #include "cairo-perf.h"
 #include "cairo-stats.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index acf0a8281..23ba1861d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,8 +50,6 @@ libcairo_la_LIBADD = $(CAIRO_LIBS) \
 libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(cairo_cxx_lib)
 
 # Special headers
-cairoinclude_HEADERS += $(top_srcdir)/cairo-version.h
-libcairo_la_SOURCES += cairo-version.h
 nodist_cairoinclude_HEADERS = cairo-features.h
 nodist_libcairo_la_SOURCES  = cairo-features.h
 BUILT_SOURCES  += cairo-features.h cairo-supported-features.h
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 5e84cbfc6..0a1ce3527 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -27,17 +27,6 @@
 #     other public headers, but should NOT be distributed in the cairo
 #     distribution.
 #
-#   * cairo-version.h:
-#     This is a dummy header file used during the build, but it should
-#     NOT be installed.  Its sole purpose is to make sure changes in the
-#     cairo version do not trigger a full rebuild of the library, but
-#     just the functions actually using the version information.
-#
-#   * $(top_srcdir)/cairo-version.h:
-#     This is the real file holding the cairo version number.  This file
-#     should be installed like other public headers.  This is used during
-#     the build by cairo-version.c only.
-#
 #   * cairo-supported-features.h:
 #     This file is generated by configure and includes macros signifying
 #     all supported features.  This is used by gtk-doc to generate
@@ -49,7 +38,7 @@
 # lists sorted.
 #
 
-cairo_headers = cairo.h cairo-deprecated.h
+cairo_headers = cairo.h cairo-version.h cairo-deprecated.h
 cairo_private = \
 	cairoint.h \
 	cairo-analysis-surface-private.h \
diff --git a/src/Makefile.win32 b/src/Makefile.win32
index 864791f37..9afefe2b7 100644
--- a/src/Makefile.win32
+++ b/src/Makefile.win32
@@ -22,7 +22,6 @@ all: inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib
 	@echo "Built successfully!"
 	@echo "You should copy the following files to a proper place now:"
 	@echo ""
-	@echo "	cairo-version.h (NOTE: toplevel, not the src/cairo-version.h one!)"
 	@echo "	src/cairo-features.h"
 	@for x in $(enabled_cairo_headers); do echo "	src/$$x"; done
 	@echo "	src/$(CFG)/cairo.dll"
diff --git a/src/cairo-version.c b/src/cairo-version.c
index 65ae2b108..943e1cde0 100644
--- a/src/cairo-version.c
+++ b/src/cairo-version.c
@@ -36,14 +36,8 @@
  *	Carl D. Worth <cworth at cworth.org>
  */
 
-#define CAIRO_VERSION_H 1
-
 #include "cairoint.h"
 
-/* get the "real" version info instead of dummy cairo-version.h */
-#undef CAIRO_VERSION_H
-#include "../cairo-version.h"
-
 /**
  * SECTION:cairo-version
  * @Title: Version Information
diff --git a/src/cairo-version.h b/src/cairo-version.h
index 51008003f..605ec1a7c 100644
--- a/src/cairo-version.h
+++ b/src/cairo-version.h
@@ -1,14 +1,8 @@
-/* This is a dummy file.
- * The actual version info is in toplevel cairo-version.h.
- * The purpose of this file is to make most of the source files NOT depend
- * on the real cairo-version.h, and as a result, changing library version
- * would not cause a complete rebuild of all object files (just a relink).
- * This is useful when bisecting. */
 #ifndef CAIRO_VERSION_H
 #define CAIRO_VERSION_H
 
-#define CAIRO_VERSION_MAJOR USE_cairo_version_OR_cairo_version_string_INSTEAD
-#define CAIRO_VERSION_MINOR USE_cairo_version_OR_cairo_version_string_INSTEAD
-#define CAIRO_VERSION_MICRO USE_cairo_version_OR_cairo_version_string_INSTEAD
+#define CAIRO_VERSION_MAJOR 1
+#define CAIRO_VERSION_MINOR 17
+#define CAIRO_VERSION_MICRO 3
 
 #endif
diff --git a/src/check-link.c b/src/check-link.c
index 66ca1b241..2d943d644 100644
--- a/src/check-link.c
+++ b/src/check-link.c
@@ -1,11 +1,4 @@
-#define CAIRO_VERSION_H 1
-
 #include <cairo.h>
-
-/* get the "real" version info instead of dummy cairo-version.h */
-#undef CAIRO_VERSION_H
-#include "../cairo-version.h"
-
 #include <stdio.h>
 
 int
diff --git a/src/meson.build b/src/meson.build
index f65ab0e8d..023fdad74 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -119,6 +119,7 @@ cairo_sources = [
 
 cairo_headers = [
   'cairo.h',
+  'cairo-version.h',
   'cairo-deprecated.h',
 ]
 
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index 6d4134ad9..779addf5b 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -26,13 +26,6 @@
 #include "cairo-test-private.h"
 #include "cairo-boilerplate-getopt.h"
 
-/* get the "real" version info instead of dummy cairo-version.h */
-#undef CAIRO_VERSION_H
-#undef CAIRO_VERSION_MAJOR
-#undef CAIRO_VERSION_MINOR
-#undef CAIRO_VERSION_MICRO
-#include "../cairo-version.h"
-
 #include <pixman.h> /* for version information */
 
 #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID


More information about the cairo-commit mailing list