| Index: pylib/gyp/generator/make.py
|
| ===================================================================
|
| --- pylib/gyp/generator/make.py (revision 1360)
|
| +++ pylib/gyp/generator/make.py (working copy)
|
| @@ -438,6 +438,11 @@
|
| .PHONY: %(default_target)s
|
| %(default_target)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
|
| +# for them makes it go faster.
|
| +%%.d: ;
|
| +
|
| # Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
| # do_cmd.
|
| .PHONY: FORCE_DO_CMD
|
| @@ -523,18 +528,7 @@
|
| # target in our tree. Only consider the ones with .d (dependency) info:
|
| 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
|
| - # command line.
|
| - $(shell cat $(wordlist 1,1000,$(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
|
| - # for them makes it go faster.
|
| - $(depsdir)/all.deps: ;
|
| -
|
| - include $(depsdir)/all.deps
|
| + include $(d_files)
|
| endif
|
| """
|
|
|
| @@ -653,8 +647,6 @@
|
| def __init__(self, generator_flags, flavor):
|
| self.generator_flags = generator_flags
|
| self.flavor = flavor
|
| - # Keep track of the total number of outputs for this makefile.
|
| - self._num_outputs = 0
|
|
|
| self.suffix_rules_srcdir = {}
|
| self.suffix_rules_objdir1 = {}
|
| @@ -679,10 +671,6 @@
|
| """ % (ext, COMPILABLE_EXTENSIONS[ext]))})
|
|
|
|
|
| - def NumOutputs(self):
|
| - return self._num_outputs
|
| -
|
| -
|
| def Write(self, qualified_target, base_path, output_filename, spec, configs,
|
| part_of_all):
|
| """The main entry point: writes a .mk file for a single target.
|
| @@ -995,7 +983,6 @@
|
| assert ' ' not in output, (
|
| "Spaces in rule filenames not yet supported (%s)" % output)
|
| self.WriteLn('all_deps += %s' % ' '.join(outputs))
|
| - self._num_outputs += len(outputs)
|
|
|
| action = [self.ExpandInputRoot(ac, rule_source_root,
|
| rule_source_dirname)
|
| @@ -1181,7 +1168,6 @@
|
| self.WriteLn('# Add to the list of files we specially track '
|
| 'dependencies for.')
|
| self.WriteLn('all_deps += $(OBJS)')
|
| - self._num_outputs += len(objs)
|
| self.WriteLn()
|
|
|
| # Make sure our dependencies are built first.
|
| @@ -1638,7 +1624,6 @@
|
| # other functions.
|
| outputs = [QuoteSpaces(o, SPACE_REPLACEMENT) for o in outputs]
|
| self.WriteLn('all_deps += %s' % ' '.join(outputs))
|
| - self._num_outputs += len(outputs)
|
|
|
|
|
| def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
|
| @@ -2061,7 +2046,6 @@
|
| for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
|
| needed_targets.add(target)
|
|
|
| - num_outputs = 0
|
| build_files = set()
|
| include_list = set()
|
| for qualified_target in target_list:
|
| @@ -2102,7 +2086,6 @@
|
| writer = MakefileWriter(generator_flags, flavor)
|
| writer.Write(qualified_target, base_path, output_file, spec, configs,
|
| part_of_all=qualified_target in needed_targets)
|
| - num_outputs += writer.NumOutputs()
|
|
|
| # Our root_makefile lives at the source root. Compute the relative path
|
| # from there to the output_file for including.
|
| @@ -2149,22 +2132,6 @@
|
| 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
|
| - # avoid overflowing the command line.
|
| - all_deps = ""
|
| - for i in range(1001, num_outputs, 1000):
|
| - all_deps += ("""
|
| - ifneq ($(word %(start)d,$(d_files)),)
|
| - $(shell cat $(wordlist %(start)d,%(end)d,$(d_files)) >> $(depsdir)/all.deps)
|
| - endif""" % { 'start': i, 'end': i + 999 })
|
| + root_makefile.write(SHARED_FOOTER)
|
|
|
| - # Add a check to make sure we tried to process all the .d files.
|
| - all_deps += """
|
| - 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 }
|
| -
|
| - root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps })
|
| -
|
| root_makefile.close()
|
|
|