[cairo-commit] 4 commits - autogen.sh boilerplate/Makefile.am build/configure.ac.enable configure.ac doc/public perf/Makefile.am src/Makefile.am test/Makefile.am
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Sep 8 12:18:19 PDT 2008
autogen.sh | 2
boilerplate/Makefile.am | 2
build/configure.ac.enable | 130 ++++++++++++++++++++++------------------------
configure.ac | 2
doc/public/Makefile.am | 5 -
perf/Makefile.am | 6 +-
src/Makefile.am | 10 +--
test/Makefile.am | 6 +-
8 files changed, 77 insertions(+), 86 deletions(-)
New commits:
commit c20179b65ff887b4c5dc7f984ede1cb986de859d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Sep 8 15:17:52 2008 -0400
[{test,perf}/Makefile.am] Define html-local target instead of html
Fixes automake warning.
diff --git a/perf/Makefile.am b/perf/Makefile.am
index acafc7a..0de7b11 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -77,7 +77,7 @@ TESTS = cairo-perf$(EXEEXT)
perf: cairo-perf$(EXEEXT)
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf$(EXEEXT)
-html: index.html
+html-local: index.html
index.html: cairo-perf$(EXEEXT)
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@
@@ -109,6 +109,6 @@ perf-callgrind:
$(top_builddir)/libtool --mode=execute \
valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS)'
-.PHONY: perf html check-valgrind perf-valgrind perf-callgrind
+.PHONY: perf check-valgrind perf-valgrind perf-callgrind
EXTRA_DIST += Makefile.win32
diff --git a/test/Makefile.am b/test/Makefile.am
index 1d27dbd..8ef767f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -964,7 +964,7 @@ retest:
$(MAKE) $(AM_MAKEFLAGS) TESTS="$$TESTS" html
# Make index.html with no dependency tracking.
-html:
+html-local:
@echo Creating index.html
@perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html
@@ -1032,6 +1032,6 @@ check-ref-missing:
release-verify-sane-tests: check-ref-missing
-.PHONY: check-valgrind test recheck retest html rehtml check-ref-dups check-ref-missing release-verify-sane-tests
+.PHONY: check-valgrind test recheck retest rehtml check-ref-dups check-ref-missing release-verify-sane-tests
EXTRA_DIST += Makefile.win32
commit 87dfceb9ec4d32077ad7961a6875793dc5d723f1
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Sep 8 15:13:07 2008 -0400
[Makefile.am] Rename INCLUDES to AM_CPPFLAGS
Fixes automake warnings
diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
index b47b061..866315f 100644
--- a/boilerplate/Makefile.am
+++ b/boilerplate/Makefile.am
@@ -88,7 +88,7 @@ libcairoboilerplate_la_SOURCES += cairo-boilerplate-xlib.h
libcairoboilerplate_la_SOURCES += cairo-boilerplate-xlib-private.h
endif
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am
index d2a65e1..b1d113c 100644
--- a/doc/public/Makefile.am
+++ b/doc/public/Makefile.am
@@ -26,11 +26,6 @@ IGNORE_HFILES= \
$(unsupported_cairo_headers) \
$(NULL)
-# CFLAGS and LDFLAGS for compiling scan program. Only needed
-# if $(DOC_MODULE).types is non-empty.
-INCLUDES =
-GTKDOC_LIBS =
-
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml
diff --git a/perf/Makefile.am b/perf/Makefile.am
index aba38a3..acafc7a 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir)/boilerplate \
-I$(top_srcdir)/src \
diff --git a/src/Makefile.am b/src/Makefile.am
index 7f9e11e..0c8dccc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ DISTCLEANFILES =
MAINTAINERCLEANFILES =
BUILT_SOURCES =
-INCLUDES = -I$(srcdir) $(CAIRO_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
if OS_WIN32
export_symbols = -export-symbols cairo.def
@@ -94,14 +94,14 @@ CLEANFILES += check-link
# The pre-processed result is used by check-{def,plt}.sh to determine whether
# cairo has been compiled with symbol hiding.
.c.i: $(cairoinclude_HEADERS) $(nodist_cairoinclude_HEADERS) cairoint.h $(top_builddir)/config.h
- $(CPP) -DHAVE_CONFIG_H -I$(top_builddir) -I. $(INCLUDES) $< -o $@
+ $(CPP) -DHAVE_CONFIG_H -I$(top_builddir) -I. $(AM_CPPFLAGS) $< -o $@
CLEANFILES += *.i *.s
SPARSE = sparse
sparse:
@status=true; for f in $(enabled_cairo_sources); do \
echo sparse $$f; \
- $(SPARSE) -I$(top_builddir) $(INCLUDES) -DHAVE_CONFIG_H $$f || status=false; \
+ $(SPARSE) -I$(top_builddir) $(AM_CPPFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
done; $$status
SPLINT = splint -badflag
@@ -109,12 +109,12 @@ splint:
@status=true; for f in $(enabled_cairo_sources); do \
test "$$f" = "`echo "$$f" | sed 's/[.]h$$//'`" || continue; \
echo sparse $$f; \
- $(SPLINT) -I$(top_builddir) $(INCLUDES) -DHAVE_CONFIG_H $$f || status=false; \
+ $(SPLINT) -I$(top_builddir) $(AM_CPPFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
done; $$status
UNO = uno
uno:
- @cpp_flags=`echo $(INCLUDES) | sed 's/\(-I.*\) /\1 /g'`; \
+ @cpp_flags=`echo $(AM_CPPFLAGS) | sed 's/\(-I.*\) /\1 /g'`; \
files=`echo $(enabled_cairo_sources) | sed 's/[^ ]*\.h//g'`; \
$(UNO) -I$(top_builddir) $$cpp_flags -DHAVE_CONFIG_H -U__GNUC__ $$files
diff --git a/test/Makefile.am b/test/Makefile.am
index 3131c0a..1d27dbd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -837,7 +837,7 @@ check-local:
check_PROGRAMS =
EXTRA_PROGRAMS =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(srcdir) \
-I$(srcdir)/pdiff \
-I$(top_srcdir)/boilerplate \
commit f84e7b6e656678e105171be12ef265ae60e4b1f7
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Sep 8 15:10:06 2008 -0400
[configure.ac] Opt for more automake warnings and checks
diff --git a/autogen.sh b/autogen.sh
index 81bd8ab..380b965 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,7 +16,7 @@ PACKAGE=cairo
LIBTOOLIZE_FLAGS="--copy --force"
AUTOHEADER=${AUTOHEADER-autoheader}
-AUTOMAKE_FLAGS="--add-missing --foreign"
+AUTOMAKE_FLAGS="--add-missing --gnu -Wall"
AUTOCONF=${AUTOCONF-autoconf}
CONFIGURE_AC=
diff --git a/configure.ac b/configure.ac
index b159293..b11f78c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([cairo],
AC_CONFIG_SRCDIR(src/cairo.h)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build)
-AM_INIT_AUTOMAKE([1.8 foreign no-define])
+AM_INIT_AUTOMAKE([1.8 gnu -Wall no-define])
dnl ===========================================================================
dnl
commit a374b349bfe5dc4afa23ceea8d808560c5d7ac84
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Sep 7 17:43:30 2008 -0400
[configure.ac.enable] Make feature hooks take an ENABLED argument
Simplifies code.
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index 52d37bc..ba70303 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -181,7 +181,16 @@ AC_DEFUN([CAIRO_FEATURE_IF_ENABLED],
AS_IF([test "x$use_]m4_default([$1], cr_feature)[" = xyes], [$2], [$3])
])
-m4_define([_CAIRO_FEATURE_HOOK_MATCH],
+m4_define([_CAIRO_FEATURE_HOOK_MATCH_SH_BOOL],
+[
+ m4_case([$1],
+ [*], [$3],
+ [no], [AS_IF([test "x$2" != xyes], [:m4_newline$3])],
+ [yes], [AS_IF([test "x$2" = xyes], [:m4_newline$3])],
+ [m4_fatal([Invalid ENABLED value `]$1['])])
+])
+
+m4_define([_CAIRO_FEATURE_HOOK_MATCH_M4],
[
m4_case([$1],
[*], [$3],
@@ -193,20 +202,26 @@ m4_define([_CAIRO_FEATURE_HOOK_MATCH],
m4_define([_CAIRO_FEATURE_HOOKS])
dnl
-dnl CAIRO_FEATURE_HOOK_REGISTER(DEFAULT, WHAT, COMMANDS)
+dnl CAIRO_FEATURE_HOOK_REGISTER(ENABLED, DEFAULT, WHAT, COMMANDS)
dnl
+dnl ENABLED is the feature enabledness to match
dnl DEFAULT is the default value of features to match
dnl WHAT is the type of features to match
dnl COMMANDS is commands to run for matched features.
dnl
-dnl Runs COMMANDS for features matching DEFAULT and WHAT. Hooks are run for
-dnl each feature in the order they are added.
+dnl Runs COMMANDS for features matching ENABLED, DEFAULT, and WHAT.
+dnl Hooks are run for each feature in the order they are added.
dnl
dnl DEFAULT and WHAT are matched like this:
dnl [*] matches all values
dnl [val] matches [val]
dnl [!val] matches anything other than [val]
dnl
+dnl ENABLED is matched like this:
+dnl [yes] matches enabled features
+dnl [no] matches disabled features
+dnl [*] matches all features
+dnl
dnl The following macros can be used in COMMANDS:
dnl
dnl cr_feature expands to the feature id, eg "ft"
@@ -222,7 +237,7 @@ dnl "functions" for set of functions
dnl "" for private configurations
dnl
dnl These four values are also set as $1 to $4. To know if feature was
-dnl enabled use CAIRO_FEATURE_IF_ENABLED:
+dnl enabled from within COMMANDS, use CAIRO_FEATURE_IF_ENABLED:
dnl
dnl CAIRO_FEATURE_IF_ENABLED($1, [IF-ENABLED], [IF-DISABLED])
dnl
@@ -234,10 +249,11 @@ AC_DEFUN([CAIRO_FEATURE_HOOK_REGISTER],
[
m4_append([_CAIRO_FEATURE_HOOKS],
[
- _CAIRO_FEATURE_HOOK_MATCH([$1], cr_feature_default,
- [_CAIRO_FEATURE_HOOK_MATCH([$2], cr_feature_what,
- [$3]
- )])
+ _CAIRO_FEATURE_HOOK_MATCH_M4([$2], cr_feature_default,
+ [_CAIRO_FEATURE_HOOK_MATCH_M4([$3], cr_feature_what,
+ [_CAIRO_FEATURE_HOOK_MATCH_SH_BOOL([$1], [$use_]cr_feature,
+ [$4]
+ )])])
], m4_newline)
])
@@ -312,7 +328,7 @@ dnl ===========================================================================
dnl
dnl Automake conditionals for all features
dnl
-CAIRO_FEATURE_HOOK_REGISTER(*,*,
+CAIRO_FEATURE_HOOK_REGISTER(*,*,*,
[
AM_CONDITIONAL(cr_feature_tag, test "x$use_$1" = xyes)
])
@@ -332,16 +348,12 @@ AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
dnl ===========================================================================
dnl
-dnl Accumulate values for all feature vars
+dnl Accumulate values for all feature vars for enabled features
dnl
-CAIRO_FEATURE_HOOK_REGISTER(*,*,
+CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
[
- CAIRO_FEATURE_IF_ENABLED($1,
- [
- CAIRO_FEATURE_VARS_FOREACH([cr_var], [[test -n "$]cr_feature[_]cr_var[" && CAIRO_]cr_var[="$]cr_feature[_]cr_var[ $CAIRO_]cr_var["]
- ])
- ])
+ CAIRO_FEATURE_VARS_FOREACH([cr_var], [[test -n "$]cr_feature[_]cr_var[" && CAIRO_]cr_var[="$]cr_feature[_]cr_var[ $CAIRO_]cr_var["]]m4_newline)
])
@@ -379,21 +391,21 @@ CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.win32.config],
[CAIRO_CONFIG_WIN32='$CAIRO_CONFIG_WIN32'])
dnl Collect list of all supported cairo headers
-CAIRO_FEATURE_HOOK_REGISTER(!no,*,
+CAIRO_FEATURE_HOOK_REGISTER(*,!no,*,
[
CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'm4_newline()supported_cairo_headers += $(cairo_$1_headers)'
CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'm4_newline()supported_cairo_headers += $(cairo_$1_headers)'
])
dnl Collect list of all unsupported cairo headers
-CAIRO_FEATURE_HOOK_REGISTER(no,*,
+CAIRO_FEATURE_HOOK_REGISTER(*,no,*,
[
CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'm4_newline()unsupported_cairo_headers += $(cairo_$1_headers)'
CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'm4_newline()unsupported_cairo_headers += $(cairo_$1_headers)'
])
dnl Collect list of all/enabled cairo source files
-CAIRO_FEATURE_HOOK_REGISTER(*,*,
+CAIRO_FEATURE_HOOK_REGISTER(*,*,*,
[
CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
all_cairo_pkgconf += $(cairo_$1_pkgconf)
@@ -436,29 +448,26 @@ CAIRO_FEATURE_VARS_REGISTER([CFLAGS NONPKGCONFIG_CFLAGS])
CAIRO_FEATURE_VARS_REGISTER([LIBS NONPKGCONFIG_LIBS], [$LIBS])
dnl Generate .pc files for enabled features
-CAIRO_FEATURE_HOOK_REGISTER(*,*,
+CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
[
- CAIRO_FEATURE_IF_ENABLED($1,
+ m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
+ AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
[
- m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
- AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
- [
- $SED -i -e "
- s, at backend_name@,$1,g;
- s, at Backend_Name@,cr_feature_name,g;
- s, at BACKEND_BASE@,$$1_BASE,g;
- s, at BACKEND_REQUIRES@,$$1_REQUIRES,g;
- s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
- s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g;
- " "]cairo_backend_pc()[" ||
- AC_MSG_ERROR(failed to update ]cairo_backend_pc()[)
- ],[
- SED='$SED'
- $1_BASE='$$1_BASE'
- $1_REQUIRES='$$1_REQUIRES'
- $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
- $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
- ])
+ $SED -i -e "
+ s, at backend_name@,$1,g;
+ s, at Backend_Name@,cr_feature_name,g;
+ s, at BACKEND_BASE@,$$1_BASE,g;
+ s, at BACKEND_REQUIRES@,$$1_REQUIRES,g;
+ s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
+ s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g;
+ " "]cairo_backend_pc()[" ||
+ AC_MSG_ERROR(failed to update ]cairo_backend_pc()[)
+ ],[
+ SED='$SED'
+ $1_BASE='$$1_BASE'
+ $1_REQUIRES='$$1_REQUIRES'
+ $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
+ $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
])
])
@@ -469,24 +478,19 @@ dnl Generate src/cairo-features.h src/cairo-supported-features.h
dnl
dnl Collect list of enabled features
-CAIRO_FEATURE_HOOK_REGISTER(*,*,
+CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
[
- CAIRO_FEATURE_IF_ENABLED($1,
- [
- CAIRO_FEATURES="cr_feature_tag $CAIRO_FEATURES"
- ])
+ CAIRO_FEATURES="cr_feature_tag $CAIRO_FEATURES"
])
-CAIRO_FEATURE_HOOK_REGISTER(!no,*,
+dnl Collect list of all supported features
+CAIRO_FEATURE_HOOK_REGISTER(*,!no,*,
[
- dnl Collect list of all supported features
CAIRO_SUPPORTED_FEATURES="cr_feature_tag $CAIRO_SUPPORTED_FEATURES"
-
- dnl Collect list of all supported but disabled features
- CAIRO_FEATURE_IF_ENABLED($1,[],
- [
- CAIRO_NO_FEATURES="cr_feature_tag $CAIRO_NO_FEATURES"
- ])
-
+])
+dnl Collect list of all supported but disabled features
+CAIRO_FEATURE_HOOK_REGISTER(no,!no,*,
+[
+ CAIRO_NO_FEATURES="cr_feature_tag $CAIRO_NO_FEATURES"
])
dnl Accumulators
@@ -544,23 +548,15 @@ dnl Accumulator for warning messages
CAIRO_FEATURE_VARS_REGISTER([WARNING_MESSAGE])
dnl Collect warning message for enabled unsupported backends
-CAIRO_FEATURE_HOOK_REGISTER(no,*,
+CAIRO_FEATURE_HOOK_REGISTER(yes,no,*,
[
- CAIRO_FEATURE_IF_ENABLED($1,
- [
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([The ]cr_feature_name[ feature is still under active development and is included in this release only as a preview. It does NOT fully work yet and incompatible changes may yet be made to ]cr_feature_name[ specific API.], [--- ],, 78)
-"
- ])
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([The ]cr_feature_name[ feature is still under active development and is included in this release only as a preview. It does NOT fully work yet and incompatible changes may yet be made to ]cr_feature_name[ specific API.], [--- ],, 78)m4_newline"
])
dnl Collect warning message for disabled recommended backends
-CAIRO_FEATURE_HOOK_REGISTER(yes,*,
+CAIRO_FEATURE_HOOK_REGISTER(no,yes,*,
[
- CAIRO_FEATURE_IF_ENABLED($1,
- [],[
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([It is strictly recommended that you do NOT disable the ]cr_feature_name[ backend.], [+++ ],, 78)
-"
- ])
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([It is strictly recommended that you do NOT disable the ]cr_feature_name[ backend.], [+++ ],, 78)m4_newline"
])
More information about the cairo-commit
mailing list