# HG changeset patch # User Rik # Date 1387164678 28800 # Node ID a99bbbcf743c67792753524ed00709bedc411e57 # Parent 285b2dc3ddfa9be224f04448b28f228a63cadebe Fix race condition when building in cruft directory (bug #40901). * liboctave/cruft/ranlib/module.mk: Create ranlib in build directory if it does not exist. * liboctave/cruft/slatec-fn/module.mk: Create slatec-fn in build directory if it does not exist. diff -r 285b2dc3ddfa -r a99bbbcf743c liboctave/cruft/ranlib/module.mk --- a/liboctave/cruft/ranlib/module.mk Sun Dec 15 21:07:55 2013 +0100 +++ b/liboctave/cruft/ranlib/module.mk Sun Dec 15 19:31:18 2013 -0800 @@ -53,7 +53,11 @@ ranlib_libranlib_la_DEPENDENCIES = ranlib/ranlib.def ## Special rules for files which must be built before compilation +## ranlib directory may not exist in VPATH build; create it if necessary. ranlib/ranlib.def: $(RANLIB_SRC) mkf77def + @-if ! test -d ranlib; then \ + mkdir ranlib ; \ + fi chmod a+rx mkf77def ./mkf77def $(srcdir) $(RANLIB_SRC) > $@-t mv $@-t $@ diff -r 285b2dc3ddfa -r a99bbbcf743c liboctave/cruft/slatec-fn/module.mk --- a/liboctave/cruft/slatec-fn/module.mk Sun Dec 15 21:07:55 2013 +0100 +++ b/liboctave/cruft/slatec-fn/module.mk Sun Dec 15 19:31:18 2013 -0800 @@ -71,11 +71,19 @@ slatec-fn/derfc.f \ slatec-fn/erfc.f +## slatec-fn directory may not exist in VPATH build; create it if necessary. + slatec-fn/erfc.f: slatec-fn/erfc.in.f Makefile + @-if ! test -d slatec-fn; then \ + mkdir slatec-fn ; \ + fi $(SED) -e "${F77_ISNAN_MACRO}" < $< > $@-t mv $@-t $@ slatec-fn/derfc.f: slatec-fn/derfc.in.f Makefile + @-if ! test -d slatec-fn; then \ + mkdir slatec-fn ; \ + fi $(SED) -e "${F77_ISNAN_MACRO}" < $< > $@-t mv $@-t $@