[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] configure: pre-create build directories for VPATH builds

From: Jonathan Nieder <jrnieder_at_gmail.com>
Date: Mon, 7 Nov 2011 15:00:03 -0600

Daniel Shahaf wrote:
> Jonathan Nieder wrote on Mon, Nov 07, 2011 at 12:45:19 -0600:

>> [[[
>> * Makefile.in
>> (swig-pl, $(SWIG_PY_DIR)/libsvn): Depend on mkdir-init.
>
> Does the swig-rb target need to grow a similar dependency on mkdir-init?
> Makefile.in doesn't seem to already contain such a dependency.

Ah. Yes, that is needed.

[...]
>> + if test -d $$d; then \
>> + cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \
>> + fi; \
>> done
>
> Seems to me this could benefit from a subshell --- the 'cd' commands
> last until the end of the target's scriptlet, but that isn't terribly
> obvious to the reader. I'll get that done too.

Good idea.

[...]
> Committed in r1198883, but I'll revert this shortly because a buildbot broke:
[...]
> mkdir /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/python/libsvn
> mkdir: cannot create directory `/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/python/libsvn': File exists
> make: *** [/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/python/libsvn] Error 1
> make: *** Waiting for unfinished jobs....

Thanks for fixing dealing with the breakage quickly. Oddly enough, I
can't reproduce the error here (tried with -j4). I like to imagine
the following will fix it.

[[[
Create subversion/bindings/swig/python/libsvn directory in mkdir-init
instead of its own rule. Otherwise, the build can fail because
mkdir fails with EEXISTS if the $(SWIG_PY_DIR)/libsvn rule triggers
twice.

* build.conf (swig-dirs): Add subversion/bindings/swig/python/libsvn.
* Makefile.in
  (copy-swig-py): Depend on mkdir-init instead of $(SWIG_PY_DIR)/libsvn.
  ($(SWIG_PY_DIR)/libsvn): Remove target.
]]]

Index: Makefile.in
===================================================================
--- Makefile.in (revision 1198883)
+++ Makefile.in (working copy)
@@ -785,10 +785,7 @@ clean-swig-pl:
 extraclean-swig-pl: clean-swig-pl
         $(EXTRACLEAN_SWIG_PL)
 
-$(SWIG_PY_DIR)/libsvn: mkdir-init
- mkdir $(SWIG_PY_DIR)/libsvn
-
-copy-swig-py: autogen-swig-py $(SWIG_PY_DIR)/libsvn
+copy-swig-py: autogen-swig-py mkdir-init
         @for f in $(SWIG_PY_SRC_DIR)/*.py $(SWIG_PY_DIR)/*.py; do \
           ! [ -f "$$f" ] || cp -pf $$f $(SWIG_PY_DIR)/libsvn; \
         done
Index: build.conf
===================================================================
--- build.conf (revision 1198916)
+++ build.conf (working copy)
@@ -69,7 +69,7 @@ swig-perl-opts = -perl -nopm -noproxy
 swig-ruby-opts = -ruby
 swig-languages = python perl ruby
 swig-dirs =
- subversion/bindings/swig/python
+ subversion/bindings/swig/python/libsvn
         subversion/bindings/swig/perl
         subversion/bindings/swig/ruby
         subversion/bindings/swig/proxy
Received on 2011-11-07 22:00:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.