[cairo-commit] 5 commits - doc/Makefile.am Makefile.am test/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Aug 10 21:25:48 PDT 2006


 Makefile.am      |   98 +++++++++++++++++++++++++++++++++++++++++++------------
 doc/Makefile.am  |    2 -
 test/Makefile.am |   22 ++++++------
 3 files changed, 90 insertions(+), 32 deletions(-)

New commits:
diff-tree affc9c71acc1ea206dee0a4056c4f5b307fc7f38 (from c04ccc95fa3cd4272889b1e66e4de5e1bef53ae0)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 11 00:24:01 2006 -0400

    [Makefile.am] Add $(AM_MAKEFLAGS) to recursive make invocations

diff --git a/Makefile.am b/Makefile.am
index 31f8134..09f823a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,15 +1,17 @@
 DIST_SUBDIRS = pixman src test doc
 SUBDIRS = pixman src doc
 
-.PHONY: doc test
+.PHONY: doc test retest recheck check-valgrind
 doc:
-	-$(MAKE) -C doc doc
+	cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
 test: all
-	-$(MAKE) -C test test
+	cd test && $(MAKE) $(AM_MAKEFLAGS) test
 retest: all
-	-$(MAKE) -C test retest
+	cd test && $(MAKE) $(AM_MAKEFLAGS) retest
 recheck: all
-	-$(MAKE) -C test recheck
+	cd test && $(MAKE) $(AM_MAKEFLAGS) recheck
+check-valgrind: all
+	cd test && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
 
 # libpng is required for our test programs
 if CAIRO_HAS_PNG_FUNCTIONS
@@ -36,9 +38,6 @@ MAINTAINERCLEANFILES = \
 	$(srcdir)/mkinstalldirs \
 	`find "$(srcdir)" -type f -name Makefile.in -print`
 
-check-valgrind: all
-	$(MAKE) -C test check-valgrind
-
 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
 
 # Creating ChangeLog files from git log:
@@ -67,7 +66,7 @@ MAINTAINERCLEANFILES += $(srcdir)/Change
 DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
 
 changelogs:
-	@$(MAKE) $(CHANGELOGS)
+	@$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
 
 dist-hook: changelogs
 	changelogs="$(CHANGELOGS)"; \
@@ -83,7 +82,7 @@ $(srcdir)/ChangeLog:
 		nearest_tag=`git-describe | sed 's/-[^-]*//'`; \
 		before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
 		after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
-		$(MAKE) $$before $$after && \
+		$(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
 		echo Creating $@ && \
 		{ cat $$after; echo; cat $$before; } > $@; \
 	else \
@@ -266,4 +265,4 @@ docs-publish: all
 	scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
 	ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && rm -f manual && ln -s $(MANUAL_DATED) manual && ln -sf $(MANUAL_TAR_FILE) cairo-manual.tar.gz"
 
-.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish test retest recheck
+.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 74d8298..4bca815 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,4 @@
 SUBDIRS=public
 .PHONY: doc
 doc:
-	-$(MAKE) -C public doc
+	cd public && $(MAKE) $(AM_MAKEFLAGS) public doc
diff --git a/test/Makefile.am b/test/Makefile.am
index 7a40739..7342391 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -448,7 +448,7 @@ CLEANFILES =					\
 # Check tests under valgrind
 # Saves log to valgrind-log
 check-valgrind:
-	$(MAKE) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute valgrind --tool=memcheck --suppressions=./.valgrind-suppressions --leak-check=yes --show-reachable=yes' 2>&1 | tee valgrind-log
+	$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute valgrind --tool=memcheck --suppressions=./.valgrind-suppressions --leak-check=yes --show-reachable=yes' 2>&1 | tee valgrind-log
 
 # The following definitions both should work.
 #FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo`
@@ -459,20 +459,20 @@ recheck = check TESTS="$(FAILED_TESTS)"
 # Re-checks all failed tests, i.e. tests with a log file that has a failure
 recheck:
 	@echo Re-checking failed tests
-	@$(MAKE) $(recheck)
+	@$(MAKE) $(AM_MAKEFLAGS) $(recheck)
 
 # Checks tests and creates index.html.
 # Target doesn't fail if tests fail.
 test:
-	@$(MAKE) check; \
-	$(MAKE) html
+	@$(MAKE) $(AM_MAKEFLAGS) check; \
+	$(MAKE) $(AM_MAKEFLAGS) html
 
 # Re-checks tests and creates index.html.
 # Target doesn't fail if tests fail.
 retest:
 	@TESTS="$(FAILED_TESTS)"; \
-	$(MAKE) TESTS="$$TESTS" check; \
-	$(MAKE) TESTS="$$TESTS" html
+	$(MAKE) $(AM_MAKEFLAGS) TESTS="$$TESTS" check; \
+	$(MAKE) $(AM_MAKEFLAGS) TESTS="$$TESTS" html
 
 # Make index.html with no dependency tracking.
 html:
@@ -481,7 +481,7 @@ html:
 
 # Make index.html with no dependency tracking, containing only the failed tests.
 rehtml:
-	@$(MAKE) TESTS="$(FAILED_TESTS)" html
+	@$(MAKE) $(AM_MAKEFLAGS) TESTS="$(FAILED_TESTS)" html
 
 $(TESTS): $(SUPPORT_PROGS)
 
diff-tree c04ccc95fa3cd4272889b1e66e4de5e1bef53ae0 (from 9b5c5b75701e8f8d5270d248c0eaac07aa5eb52a)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 10 23:49:50 2006 -0400

    [ChangeLog] Make ChangeLog creation faster by caching partial results
    The ChangeLog.pre-* files once generated, cannot be outdated and don't need
    update anymore, but the main ChangeLog needs update everytime a git operation
    is performed (commit, checkout, etc.)  Previously, we were forcing a ChangeLog
    recreation by making it a phony target.  Now, we break it into two parts:  One
    up to the latest tag (as returned by git-describe), and another from there.
    The former is, again, up-to-date when it exists.  The latter, we make it
    depend on .git.  And since the latter is pretty short anyway, you get a very
    first regeneration of it when you change your repo (and that only happens
    during 'make dist' by the way.)

diff --git a/Makefile.am b/Makefile.am
index e636263..31f8134 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,27 +76,50 @@ dist-hook: changelogs
 		cp $$changelog $(distdir)/; \
 	done
 
+$(srcdir)/ChangeLog:
+	@if test -d "$(srcdir)/.git"; then \
+		version=$(CURR_CHANGELOG_VERSION); \
+		prev=$(PREV_CHANGELOG_VERSION).0; \
+		nearest_tag=`git-describe | sed 's/-[^-]*//'`; \
+		before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
+		after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
+		$(MAKE) $$before $$after && \
+		echo Creating $@ && \
+		{ cat $$after; echo; cat $$before; } > $@; \
+	else \
+		test -f $@ || \
+		(echo A git checkout is required to generate $@ >&2 && \
+		 echo A git checkout is required to generate this file >> $@); \
+	fi
+
+ChangeLog.cache-*..: .git
+
 ChangeLog%: $(srcdir)/ChangeLog%
 
-$(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-%:
+$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
 	@echo Creating $@
 	@if test -d "$(srcdir)/.git"; then \
 	  (cd "$(srcdir)" && \
 	  version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
-	  to=$$version; \
-	  test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
-	  from=$(PREV_CHANGELOG_VERSION); \
-	  test "x$$to" = x || version=$$version.0; \
-	  test "x$$from" = xinitial || from=$$from.0; \
-	  ./missing --run git-log --stat $$from..$$to) > $@.tmp \
+	  if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
+		spec=$$version; \
+	  else \
+		to=$$version; \
+		test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
+		from=$(PREV_CHANGELOG_VERSION); \
+		test "x$$to" = x || version=$$version.0; \
+		test "x$$from" = xinitial || from=$$from.0; \
+		spec=$$from..$$to; \
+	  fi; \
+	  ./missing --run git-log --stat "$$spec") > $@.tmp \
 	  && mv -f $@.tmp $@ \
 	  || ($(RM) $@.tmp; \
 	      echo Failed to generate $@, your $@ may be outdated >&2; \
 	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
 	else \
 	  test -f $@ || \
-	  (echo A git checkout and git-log is required to generate $@ >&2 && \
-	  echo A git checkout and git-log is required to generate this file >> $@); \
+	  (echo A git checkout is required to generate $@ >&2 && \
+	  echo A git checkout is required to generate this file >> $@); \
 	fi
 
 .PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
diff-tree 9b5c5b75701e8f8d5270d248c0eaac07aa5eb52a (from 91a59251806c3836cbc58b009aae8b016feab5a4)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 10 20:41:05 2006 -0400

    [ChangeLog] Remove 'fmt' formatting of the ChangeLogs
    We assume that people write wrapped commit messages, which is true these days
    but was not back in the CVS days.

diff --git a/Makefile.am b/Makefile.am
index f65b6d6..e636263 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -88,7 +88,7 @@ $(srcdir)/ChangeLog $(srcdir)/ChangeLog.
 	  from=$(PREV_CHANGELOG_VERSION); \
 	  test "x$$to" = x || version=$$version.0; \
 	  test "x$$from" = xinitial || from=$$from.0; \
-	  ./missing --run git-log --stat $$from..$$to) | fmt --split-only > $@.tmp \
+	  ./missing --run git-log --stat $$from..$$to) > $@.tmp \
 	  && mv -f $@.tmp $@ \
 	  || ($(RM) $@.tmp; \
 	      echo Failed to generate $@, your $@ may be outdated >&2; \
diff-tree 91a59251806c3836cbc58b009aae8b016feab5a4 (from ee885c76af0c715ffd316d4c7cc1b61db46af1ae)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 10 20:36:16 2006 -0400

    Create multiple ChangeLog files segmented around major releases
    For an imaginary cairo-3.6.4 version, we now will generate the following
    ChangeLog files:
    
    	ChangeLog
    	ChangeLog.pre-3.4
    	ChangeLog.pre-3.2
    	ChangeLog.pre-3.0
    	ChangeLog.pre-2.0
    	ChangeLog.pre-1.0

diff --git a/Makefile.am b/Makefile.am
index 8ce2bc4..f65b6d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,36 +41,72 @@ check-valgrind: all
 
 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
 
-# Creating ChangeLog from git log:
+# Creating ChangeLog files from git log:
 
-MAINTAINERCLEANFILES += ChangeLog
+# We always create a ChangeLog that contains the most recent changes, and
+# multiple others for changes between major releases (other than the last such
+# segment that we put in 'ChangeLog'.  The old ones are named
+# ChangeLog.pre-X.Y where X.Y is the version number of the major release.
+
+CURR_CHANGELOG_VERSION=$(CAIRO_VERSION_MAJOR).$$(echo "($(CAIRO_VERSION_MINOR)+1)/2*2" | bc)
+# examines $version
+PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
+			  then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
+			  else echo "$$version-1.0"; \
+			  fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
+
+CHANGELOGS = ChangeLog \
+	`version=$(CURR_CHANGELOG_VERSION); \
+	version=$(PREV_CHANGELOG_VERSION); \
+	while test "x$$version" != xinitial; do \
+		echo ChangeLog.pre-$$version; \
+		version=$(PREV_CHANGELOG_VERSION); \
+	done`
+
+MAINTAINERCLEANFILES += $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-*
+DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
+
+changelogs:
+	@$(MAKE) $(CHANGELOGS)
+
+dist-hook: changelogs
+	changelogs="$(CHANGELOGS)"; \
+	for changelog in $$changelogs; do \
+		cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
+		cp $$changelog $(distdir)/; \
+	done
 
-EXTRA_DIST += ChangeLog
+ChangeLog%: $(srcdir)/ChangeLog%
 
-ChangeLog: $(srcdir)/ChangeLog
-
-$(srcdir)/ChangeLog:
+$(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-%:
+	@echo Creating $@
 	@if test -d "$(srcdir)/.git"; then \
 	  (cd "$(srcdir)" && \
-	  ./missing --run git-log --stat) | fmt --split-only > $@.tmp \
+	  version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
+	  to=$$version; \
+	  test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
+	  from=$(PREV_CHANGELOG_VERSION); \
+	  test "x$$to" = x || version=$$version.0; \
+	  test "x$$from" = xinitial || from=$$from.0; \
+	  ./missing --run git-log --stat $$from..$$to) | fmt --split-only > $@.tmp \
 	  && mv -f $@.tmp $@ \
 	  || ($(RM) $@.tmp; \
-	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+	      echo Failed to generate $@, your $@ may be outdated >&2; \
 	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
 	else \
 	  test -f $@ || \
-	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+	  (echo A git checkout and git-log is required to generate $@ >&2 && \
 	  echo A git checkout and git-log is required to generate this file >> $@); \
 	fi
 
-.PHONY: ChangeLog $(srcdir)/ChangeLog
+.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
 
 # Some custom targets to make it easier to release things.
 # Use either:
 #		make release-check
 # or		make release-publish
 
-RELEASE_OR_SNAPSHOT = `if [ "$(CAIRO_VERSION_MINOR)" = $$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc) ]; then echo release; else echo snapshot; fi`
+RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ]; then echo release; else echo snapshot; fi)
 RELEASE_UPLOAD_HOST =   cairographics.org
 RELEASE_UPLOAD_BASE =	/srv/cairo.freedesktop.org/www
 RELEASE_UPLOAD_DIR =	$(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s
diff-tree ee885c76af0c715ffd316d4c7cc1b61db46af1ae (from 915448e50f18d518c065dbde6d8857e4c91d2a51)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 10 18:54:18 2006 -0400

    [test] Update EXTRA_DIST after beos_bitmap -> beos-bitmap change

diff --git a/test/Makefile.am b/test/Makefile.am
index 5975806..7a40739 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -231,8 +231,8 @@ line-width-scale-ref.png				\
 line-width-scale-ps-argb32-ref.png			\
 mask-ref.png						\
 mask-rgb24-ref.png					\
-mask-beos_bitmap-argb32-ref.png				\
-mask-beos_bitmap-rgb24-ref.png				\
+mask-beos-bitmap-argb32-ref.png				\
+mask-beos-bitmap-rgb24-ref.png				\
 mask-beos-rgb24-ref.png					\
 mask-svg-argb32-ref.png					\
 mask-svg-rgb24-ref.png					\
@@ -285,7 +285,7 @@ self-intersecting-ref.png				\
 self-intersecting-rgb24-ref.png				\
 set-source-ref.png					\
 set-source-rgb24-ref.png				\
-set-source-beos_bitmap-rgb24-ref.png			\
+set-source-beos-bitmap-rgb24-ref.png			\
 set-source-beos-rgb24-ref.png				\
 set-source-svg-argb32-ref.png				\
 set-source-svg-rgb24-ref.png				\
@@ -311,7 +311,7 @@ transforms-ps-argb32-ref.png				\
 translate-show-surface-ref.png				\
 trap-clip-ref.png					\
 trap-clip-rgb24-ref.png					\
-trap-clip-beos_bitmap-rgb24-ref.png			\
+trap-clip-beos-bitmap-rgb24-ref.png			\
 trap-clip-beos-rgb24-ref.png				\
 trap-clip-svg-argb32-ref.png				\
 trap-clip-svg-rgb24-ref.png				\


More information about the cairo-commit mailing list