parameters: (self, pch_commands)
docstring: Writes make rules to compile prefix headers.
docstring_summary: Writes make rules to compile prefix headers.
docstring_tokens: Writes make rules to compile prefix headers .
function: def WritePchTargets(self, pch_commands):
      """Writes make rules to compile prefix headers."""
      if not pch_commands:
        return
  
      for gch, lang_flag, lang, input in pch_commands:
        extra_flags = {
          'c': '$(CFLAGS_C_$(BUILDTYPE))',
          'cc': '$(CFLAGS_CC_$(BUILDTYPE))',
          'm': '$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))',
          'mm': '$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))',
        }[lang]
        var_name = {
          'c': 'GYP_PCH_CFLAGS',
          'cc': 'GYP_PCH_CXXFLAGS',
          'm': 'GYP_PCH_OBJCFLAGS',
          'mm': 'GYP_PCH_OBJCXXFLAGS',
        }[lang]
        self.WriteLn("%s: %s := %s " % (gch, var_name, lang_flag) +
                     "$(DEFS_$(BUILDTYPE)) "
                     "$(INCS_$(BUILDTYPE)) "
                     "$(CFLAGS_$(BUILDTYPE)) " +
                     extra_flags)
  
        self.WriteLn('%s: %s FORCE_DO_CMD' % (gch, input))
        self.WriteLn('\t@$(call do_cmd,pch_%s,1)' % lang)
        self.WriteLn('')
        assert ' ' not in gch, (
            "Spaces in gch filenames not supported (%s)"  % gch)
        self.WriteLn('all_deps += %s' % gch)
        self.WriteLn('')
function_tokens: def WritePchTargets ( self , pch_commands ) : if not pch_commands : return for gch , lang_flag , lang , input in pch_commands : extra_flags = { 'c' : '$(CFLAGS_C_$(BUILDTYPE))' , 'cc' : '$(CFLAGS_CC_$(BUILDTYPE))' , 'm' : '$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))' , 'mm' : '$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))' , } [ lang ] var_name = { 'c' : 'GYP_PCH_CFLAGS' , 'cc' : 'GYP_PCH_CXXFLAGS' , 'm' : 'GYP_PCH_OBJCFLAGS' , 'mm' : 'GYP_PCH_OBJCXXFLAGS' , } [ lang ] self . WriteLn ( "%s: %s := %s " % ( gch , var_name , lang_flag ) + "$(DEFS_$(BUILDTYPE)) " "$(INCS_$(BUILDTYPE)) " "$(CFLAGS_$(BUILDTYPE)) " + extra_flags ) self . WriteLn ( '%s: %s FORCE_DO_CMD' % ( gch , input ) ) self . WriteLn ( '\t@$(call do_cmd,pch_%s,1)' % lang ) self . WriteLn ( '' ) assert ' ' not in gch , ( "Spaces in gch filenames not supported (%s)" % gch ) self . WriteLn ( 'all_deps += %s' % gch ) self . WriteLn ( '' )