Commit a7dc90d9 authored by Bruce Momjian's avatar Bruce Momjian

When performing a parallel build (make -j N) with ./configure

--enable-depend it often tries to create the .deps directory twice and
bails out when it already exists due to a race condition of if doesn't
exist, then create.  This patch prevents mkdir from returning an error.

Kris Jurka
parent 79b95643
# -*-makefile-*- # -*-makefile-*-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.220 2005/09/27 17:39:32 tgl Exp $ # $PostgreSQL: pgsql/src/Makefile.global.in,v 1.221 2006/02/12 07:29:36 momjian Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
...@@ -536,7 +536,7 @@ df = $(DEPDIR)/$(*F) ...@@ -536,7 +536,7 @@ df = $(DEPDIR)/$(*F)
# This converts a .d file in the current directory to a .P file in the .deps # This converts a .d file in the current directory to a .P file in the .deps
# subdirectory, with the dummy targets as explained above. # subdirectory, with the dummy targets as explained above.
define postprocess-depend define postprocess-depend
@if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi @if test ! -d $(DEPDIR); then mkdir -p $(DEPDIR); fi
@cp $*.d $(df).P @cp $*.d $(df).P
@sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ @sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(df).P -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(df).P
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment