couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [1/34] git commit: Added support for `make -j` and `make -n`
Date Wed, 12 Dec 2012 20:33:59 GMT
Updated Branches:
  refs/heads/1.3.x e64bbecd0 -> 4f786335b


Added support for `make -j` and `make -n`


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4f786335
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4f786335
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4f786335

Branch: refs/heads/1.3.x
Commit: 4f786335b5feba0b1c947a80122008da457ac085
Parents: a2fd505
Author: Noah Slater <nslater@apache.org>
Authored: Thu Dec 6 22:19:28 2012 +0000
Committer: Dave Cottlehuber <dch@apache.org>
Committed: Tue Dec 11 22:00:56 2012 +0100

----------------------------------------------------------------------
 bin/Makefile.am              |    4 +-
 share/doc/build/Makefile.am  |   80 +++++++++++++++++++++++++------------
 src/couchdb/priv/Makefile.am |    4 +-
 3 files changed, 60 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4f786335/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index d666bbd..3d7a075 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -10,6 +10,8 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
+MAKE_SAFE = $(MAKE)
+
 if WINDOWS
 bin_SCRIPTS = couchdb.bat
 else
@@ -122,7 +124,7 @@ couch-config_dev: couch-config.tpl
 # Depend on source files so distributed man pages are not rebuilt for end user.
 
 $(man_file): couchdb.tpl.in
-	$(MAKE) -f Makefile couchdb; \
+	$(MAKE_SAFE) -f Makefile couchdb; \
 	$(top_srcdir)/build-aux/missing --run \
 	    help2man \
 	        --no-info \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4f786335/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index 5346d8c..e06b21a 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -10,9 +10,10 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
+MAKE_SAFE = $(MAKE)
+
 SPHINXOPTS = \
-    -d doctrees \
-    -n -c $(srcdir)/../src \ \
+    -n -c $(srcdir)/../src \
     -A local=1 \
     $(srcdir)/../src
 
@@ -201,47 +202,74 @@ $(html_files): html
 $(info_file_dist): info.stamp
 	@if test -f $@; then :; else \
 	    rm -f info.stamp; \
-	    $(MAKE) $(AM_MAKEFLAGS) info.stamp; \
+	    $(MAKE_SAFE) $(AM_MAKEFLAGS) info.stamp; \
 	fi
 
 info.stamp: $(image_files) $(src_files)
-	@rm -f info.tmp
-	@touch info.tmp
-	$(top_srcdir)/build-aux/sphinx-build \
-	    -b texinfo $(SPHINXOPTS) $(builddir)/texinfo
-	$(MAKE) -C texinfo info
-	$(top_srcdir)/build-aux/sphinx-touch $(info_file_dist)
-	@mv -f info.tmp $@
+	trap "rm -rf info.lock info.stamp" 1 2 13 15; \
+	if mkdir info.lock 2>/dev/null; then \
+	    rm -f info.tmp; \
+	    touch info.tmp; \
+	    $(top_srcdir)/build-aux/sphinx-build \
+	        -b texinfo $(SPHINXOPTS) $(builddir)/texinfo; \
+	    $(MAKE_SAFE) -C texinfo info; \
+	    $(top_srcdir)/build-aux/sphinx-touch $(info_file_dist); \
+	    mv -f info.tmp $@; \
+	    rmdir info.lock; \
+	else \
+	    while test -d info.lock; do \
+	        sleep 1; \
+	    done; \
+	    test -f info.stamp; \
+	fi
 
 $(pdf_file_dist): pdf.stamp
 	@if test -f $@; then :; else \
 	    rm -f pdf.stamp; \
-	    $(MAKE) $(AM_MAKEFLAGS) pdf.stamp; \
+	    $(MAKE_SAFE) $(AM_MAKEFLAGS) pdf.stamp; \
 	fi
 
 pdf.stamp: $(image_files) $(src_files)
-	@rm -f pdf.tmp
-	@touch pdf.tmp
-	$(top_srcdir)/build-aux/sphinx-build \
-	    -b latex $(SPHINXOPTS) $(builddir)/latex
-	$(MAKE) -C latex all-pdf
-	$(top_srcdir)/build-aux/sphinx-touch latex/CouchDB.pdf
-	gzip -9 < latex/CouchDB.pdf > $(pdf_file_dist)
-	@mv -f pdf.tmp $@
+	trap "rm -rf pdf.lock pdf.stamp" 1 2 13 15; \
+	if mkdir pdf.lock 2>/dev/null; then \
+	    rm -f pdf.tmp; \
+	    touch pdf.tmp; \
+	    $(top_srcdir)/build-aux/sphinx-build \
+	        -b latex $(SPHINXOPTS) $(builddir)/latex; \
+	    $(MAKE_SAFE) -C latex all-pdf; \
+	    $(top_srcdir)/build-aux/sphinx-touch latex/CouchDB.pdf; \
+	    gzip -9 < latex/CouchDB.pdf > $(pdf_file_dist); \
+	    mv -f pdf.tmp $@; \
+	    rmdir pdf.lock; \
+	else \
+	    while test -d pdf.lock; do \
+	        sleep 1; \
+	    done; \
+	    test -f pdf.stamp; \
+	fi
 
 $(html_files): html.stamp
 	@if test -f $@; then :; else \
 	    rm -f html.stamp; \
-	    $(MAKE) $(AM_MAKEFLAGS) html.stamp; \
+	    $(MAKE_SAFE) $(AM_MAKEFLAGS) html.stamp; \
 	fi
 
 html.stamp: $(image_files) $(src_files) $(src_files_html)
-	@rm -f html.tmp
-	@touch html.tmp
-	$(top_srcdir)/build-aux/sphinx-build \
-	    -b html $(SPHINXOPTS) $(builddir)/html
-	$(top_srcdir)/build-aux/sphinx-touch $(html_files)
-	@mv -f html.tmp $@
+	trap "rm -rf html.lock html.stamp" 1 2 13 15; \
+	if mkdir html.lock 2>/dev/null; then \
+	    rm -f html.tmp; \
+	    touch html.tmp; \
+	    $(top_srcdir)/build-aux/sphinx-build \
+	        -b html $(SPHINXOPTS) $(builddir)/html; \
+	    $(top_srcdir)/build-aux/sphinx-touch $(html_files); \
+	    mv -f html.tmp $@; \
+	    rmdir html.lock; \
+	else \
+	    while test -d html.lock; do \
+	        sleep 1; \
+	    done; \
+	    test -f html.stamp; \
+	fi
 
 pdf-local:
 	$(MAKE) $(AM_MAKEFLAGS) pdf.stamp

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4f786335/src/couchdb/priv/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
index 8fce9d0..9a24222 100644
--- a/src/couchdb/priv/Makefile.am
+++ b/src/couchdb/priv/Makefile.am
@@ -10,6 +10,8 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
+MAKE_SAFE = $(MAKE)
+
 couchlibdir = $(localerlanglibdir)/couch-$(version)
 couchprivdir = $(couchlibdir)/priv
 couchprivlibdir = $(couchlibdir)/priv/lib
@@ -77,7 +79,7 @@ couchpriv_PROGRAMS = couchspawnkillable
 # Depend on source files so distributed man pages are not rebuilt for end user.
 
 $(man_file): $(COUCHJS_SRCS)
-	$(MAKE) -f Makefile couchjs; \
+	$(MAKE_SAFE) -f Makefile couchjs; \
 	$(top_srcdir)/build-aux/missing --run \
 	    help2man \
 	        --no-info \


Mime
View raw message