[pango] Bug 587768 - [patch] Don't build pango-view twice



commit 16c3f1d491a04eb8b12f209f97904c7862fbb9db
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Nov 10 17:09:31 2009 -0500

    Bug 587768 - [patch] Don't build pango-view twice
    
    Try to fix parallel build..

 pango-view/Makefile.am |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/pango-view/Makefile.am b/pango-view/Makefile.am
index 7a5e25e..49af661 100644
--- a/pango-view/Makefile.am
+++ b/pango-view/Makefile.am
@@ -84,20 +84,27 @@ endif
 
 #########################################################
 
-MAINTAINERCLEANFILES = pango-view.1
+MAINTAINERCLEANFILES = pango-view.1 pango-view.stamp
+EXTRA_DIST += pango-view.stamp
 
 dist_man_MANS = pango-view.1
 
-$(srcdir)/pango-view.1: ../configure.in $(pango_view_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) pango-view$(EXEEXT)
-	$(AM_V_GEN) $(top_builddir)/missing --run \
+# The indirection through pango-view.stamp is to make parallel build work.
+# See bug 587768.
+pango-view.stamp: ../configure.in $(pango_view_SOURCES)
+	$(AM_V_GEN) X="$(srcdir)/pango-view.1"; \
+	$(top_builddir)/missing --run \
 	   help2man --no-info --section=1 \
-		    --help-option="--help-all" --output="$  tmp" \
+		    --help-option="--help-all" --output="$$X.tmp" \
 		    --name 'Pango text viewer' ./pango-view \
-	 && mv "$  tmp" "$@" \
-	  || ($(RM) "$@"; \
-	      echo Failed to update pango-view.1, the man page may be outdated >&2; \
-	      (test -f "$@" || echo help2man is required to generate this file. >> "$@"));
+	 && mv "$$X.tmp" "$$X" && touch $@ \
+	  || (echo Failed to update pango-view.1, the man page may be outdated >&2; \
+	      (test -f "$$X" || echo help2man is required to generate this file. >> "$$X"));
+$(srcdir)/pango-view.1: pango-view$(EXEEXT) pango-view.stamp
+	$(AM_V_GEN) if test -f $@; then touch $@; else \
+		$(RM) pango-view.stamp; \
+		$(MAKE) $(AM_MAKEFLAGS) pango-view.stamp; \
+	fi
 
 #########################################################
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]