diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-22 23:41:07 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-22 23:41:07 -0400 |
commit | fba0211ed6f649b9d61a9f2b3d83096dd801cb14 (patch) | |
tree | b2d8ccc8f028ca27c0d1973a33a238d42ad222bf | |
parent | 0bedbe78fe236cc9dabec87dea0f71714acfb76a (diff) |
[Makefile.win32] Add makefile rules to generate cairo-features.h
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Makefile.win32 | 5 | ||||
-rw-r--r-- | build/configure.ac.features | 20 | ||||
-rw-r--r-- | src/Makefile.am | 4 |
4 files changed, 25 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index fd1b223c..95ffe80e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,9 +4,11 @@ EXTRA_DIST += \ Makefile.win32 \ build/Makefile.win32.common \ build/Makefile.win32.features \ + build/Makefile.win32.features-h \ $(NULL) MAINTAINERCLEANFILES += \ $(srcdir)/build/Makefile.win32.features \ + $(srcdir)/build/Makefile.win32.features-h \ $(NULL) ACLOCAL_AMFLAGS = -I build diff --git a/Makefile.win32 b/Makefile.win32 index 1e80365c..b527fcf4 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -1,15 +1,12 @@ top_srcdir = . include $(top_srcdir)/build/Makefile.win32.common +include $(top_srcdir)/build/Makefile.win32.features-h SUBDIRS = src TEST_SUBDIRS = boilerplate test all: inform cairo -src/cairo-features.h: - @echo Warning: creating default cairo-features.h - @cp src/cairo-features-win32.h src/cairo-features.h - cairo: src/cairo-features.h @list='$(SUBDIRS)'; for f in $$list ; do \ echo making all in $$f... ; \ diff --git a/build/configure.ac.features b/build/configure.ac.features index e9d8f22c..5d5a388e 100644 --- a/build/configure.ac.features +++ b/build/configure.ac.features @@ -282,6 +282,26 @@ CAIRO_FEATURE_HOOK_REGISTER(yes,*,, AC_DEFINE(cr_feature_tag, 1, [Define to 1 to enable cairo's ]cr_feature_name[ feature]) ])dnl + +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 + @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 +) +AC_CONFIG_COMMANDS_PRE( +[dnl + CAIRO_MAKEFILE_ACCUMULATE([win32_features_h], [ @echo "[#]endif" >> 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 +)dnl + + dnl =========================================================================== dnl dnl Report diff --git a/src/Makefile.am b/src/Makefile.am index 83eee4c9..bf87efb7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,8 +13,8 @@ export_symbols = -export-symbols cairo.def cairo_def_dependency = cairo.def endif -EXTRA_DIST += cairo-supported-features.h cairo-features-win32.h -MAINTAINERCLEANFILES += cairo-supported-features.h $(srcdir)/cairo-features-win32.h +EXTRA_DIST += cairo-supported-features.h +MAINTAINERCLEANFILES += cairo-supported-features.h $(top_builddir)/config.h: $(top_srcdir)/config.h.in cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h |