[cairo-commit] 2 commits - acinclude.m4 autogen.sh boilerplate/Makefile.am build/configure.ac.tools build/Makefile.am.common build/Makefile.am.gtk-doc configure.ac doc/Makefile.am doc/public gtk-doc.make Makefile.am perf/Makefile.am src/Makefile.am test/Makefile.am test/pdiff util/Makefile.am
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Sep 11 13:55:30 PDT 2008
Makefile.am | 13 ++-
acinclude.m4 | 1
autogen.sh | 9 ++
boilerplate/Makefile.am | 13 +--
build/Makefile.am.common | 12 +++
build/Makefile.am.gtk-doc | 180 ++++++++++++++++++++++++++++++++++++++++++++++
build/configure.ac.tools | 4 -
configure.ac | 3
doc/Makefile.am | 5 +
doc/public/Makefile.am | 13 +--
gtk-doc.make | 157 ----------------------------------------
perf/Makefile.am | 10 +-
src/Makefile.am | 11 --
test/Makefile.am | 13 +--
test/pdiff/Makefile.am | 10 +-
util/Makefile.am | 8 +-
16 files changed, 250 insertions(+), 212 deletions(-)
New commits:
commit 694fee9e7c3073613359d9734f64f65964c3aa53
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 11 16:04:06 2008 -0400
Update gtk-doc makefile fragment
Also move it to build/.
We still do not call gtkdocize from autogen.sh.
diff --git a/acinclude.m4 b/acinclude.m4
index 1cadb9c..d065e8e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3,3 +3,4 @@ dnl -*- mode: autoconf -*-
dnl [m4_newline] didn't appear until autoconf 2.62
m4_ifdef([m4_newline],,m4_define([m4_newline],[
]))
+
diff --git a/autogen.sh b/autogen.sh
index 7aedf1d..800640a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -17,6 +17,8 @@ PACKAGE=cairo
LIBTOOLIZE_FLAGS="--copy --force --automake"
ACLOCAL_FLAGS="-I build"
AUTOHEADER=${AUTOHEADER-autoheader}
+GTKDOCIZE_FLAGS="--copy"
+GTKDOCIZE=${GTKDOCIZE-gtkdocize}
AUTOMAKE_FLAGS="--add-missing --gnu -Wall"
AUTOCONF=${AUTOCONF-autoconf}
@@ -29,7 +31,7 @@ if test "X$CONFIGURE_AC" = X; then
fi
extract_version() {
- grep "^ *$1" $CONFIGURE_AC build/configure.ac.* | sed 's/.*(\[*\([^])]*\)]*).*/\1/'
+ grep "^ *$1" "$CONFIGURE_AC" | sed 's/.*(\[*\([^])]*\)]*).*/\1/'
}
autoconf_min_vers=`extract_version AC_PREREQ`
@@ -171,6 +173,11 @@ do_cmd $AUTOHEADER
touch src/Makefile.am.config
touch ChangeLog
+# We don't call gtkdocize right now. When we do, we should then modify
+# the generated gtk-doc.make and move it to build/Makefile.am.gtk-doc.
+# See that file for details.
+#do_cmd $GTKDOCIZE $GTKDOCIZE_FLAGS
+
do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
do_cmd $AUTOCONF
diff --git a/build/Makefile.am.gtk-doc b/build/Makefile.am.gtk-doc
new file mode 100644
index 0000000..cb81599
--- /dev/null
+++ b/build/Makefile.am.gtk-doc
@@ -0,0 +1,180 @@
+# Modified for cairo minimally:
+# - Moved to build/
+# - Made it append to EXTRA_DIST and CLEANFILES
+# - Instead of all-local, make "doc" build docs, and err if gtk-doc not enabled
+
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST += \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES += $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+doc: html-build.stamp
+else
+doc:
+ @echo "*** gtk-doc must be installed and enabled in order to make doc"
+ @false
+endif
+
+docs: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ -installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ which gtkdoc-rebase >/dev/null && \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
+ fi
+
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/build/configure.ac.tools b/build/configure.ac.tools
index d2b11c8..a24dbce 100644
--- a/build/configure.ac.tools
+++ b/build/configure.ac.tools
@@ -2,14 +2,10 @@
AC_PATH_PROG(FIND, find)
AC_PATH_PROG(XARGS, xargs)
-GTK_DOC_CHECK([1.6])
-
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX dnl required for BeOS (and cannot be a conditional dependency)
AM_PROG_CC_C_O
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
AC_C_INLINE
dnl ===========================================================================
diff --git a/configure.ac b/configure.ac
index fbf52a5..2f211cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,9 @@ AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build)
AC_CONFIG_MACRO_DIR(build)
AM_INIT_AUTOMAKE([1.8 gnu -Wall no-define])
+AC_LIBTOOL_WIN32_DLL dnl Must be called before AC_PROG_LIBTOOL
+AC_PROG_LIBTOOL([1.4])
+GTK_DOC_CHECK([1.6])
dnl ===========================================================================
dnl
diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am
index cc0bbba..e5ed28f 100644
--- a/doc/public/Makefile.am
+++ b/doc/public/Makefile.am
@@ -42,14 +42,14 @@ HTML_IMAGES =
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=
-include $(top_srcdir)/gtk-doc.make
+include $(top_srcdir)/build/Makefile.am.gtk-doc
+
+dist-hook: doc
# Version information for marking the documentation
EXTRA_DIST += version.xml.in
-if ENABLE_GTK_DOC
check: doc
-endif
TESTS_ENVIRONMENT = srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" MAKE="$(MAKE)"
TESTS += check-doc-coverage.sh check-doc-syntax.sh
diff --git a/gtk-doc.make b/gtk-doc.make
deleted file mode 100644
index 02fc218..0000000
--- a/gtk-doc.make
+++ /dev/null
@@ -1,157 +0,0 @@
-# -*- mode: makefile -*-
-
-####################################
-# Everything below here is generic #
-####################################
-
-if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
-else
-GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
-endif
-
-# We set GPATH here; this gives us semantics for GNU make
-# which are more like other make's VPATH, when it comes to
-# whether a source that is a target of one rule is then
-# searched for in VPATH/GPATH.
-#
-GPATH = $(srcdir)
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE)-sections.txt \
- $(DOC_MODULE)-overrides.txt
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).interfaces \
- $(DOC_MODULE).prerequisites \
- $(DOC_MODULE).signals
-
-CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
-
-if ENABLE_GTK_DOC
-doc: html-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
- @echo 'gtk-doc: Scanning header files'
- @-chmod -R u+w $(srcdir)
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
- @echo 'gtk-doc: Rebuilding template files'
- @-chmod -R u+w $(srcdir)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-#### xml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml $(expand_content_files)
- @echo 'gtk-doc: Building XML'
- @-chmod -R u+w $(srcdir)
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-dist-hook-local: html-build.stamp
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo 'gtk-doc: Building HTML'
- @-chmod -R u+w $(srcdir)
- rm -rf $(srcdir)/html
- mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo 'gtk-doc: Fixing cross-references'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-else
-doc:
- @echo "*** gtk-doc must be installed and enabled in order to make doc"
- @false
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak
- rm -rf .libs
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-install-data-local:
- installfiles=`echo $(srcdir)/html/*`; \
- if test "$$installfiles" = '$(srcdir)/html/*'; \
- then echo '-- Nothing to install' ; \
- else \
- $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
- for i in $$installfiles; do \
- echo '-- Installing '$$i ; \
- $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
- done; \
- echo '-- Installing $(srcdir)/html/index.sgml' ; \
- $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
- fi
-
-uninstall-local:
- rm -f $(DESTDIR)$(TARGET_DIR)/*
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/xml
- mkdir $(distdir)/html
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/xml/*.xml $(distdir)/xml
- -cp $(srcdir)/html/* $(distdir)/html
- if test -f $(srcdir)/$(DOC_MODULE).types; then \
- cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \
- fi
-
-.PHONY : dist-hook-local
commit de5b8bce37f2ddb87fca7ae6b844eec7fbbbc7e9
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 11 15:49:09 2008 -0400
Makefile.am cleanup
Use a common build/Makefile.am.common file.
diff --git a/Makefile.am b/Makefile.am
index 7b55262..48ac855 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/Makefile.am.common
+
ACLOCAL_AMFLAGS = -I build
DIST_SUBDIRS = src boilerplate test perf doc util
@@ -21,7 +23,7 @@ check-valgrind: all
.PHONY: doc test retest recheck perf check-valgrind
-EXTRA_DIST = \
+EXTRA_DIST += \
AUTHORS \
BIBLIOGRAPHY \
BUGS \
@@ -40,8 +42,8 @@ EXTRA_DIST = \
cairo-version.h \
$(NULL)
-DISTCLEANFILES = config.cache
-MAINTAINERCLEANFILES = \
+DISTCLEANFILES += config.cache
+MAINTAINERCLEANFILES += \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/build/compile \
@@ -54,11 +56,12 @@ MAINTAINERCLEANFILES = \
$(srcdir)/build/mkinstalldirs \
$(srcdir)/config.h.in \
$(srcdir)/configure.scan \
- `find "$(srcdir)" -type f -name Makefile.in -print`
+ $(NULL)
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
- --enable-test-surfaces
+ --enable-test-surfaces \
+ $(NULL)
include $(srcdir)/build/Makefile.am.changelog
include $(srcdir)/build/Makefile.am.releasing
diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
index 866315f..43d2b67 100644
--- a/boilerplate/Makefile.am
+++ b/boilerplate/Makefile.am
@@ -1,6 +1,8 @@
-EXTRA_DIST = Makefile.win32
+include $(top_srcdir)/build/Makefile.am.common
-EXTRA_LTLIBRARIES = libcairoboilerplate.la
+EXTRA_DIST += Makefile.win32
+
+EXTRA_LTLIBRARIES += libcairoboilerplate.la
libcairoboilerplate_la_SOURCES = \
cairo-boilerplate.c \
@@ -94,20 +96,17 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
$(CAIRO_CFLAGS)
-CLEANFILES = \
+CLEANFILES += \
$(EXTRA_LTLIBRARIES)
-CLEANFILES += *.i *.s
-
test: check
-TESTS =
if CROSS_COMPILING
check: check-link
else
TESTS += check-link
endif
-check_PROGRAMS = check-link
+check_PROGRAMS += check-link
check_link_LDADD = libcairoboilerplate.la
CLEANFILES += check-link
diff --git a/build/Makefile.am.common b/build/Makefile.am.common
new file mode 100644
index 0000000..fd0ec3d
--- /dev/null
+++ b/build/Makefile.am.common
@@ -0,0 +1,12 @@
+BUILT_SOURCES =
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+EXTRA_LTLIBRARIES =
+EXTRA_PROGRAMS =
+MAINTAINERCLEANFILES =
+TESTS =
+check_PROGRAMS =
+
+CLEANFILES += *.i *.s
+MAINTAINERCLEANFILES += Makefile.in
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 821d5c9..864a9f1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,7 @@
+include $(top_srcdir)/build/Makefile.am.common
+
SUBDIRS=public
-.PHONY: doc
+
doc:
cd public && $(MAKE) $(AM_MAKEFLAGS) doc
+.PHONY: doc
diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am
index 6446739..cc0bbba 100644
--- a/doc/public/Makefile.am
+++ b/doc/public/Makefile.am
@@ -1,4 +1,5 @@
-## Process this file with automake to create Makefile.in.
+include $(top_srcdir)/build/Makefile.am.common
+include $(top_srcdir)/src/Makefile.am.config
# The name of the module.
DOC_MODULE=cairo
@@ -16,8 +17,6 @@ DOC_SOURCE_DIR=../../src
HFILE_GLOB=$(top_srcdir)/src/cairo-*.h
CFILE_GLOB=$(top_srcdir)/src/cairo-*.c
-include $(top_srcdir)/src/Makefile.am.config
-
# Headers to ignore
IGNORE_HFILES= \
cairo-features.h \
@@ -53,5 +52,5 @@ check: doc
endif
TESTS_ENVIRONMENT = srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" MAKE="$(MAKE)"
-TESTS = check-doc-coverage.sh check-doc-syntax.sh
+TESTS += check-doc-coverage.sh check-doc-syntax.sh
EXTRA_DIST += $(TESTS)
diff --git a/perf/Makefile.am b/perf/Makefile.am
index 0de7b11..ebe39c9 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/Makefile.am.common
+
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir)/boilerplate \
@@ -5,8 +7,8 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src \
$(CAIRO_CFLAGS)
-EXTRA_PROGRAMS = cairo-perf cairo-perf-diff-files
-EXTRA_DIST = cairo-perf-diff
+EXTRA_PROGRAMS += cairo-perf cairo-perf-diff-files
+EXTRA_DIST += cairo-perf-diff
cairo_perf_SOURCES = \
cairo-perf.c \
@@ -72,7 +74,7 @@ CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(T
# Cap the maximum number of iterations during 'make check'
TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10"
-TESTS = cairo-perf$(EXEEXT)
+TESTS += cairo-perf$(EXEEXT)
perf: cairo-perf$(EXEEXT)
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf$(EXEEXT)
@@ -90,7 +92,7 @@ VALGRIND_MEMCHECK_FLAGS = \
--leak-check=yes --show-reachable=yes
VALGRIND_CALLGRIND_FLAGS = \
--tool=callgrind
-CLEANFILES = \
+CLEANFILES += \
$(EXTRA_PROGRAMS) \
valgrind-log \
callgrind.out.* \
diff --git a/src/Makefile.am b/src/Makefile.am
index 0c8dccc..61ea4f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,11 +1,6 @@
+include $(top_srcdir)/build/Makefile.am.common
include $(srcdir)/Makefile.am.config
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-BUILT_SOURCES =
-
AM_CPPFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
if OS_WIN32
@@ -71,7 +66,6 @@ TESTS_ENVIRONMENT = \
all_cairo_files="$(all_cairo_files)" \
enabled_cairo_files="$(enabled_cairo_files)" \
$(NULL)
-TESTS =
TESTS_SH = \
check-def.sh \
check-plt.sh \
@@ -86,7 +80,7 @@ TESTS += check-link
endif
EXTRA_DIST += $(TESTS_SH) check-has-hidden-symbols.c
-check_PROGRAMS = check-link
+check_PROGRAMS += check-link
check_link_LDADD = libcairo.la
CLEANFILES += check-link
@@ -95,7 +89,6 @@ CLEANFILES += check-link
# 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. $(AM_CPPFLAGS) $< -o $@
-CLEANFILES += *.i *.s
SPARSE = sparse
sparse:
diff --git a/test/Makefile.am b/test/Makefile.am
index d83e9c1..1527d14 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,9 @@
+include $(top_srcdir)/build/Makefile.am.common
+
SUBDIRS=pdiff .
# Here are all the tests that are run unconditionally
-TESTS = \
+TESTS += \
a1-image-sample$(EXEEXT) \
a1-mask$(EXEEXT) \
a1-traps-sample$(EXEEXT) \
@@ -742,7 +744,7 @@ REFERENCE_IMAGES = \
xlib-surface-source-ref.png \
zero-alpha-ref.png
-EXTRA_DIST = \
+EXTRA_DIST += \
6x13.pcf \
make-html.pl \
romedalen.png \
@@ -829,9 +831,6 @@ check-local:
done; \
fi
-check_PROGRAMS =
-EXTRA_PROGRAMS =
-
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(srcdir)/pdiff \
@@ -840,7 +839,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src \
$(CAIRO_CFLAGS)
-EXTRA_LTLIBRARIES = libcairotest.la
+EXTRA_LTLIBRARIES += libcairotest.la
libcairotest_la_SOURCES =\
buffer-diff.c \
@@ -910,7 +909,7 @@ VALGRIND_FLAGS = \
--tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
--leak-check=yes --show-reachable=yes $(EXTRA_VALGRIND_FLAGS)
-CLEANFILES = \
+CLEANFILES += \
valgrind-log \
index.html \
ref.hash \
diff --git a/test/pdiff/Makefile.am b/test/pdiff/Makefile.am
index cc79328..73098da 100644
--- a/test/pdiff/Makefile.am
+++ b/test/pdiff/Makefile.am
@@ -1,5 +1,7 @@
-EXTRA_PROGRAMS = perceptualdiff
-EXTRA_DIST = gpl.txt
+include $(top_srcdir)/build/Makefile.am.common
+
+EXTRA_PROGRAMS += perceptualdiff
+EXTRA_DIST += gpl.txt
noinst_LTLIBRARIES = libpdiff.la
libpdiff_la_SOURCES = \
@@ -15,7 +17,3 @@ perceptualdiff_SOURCES = \
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(CAIRO_CFLAGS)
LDADD = libpdiff.la $(top_builddir)/src/libcairo.la
-#
-# Delete intermediate files as well
-clean-local:
- -${FIND} . -name '*.[is]' -print | ${XARGS} ${RM}
diff --git a/util/Makefile.am b/util/Makefile.am
index 8b1aa21..f481a21 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -1,3 +1,4 @@
+include $(top_srcdir)/build/Makefile.am.common
util: malloc-stats.so
@@ -5,11 +6,11 @@ util: malloc-stats.so
$(RM) $@
$(LN_S) .libs/$*.so $@
-CLEANFILES = *.so *.la
+CLEANFILES += *.so *.la
SOLDFLAGS = -module -avoid-version -export-dynamic -rpath /dev/null
-EXTRA_LTLIBRARIES = malloc-stats.la backtrace-symbols.la
+EXTRA_LTLIBRARIES += malloc-stats.la backtrace-symbols.la
backtrace_symbols_la_LDFLAGS = $(SOLDFLAGS)
@@ -20,7 +21,6 @@ malloc_stats_la_LDFLAGS = $(SOLDFLAGS)
malloc_stats_la_LIBADD = $(backtrace_symbols_la_LIBADD)
malloc_stats_la_SOURCES = $(backtrace_symbols_la_SOURCES) malloc-stats.c
-EXTRA_DIST = \
+EXTRA_DIST += \
xr2cairo \
cairo-api-update
-
More information about the cairo-commit
mailing list