Changeset 903 for trunk/src/gmakenew/default.c
- Timestamp:
- May 23, 2007, 7:31:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmakenew/default.c
r503 r903 43 43 .w .ch .cweb .web .com .sh .elc .el"; 44 44 #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 \ 46 46 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ 47 47 .w .ch .web .sh .elc .el .obj .exe .dll .lib"; 48 48 #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 \ 50 50 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ 51 51 .w .ch .web .sh .elc .el"; … … 201 201 ".f", 202 202 "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@", 203 ".m", 204 "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@", 203 205 ".p", 204 206 "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@", … … 230 232 ".f.o", 231 233 "$(COMPILE.f) $(OUTPUT_OPTION) $<", 234 ".m.o", 235 "$(COMPILE.m) $(OUTPUT_OPTION) $<", 232 236 ".p.o", 233 237 "$(COMPILE.p) $(OUTPUT_OPTION) $<", … … 258 262 ".l.c", 259 263 "@$(RM) $@ \n $(LEX.l) $< > $@", 264 ".ym.m", 265 "$(YACC.m) $< \n mv -f y.tab.c $@", 266 ".lm.m", 267 "@$(RM) $@ \n $(LEX.m) $< > $@", 260 268 261 269 ".F.f", … … 264 272 "$(PREPROCESS.r) $(OUTPUT_OPTION) $<", 265 273 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? */ 269 276 ".l.r", 270 277 "$(LEX.l) $< > $@ \n mv -f lex.yy.r $@", … … 311 318 }; 312 319 313 static c har *default_variables[] =320 static const char *default_variables[] = 314 321 { 315 322 #ifndef CONFIG_NO_DEFAULT_VARIABLES … … 408 415 "CXX", "gcc", 409 416 # endif /* __MSDOS__ */ 417 "OBJC", "gcc", 410 418 #else 411 419 "CC", "cc", 412 420 "CXX", "g++", 421 "OBJC", "cc", 413 422 #endif 414 423 … … 478 487 "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", 479 488 "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)", 480 491 "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", 481 492 "COMPILE.C", "$(COMPILE.cc)", … … 486 497 "YACC.y", "$(YACC) $(YFLAGS)", 487 498 "LEX.l", "$(LEX) $(LFLAGS) -t", 499 "YACC.m", "$(YACC) $(YFLAGS)", 500 "LEX.m", "$(LEX) $(LFLAGS) -t", 488 501 "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c", 489 502 "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)", … … 534 547 set_default_suffixes (void) 535 548 { 536 suffix_file = enter_file ( ".SUFFIXES");549 suffix_file = enter_file (strcache_add (".SUFFIXES")); 537 550 538 551 if (no_builtin_rules_flag) 539 (void)define_variable ("SUFFIXES", 8, "", o_default, 0);552 define_variable ("SUFFIXES", 8, "", o_default, 0); 540 553 else 541 554 { … … 544 557 multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1), 545 558 sizeof (struct dep)); 546 (void)define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);559 define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0); 547 560 } 548 561 } … … 550 563 /* Enter the default suffix rules as file rules. This used to be done in 551 564 install_default_implicit_rules, but that loses because we want the 552 suffix rules installed before reading makefiles, and the epattern rules565 suffix rules installed before reading makefiles, and the pattern rules 553 566 installed after. */ 554 567 … … 556 569 install_default_suffix_rules (void) 557 570 { 558 registerchar **s;571 char **s; 559 572 560 573 if (no_builtin_rules_flag) 561 574 return; 562 575 563 for (s = default_suffix_rules; *s != 0; s += 2)576 for (s = default_suffix_rules; *s != 0; s += 2) 564 577 { 565 register struct file *f = enter_file (s[0]);578 struct file *f = enter_file (strcache_add (s[0])); 566 579 /* Don't clobber cmds given in a makefile if there were any. */ 567 580 if (f->cmds == 0) 568 581 { 569 f->cmds = (struct commands *)xmalloc (sizeof (struct commands));582 f->cmds = xmalloc (sizeof (struct commands)); 570 583 f->cmds->fileinfo.filenm = 0; 571 584 f->cmds->commands = s[1]; … … 581 594 install_default_implicit_rules (void) 582 595 { 583 registerstruct pspec *p;596 struct pspec *p; 584 597 585 598 if (no_builtin_rules_flag) … … 596 609 define_default_variables (void) 597 610 { 598 registerchar **s;611 const char **s; 599 612 600 613 if (no_builtin_variables_flag) … … 602 615 603 616 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); 605 618 }
Note:
See TracChangeset
for help on using the changeset viewer.