Ignore:
Timestamp:
May 23, 2007, 7:31:19 AM (18 years ago)
Author:
bird
Message:

Merged with the 2007-05-23 CVS. Added rsort and fixed a couple of windows build issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmakenew/default.c

    r503 r903  
    4343.w .ch .cweb .web .com .sh .elc .el";
    4444#elif defined(__EMX__)
    45   = ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
     45  = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
    4646.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
    4747.w .ch .web .sh .elc .el .obj .exe .dll .lib";
    4848#else
    49   = ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
     49  = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
    5050.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
    5151.w .ch .web .sh .elc .el";
     
    201201    ".f",
    202202    "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
     203    ".m",
     204    "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
    203205    ".p",
    204206    "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
     
    230232    ".f.o",
    231233    "$(COMPILE.f) $(OUTPUT_OPTION) $<",
     234    ".m.o",
     235    "$(COMPILE.m) $(OUTPUT_OPTION) $<",
    232236    ".p.o",
    233237    "$(COMPILE.p) $(OUTPUT_OPTION) $<",
     
    258262    ".l.c",
    259263    "@$(RM) $@ \n $(LEX.l) $< > $@",
     264    ".ym.m",
     265    "$(YACC.m) $< \n mv -f y.tab.c $@",
     266    ".lm.m",
     267    "@$(RM) $@ \n $(LEX.m) $< > $@",
    260268
    261269    ".F.f",
     
    264272    "$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
    265273
    266     /* This might actually make lex.yy.c if there's no %R%
    267        directive in $*.l, but in that case why were you
    268        trying to make $*.r anyway?  */
     274    /* This might actually make lex.yy.c if there's no %R% directive in $*.l,
     275       but in that case why were you trying to make $*.r anyway?  */
    269276    ".l.r",
    270277    "$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
     
    311318  };
    312319
    313 static char *default_variables[] =
     320static const char *default_variables[] =
    314321  {
    315322#ifndef CONFIG_NO_DEFAULT_VARIABLES
     
    408415    "CXX", "gcc",
    409416# endif /* __MSDOS__ */
     417    "OBJC", "gcc",
    410418#else
    411419    "CC", "cc",
    412420    "CXX", "g++",
     421    "OBJC", "cc",
    413422#endif
    414423
     
    478487    "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
    479488    "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
     489    "COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
     490    "LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
    480491    "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
    481492    "COMPILE.C", "$(COMPILE.cc)",
     
    486497    "YACC.y", "$(YACC) $(YFLAGS)",
    487498    "LEX.l", "$(LEX) $(LFLAGS) -t",
     499    "YACC.m", "$(YACC) $(YFLAGS)",
     500    "LEX.m", "$(LEX) $(LFLAGS) -t",
    488501    "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
    489502    "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
     
    534547set_default_suffixes (void)
    535548{
    536   suffix_file = enter_file (".SUFFIXES");
     549  suffix_file = enter_file (strcache_add (".SUFFIXES"));
    537550
    538551  if (no_builtin_rules_flag)
    539     (void) define_variable ("SUFFIXES", 8, "", o_default, 0);
     552    define_variable ("SUFFIXES", 8, "", o_default, 0);
    540553  else
    541554    {
     
    544557        multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1),
    545558                    sizeof (struct dep));
    546       (void) define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);
     559      define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);
    547560    }
    548561}
     
    550563/* Enter the default suffix rules as file rules.  This used to be done in
    551564   install_default_implicit_rules, but that loses because we want the
    552    suffix rules installed before reading makefiles, and thee pattern rules
     565   suffix rules installed before reading makefiles, and the pattern rules
    553566   installed after.  */
    554567
     
    556569install_default_suffix_rules (void)
    557570{
    558   register char **s;
     571  char **s;
    559572
    560573  if (no_builtin_rules_flag)
    561574    return;
    562575
    563  for (s = default_suffix_rules; *s != 0; s += 2)
     576  for (s = default_suffix_rules; *s != 0; s += 2)
    564577    {
    565       register struct file *f = enter_file (s[0]);
     578      struct file *f = enter_file (strcache_add (s[0]));
    566579      /* Don't clobber cmds given in a makefile if there were any.  */
    567580      if (f->cmds == 0)
    568581        {
    569           f->cmds = (struct commands *) xmalloc (sizeof (struct commands));
     582          f->cmds = xmalloc (sizeof (struct commands));
    570583          f->cmds->fileinfo.filenm = 0;
    571584          f->cmds->commands = s[1];
     
    581594install_default_implicit_rules (void)
    582595{
    583   register struct pspec *p;
     596  struct pspec *p;
    584597
    585598  if (no_builtin_rules_flag)
     
    596609define_default_variables (void)
    597610{
    598   register char **s;
     611  const char **s;
    599612
    600613  if (no_builtin_variables_flag)
     
    602615
    603616  for (s = default_variables; *s != 0; s += 2)
    604     (void) define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
     617    define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
    605618}
Note: See TracChangeset for help on using the changeset viewer.