summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-06-18 16:37:34 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-06-20 10:24:21 +0200
commitc7c3475cdb429a996190c2c95c20a60984a1bba9 (patch)
treec919ccb8f92e423e6c1e9f6f06e2ca2e34aa9db8 /build
parent101fab7cd8a90f7cf3d8113c792b3f8c2a9afb7d (diff)
build: Improve generation of cairo-features.h on win32
All of the build depends on cairo-features.h. By having a target to generate it that can be run from anywhere, it is possible to delegate the dependency handling to 'make'.
Diffstat (limited to 'build')
-rw-r--r--build/Makefile.win32.common5
-rw-r--r--build/Makefile.win32.features-h96
-rw-r--r--build/configure.ac.features12
3 files changed, 57 insertions, 56 deletions
diff --git a/build/Makefile.win32.common b/build/Makefile.win32.common
index c1f0cb847..5ff07809e 100644
--- a/build/Makefile.win32.common
+++ b/build/Makefile.win32.common
@@ -4,6 +4,7 @@ default: all
# Edit build/Makefile.win32.features to enable features to build
#
include $(top_srcdir)/build/Makefile.win32.features
+include $(top_srcdir)/build/Makefile.win32.features-h
ifeq ($(top_builddir),)
top_builddir = $(top_srcdir)
@@ -59,11 +60,11 @@ endif
# Some generic rules
-$(CFG)/%.obj: %.c
+$(CFG)/%.obj: %.c $(top_srcdir)/src/cairo-features.h
@mkdir -p $(CFG)
@$(CC) $(CAIRO_CFLAGS) -c -Fo"$@" $<
-$(CFG)/%-static.obj: %.c
+$(CFG)/%-static.obj: %.c $(top_srcdir)/src/cairo-features.h
@mkdir -p $(CFG)
@$(CC) $(CAIRO_CFLAGS) -c -DCAIRO_WIN32_STATIC_BUILD=1 -Fo"$@" $<
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index ce39de3ae..c1883b98e 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -1,131 +1,131 @@
# Generated by configure. Do not edit.
-src/cairo-features.h: build/Makefile.win32.features
+$(top_srcdir)/src/cairo-features.h: $(top_srcdir)/build/Makefile.win32.features
@echo "Generating src/cairo-features.h"
- @echo "/* Generated by Makefile.win32. Do not edit. */" > src/cairo-features.h
- @echo "#ifndef CAIRO_FEATURES_H" >> src/cairo-features.h
- @echo "#define CAIRO_FEATURES_H 1" >> src/cairo-features.h
+ @echo "/* Generated by Makefile.win32.features-h. Do not edit. */" > $(top_srcdir)/src/cairo-features.h
+ @echo "#ifndef CAIRO_FEATURES_H" >> $(top_srcdir)/src/cairo-features.h
+ @echo "#define CAIRO_FEATURES_H 1" >> $(top_srcdir)/src/cairo-features.h
ifeq ($(CAIRO_HAS_XLIB_SURFACE),1)
- @echo "#define CAIRO_HAS_XLIB_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XLIB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XLIB_XRENDER_SURFACE),1)
- @echo "#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XCB_SURFACE),1)
- @echo "#define CAIRO_HAS_XCB_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XCB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XLIB_XCB_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_XLIB_XCB_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XLIB_XCB_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XCB_SHM_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_XCB_SHM_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XCB_SHM_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_QT_SURFACE),1)
- @echo "#define CAIRO_HAS_QT_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_QT_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_QUARTZ_SURFACE),1)
- @echo "#define CAIRO_HAS_QUARTZ_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_QUARTZ_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_QUARTZ_FONT),1)
- @echo "#define CAIRO_HAS_QUARTZ_FONT 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_QUARTZ_FONT 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_QUARTZ_IMAGE_SURFACE),1)
- @echo "#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_WIN32_SURFACE),1)
- @echo "#define CAIRO_HAS_WIN32_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_WIN32_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_WIN32_FONT),1)
- @echo "#define CAIRO_HAS_WIN32_FONT 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_WIN32_FONT 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_SKIA_SURFACE),1)
- @echo "#define CAIRO_HAS_SKIA_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_SKIA_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
- @echo "#define CAIRO_HAS_OS2_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_OS2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
- @echo "#define CAIRO_HAS_BEOS_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_BEOS_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
- @echo "#define CAIRO_HAS_DRM_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_DRM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_DRM_XR_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_DRM_XR_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_DRM_XR_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
- @echo "#define CAIRO_HAS_GALLIUM_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_GALLIUM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XCB_DRM_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_XCB_DRM_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XCB_DRM_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_PNG_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_PNG_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_GL_SURFACE),1)
- @echo "#define CAIRO_HAS_GL_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_GL_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_GLESV2_SURFACE),1)
- @echo "#define CAIRO_HAS_GLESV2_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_GLESV2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_DIRECTFB_SURFACE),1)
- @echo "#define CAIRO_HAS_DIRECTFB_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_DIRECTFB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_VG_SURFACE),1)
- @echo "#define CAIRO_HAS_VG_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_VG_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_EGL_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_EGL_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_EGL_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_GLX_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_GLX_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_GLX_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_WGL_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_WGL_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_WGL_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_SCRIPT_SURFACE),1)
- @echo "#define CAIRO_HAS_SCRIPT_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_SCRIPT_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_FT_FONT),1)
- @echo "#define CAIRO_HAS_FT_FONT 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_FT_FONT 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_FC_FONT),1)
- @echo "#define CAIRO_HAS_FC_FONT 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_FC_FONT 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_PS_SURFACE),1)
- @echo "#define CAIRO_HAS_PS_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_PS_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_PDF_SURFACE),1)
- @echo "#define CAIRO_HAS_PDF_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_PDF_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_SVG_SURFACE),1)
- @echo "#define CAIRO_HAS_SVG_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_SVG_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_TEST_SURFACES),1)
- @echo "#define CAIRO_HAS_TEST_SURFACES 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_TEST_SURFACES 1" >> $(top_srcdir)/src/cairo-features.h
endif
- @echo "#define CAIRO_HAS_IMAGE_SURFACE 1" >> src/cairo-features.h
- @echo "#define CAIRO_HAS_RECORDING_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_IMAGE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
+ @echo "#define CAIRO_HAS_RECORDING_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
- @echo "#define CAIRO_HAS_TEE_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_TEE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_XML_SURFACE),1)
- @echo "#define CAIRO_HAS_XML_SURFACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_XML_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
- @echo "#define CAIRO_HAS_USER_FONT 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_USER_FONT 1" >> $(top_srcdir)/src/cairo-features.h
ifeq ($(CAIRO_HAS_PTHREAD),1)
- @echo "#define CAIRO_HAS_PTHREAD 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_PTHREAD 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_GOBJECT_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_GOBJECT_FUNCTIONS 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_GOBJECT_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_TRACE),1)
- @echo "#define CAIRO_HAS_TRACE 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_TRACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_INTERPRETER),1)
- @echo "#define CAIRO_HAS_INTERPRETER 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_INTERPRETER 1" >> $(top_srcdir)/src/cairo-features.h
endif
ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
- @echo "#define CAIRO_HAS_SYMBOL_LOOKUP 1" >> src/cairo-features.h
+ @echo "#define CAIRO_HAS_SYMBOL_LOOKUP 1" >> $(top_srcdir)/src/cairo-features.h
endif
- @echo "#endif" >> src/cairo-features.h
+ @echo "#endif" >> $(top_srcdir)/src/cairo-features.h
diff --git a/build/configure.ac.features b/build/configure.ac.features
index e1651d871..b4185a0ca 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -295,18 +295,18 @@ dnl Generate build/Makefile.win32.features-h that generates src/cairo-features.h
CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([win32_features_h],[build],[features-h])
dnl
CAIRO_MAKEFILE_ACCUMULATE([win32_features_h],
-[src/cairo-features.h: build/Makefile.win32.features
+[$(top_srcdir)/src/cairo-features.h: $(top_srcdir)/build/Makefile.win32.features
@echo "Generating src/cairo-features.h"
- @echo "/* Generated by Makefile.win32. Do not edit. */" > src/cairo-features.h
- @echo "[#]ifndef CAIRO_FEATURES_H" >> src/cairo-features.h
- @echo "[#]define CAIRO_FEATURES_H 1" >> src/cairo-features.h]dnl
+ @echo "/* Generated by Makefile.win32.features-h. Do not edit. */" > $(top_srcdir)/src/cairo-features.h
+ @echo "[#]ifndef CAIRO_FEATURES_H" >> $(top_srcdir)/src/cairo-features.h
+ @echo "[#]define CAIRO_FEATURES_H 1" >> $(top_srcdir)/src/cairo-features.h]dnl
)
AC_CONFIG_COMMANDS_PRE(
[dnl
- CAIRO_MAKEFILE_ACCUMULATE([win32_features_h], [ @echo "[#]endif" >> src/cairo-features.h])
+ CAIRO_MAKEFILE_ACCUMULATE([win32_features_h], [ @echo "[#]endif" >> $(top_srcdir)/src/cairo-features.h])
])dnl
CAIRO_MAKEFILE_ACCUMULATE_FEATURE([win32_features_h],yes,*,*,dnl
-[ @echo "[#]define cr_feature_tag 1" >> src/cairo-features.h]dnl
+[ @echo "[#]define cr_feature_tag 1" >> $(top_srcdir)/src/cairo-features.h]dnl
)dnl