Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
gyp: Apply 'argument too long' fix in another place
Browse files Browse the repository at this point in the history
For some reason, aa5961a caused
'make test' to rebuild the entire project every time.  Applying
the fix to the other place where gyp chops up the argument list
makes it behave properly.
  • Loading branch information
isaacs committed Apr 12, 2012
1 parent 1c88c3b commit 04271a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/gyp/pylib/gyp/generator/make.py
Expand Up @@ -2128,10 +2128,10 @@ def CalculateMakefilePath(build_file, base_name):
if generator_flags.get('auto_regeneration', True):
WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)

# Write the rule to load dependencies. We batch 1000 files at a time to
# Write the rule to load dependencies. We batch 512 files at a time to
# avoid overflowing the command line.
all_deps = ""
for i in range(1001, num_outputs, 1000):
for i in range(513, num_outputs, 512):
all_deps += ("""
ifneq ($(word %(start)d,$(d_files)),)
$(shell cat $(wordlist %(start)d,%(end)d,$(d_files)) >> $(depsdir)/all.deps)
Expand All @@ -2142,7 +2142,7 @@ def CalculateMakefilePath(build_file, base_name):
ifneq ($(word %(last)d,$(d_files)),)
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
endif
""" % { 'last': ((num_outputs / 1000) + 1) * 1000 + 1 }
""" % { 'last': ((num_outputs / 512) + 1) * 512 + 1 }

root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps })

Expand Down

0 comments on commit 04271a5

Please sign in to comment.