[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: Daniel Shahaf <danielsh_at_elego.de>
Date: Mon, 7 Nov 2011 21:43:44 +0200

Jonathan Nieder wrote on Mon, Nov 07, 2011 at 12:45:19 -0600:
> >> (swig-pl): Likewise.
>
> Needed.
>
> cd . && /usr/bin/python
> ../build/generator/swig/checkout_swig_header.py
> /tmp/svn-test/BUILD/../build.conf /usr/bin/swig common.swg
> Traceback (most recent call last):
> File "../build/generator/swig/checkout_swig_header.py", line 85, in <module>
> gen.checkout(sys.argv[3])
> File "../build/generator/swig/checkout_swig_header.py", line 62, in checkout
> open(out, "w")
> IOError: [Errno 2] No such file or directory: 'subversion/bindings/swig/proxy/common.swg'
>
> >> ($(SWIG_PY_DIR)/libsvn): Likewise.
>
> Needed.
>
> mkdir /tmp/svn-test/BUILD/subversion/bindings/swig/python/libsvn
> mkdir: cannot create directory `/tmp/svn-test/BUILD/subversion/bindings/swig/python/libsvn': No such file or directory
> make: *** [/tmp/svn-test/BUILD/subversion/bindings/swig/python/libsvn] Error 1
>

I like your approach :-)

> [[[
> * 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.

> @@ -808,9 +809,14 @@ clean-swig-py:
> fi
> for d in $(SWIG_PY_DIR) $(SWIG_PY_DIR)/libsvn_swig_py; \
> do \
> - cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \
> + 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.

> - find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'
> + find $(SWIG_PY_SRC_DIR) -name "*.pyc" -exec rm {} ';'
> + if test -d $(SWIG_PY_DIR); then \
> + find $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'; \
> + fi
>
> extraclean-swig-py: clean-swig-py
> $(EXTRACLEAN_SWIG_PY)

Committed in r1198883, but I'll revert this shortly because a buildbot broke:
http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/3835/steps/Build/logs/stdio
Received on 2011-11-07 20:44:34 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.