Commit 4ea2991a authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

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
parent 96017adf
......@@ -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
......
......@@ -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.
......
......@@ -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
......
......@@ -24,8 +24,6 @@
* Author: Carl D. Worth <cworth@cworth.org>
*/
#include "../cairo-version.h"
#include "cairo-boilerplate-private.h"
#include <cairo-types-private.h>
......
......@@ -24,8 +24,6 @@
* Author: Carl D. Worth <cworth@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>
......
#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
......
#ifndef CAIRO_VERSION_H
#define CAIRO_VERSION_H
#define CAIRO_VERSION_MAJOR 1
#define CAIRO_VERSION_MINOR 17
#define CAIRO_VERSION_MICRO 3
#endif
......@@ -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
......
......@@ -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({
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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
......
......@@ -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 \
......
......@@ -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"
......
......@@ -36,14 +36,8 @@
* Carl D. Worth <cworth@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
......
/* 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
#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
......
......@@ -119,6 +119,7 @@ cairo_sources = [
cairo_headers = [
'cairo.h',
'cairo-version.h',
'cairo-deprecated.h',
]
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment