I'm running into an issue where the generated Makefile fails to
regenerate the .d files. It tries to cat them together 1,000 files at
a time but that fails with an "argument list too long" error.
I suppose gyp could check if len(*.d) > `getconf ARG_MAX` but in the
mean time, lowering the wordlimit from 1,000 to 512 resolves the issue
for me. ARG_MAX is 2048K on most[1] Linux systems. 2048K / 512 == 4K
which matches PATH_MAX for all common file systems.
Can someone apply this?
Thanks,
Ben
[1] I would have used "all" here but I believe ARG_MAX is configurable
on RHEL systems.
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
index 5621674..b522302 100644
--- a/pylib/gyp/generator/make.py
+++ b/pylib/gyp/generator/make.py
@@ -525,9 +525,9 @@ d_files := $(wildcard $(foreach
f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
# Rather than include each individual .d file, concatenate them into a
# single file which make is able to load faster. We split this into
- # commands that take 1000 files at a time to avoid overflowing the
+ # commands that take 512 files at a time to avoid overflowing the
# command line.
- $(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
+ $(shell cat $(wordlist 1,512,$(d_files)) > $(depsdir)/all.deps)
%(generate_all_deps)s
# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do