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
Index: src/Makefile.global.in
===================================================================
RCS file: /projects/cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.220
diff -c -r1.220 Makefile.global.in
*** src/Makefile.global.in      27 Sep 2005 17:39:32 -0000      1.220
--- src/Makefile.global.in      10 Feb 2006 22:23:39 -0000
***************
*** 536,542 ****
  # This converts a .d file in the current directory to a .P file in the .deps
  # subdirectory, with the dummy targets as explained above.
  define postprocess-depend
! @if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi
  @cp $*.d $(df).P
  @sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
       -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(df).P
--- 536,542 ----
  # This converts a .d file in the current directory to a .P file in the .deps
  # subdirectory, with the dummy targets as explained above.
  define postprocess-depend
! @if test ! -d $(DEPDIR); then mkdir -p $(DEPDIR); fi
  @cp $*.d $(df).P
  @sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
       -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(df).P
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to