On Mon, Nov 23, 2009 at 08:11:32AM -0600, Peter Samuelson wrote:
> 
> [Stefan Sperling]
> > How?
> > 'echo $(CLEAN_FILES) | xargs' has the same problem (can fail at 'echo')
> 
> In theory it can, but echo is almost always a shell builtin.  So the
> kernel argument length limit does not apply, only whatever limit the
> shell may have.

How about this diff then?

Stefan

[[[
* Makefile.in: CLEAN_FILES can be a long list, so use an "echo | xargs"
   construct which is less likely to cause a "too many arguments" error
   since the maximum length of the argument list is limited by the shell
   rather than the kernel.
   Don't use find to locate .pyc files created by running the test suite,
   gen_make.py now puts them into CLEAN_FILES. Clean .pyc files in
   tests/cmdline/svntest explicitly since they are not in the scripts
   list known to gen_make.py.

* build/generator/gen_make.py: Add .pyc files potentially created by
   running the test suite to the CLEAN_FILES list.
]]]


Index: Makefile.in
===================================================================
--- Makefile.in (revision 883642)
+++ Makefile.in (working copy)
@@ -366,10 +366,9 @@ fast-clean: doc-clean
              rm -rf .libs);                                          \
           fi                                                         \
         done
-       rm -f $(CLEAN_FILES)
+       echo $(CLEAN_FILES) | xargs rm -f
        find $(CTYPES_PYTHON_SRC_DIR) $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) \
-               $(abs_srcdir)/build -name "*.pyc" -exec rm {} ';'
-       find $(abs_srcdir)/subversion/tests/ -mindepth 2 -maxdepth 3 \
+               $(abs_srcdir)/build 
$(top_srcdir)/subversion/tests/cmdline/svntest \
                -name "*.pyc" -exec rm {} ';'
 
 # clean all but bulky test output, returning to before './configure' was run.
Index: build/generator/gen_make.py
===================================================================
--- build/generator/gen_make.py (revision 883642)
+++ build/generator/gen_make.py (working copy)
@@ -156,6 +156,9 @@ class Generator(gen_base.GeneratorBase):
          and not target.external_lib \
          and target.filename[-3:] != '.la':
         cfiles.append(target.filename)
+    for script in self.scripts:
+      if script.endswith('.py'):
+        cfiles.append(script + 'c')
     data.cfiles = sorted(cfiles)
 
     # here are all the SQL files and their generated headers. the Makefile

Reply via email to