Changeset 900 for vendor/gnumake/current/default.c
- Timestamp:
- May 23, 2007, 5:13:11 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current/default.c
r501 r900 42 42 .w .ch .cweb .web .com .sh .elc .el"; 43 43 #elif defined(__EMX__) 44 = ".out .a .ln .o .c .cc .C .cpp .p .f .F . r .y .l .s .S \44 = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \ 45 45 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ 46 46 .w .ch .web .sh .elc .el .obj .exe .dll .lib"; 47 47 #else 48 = ".out .a .ln .o .c .cc .C .cpp .p .f .F . r .y .l .s .S \48 = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \ 49 49 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ 50 50 .w .ch .web .sh .elc .el"; … … 193 193 ".f", 194 194 "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@", 195 ".m", 196 "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@", 195 197 ".p", 196 198 "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@", … … 222 224 ".f.o", 223 225 "$(COMPILE.f) $(OUTPUT_OPTION) $<", 226 ".m.o", 227 "$(COMPILE.m) $(OUTPUT_OPTION) $<", 224 228 ".p.o", 225 229 "$(COMPILE.p) $(OUTPUT_OPTION) $<", … … 250 254 ".l.c", 251 255 "@$(RM) $@ \n $(LEX.l) $< > $@", 256 ".ym.m", 257 "$(YACC.m) $< \n mv -f y.tab.c $@", 258 ".lm.m", 259 "@$(RM) $@ \n $(LEX.m) $< > $@", 252 260 253 261 ".F.f", … … 256 264 "$(PREPROCESS.r) $(OUTPUT_OPTION) $<", 257 265 258 /* This might actually make lex.yy.c if there's no %R% 259 directive in $*.l, but in that case why were you 260 trying to make $*.r anyway? */ 266 /* This might actually make lex.yy.c if there's no %R% directive in $*.l, 267 but in that case why were you trying to make $*.r anyway? */ 261 268 ".l.r", 262 269 "$(LEX.l) $< > $@ \n mv -f lex.yy.r $@", … … 303 310 }; 304 311 305 static c har *default_variables[] =312 static const char *default_variables[] = 306 313 { 307 314 #ifdef VMS … … 399 406 "CXX", "gcc", 400 407 # endif /* __MSDOS__ */ 408 "OBJC", "gcc", 401 409 #else 402 410 "CC", "cc", 403 411 "CXX", "g++", 412 "OBJC", "cc", 404 413 #endif 405 414 … … 469 478 "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", 470 479 "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", 480 "COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", 481 "LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", 471 482 "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", 472 483 "COMPILE.C", "$(COMPILE.cc)", … … 477 488 "YACC.y", "$(YACC) $(YFLAGS)", 478 489 "LEX.l", "$(LEX) $(LFLAGS) -t", 490 "YACC.m", "$(YACC) $(YFLAGS)", 491 "LEX.m", "$(LEX) $(LFLAGS) -t", 479 492 "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c", 480 493 "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)", … … 524 537 set_default_suffixes (void) 525 538 { 526 suffix_file = enter_file ( ".SUFFIXES");539 suffix_file = enter_file (strcache_add (".SUFFIXES")); 527 540 528 541 if (no_builtin_rules_flag) 529 (void)define_variable ("SUFFIXES", 8, "", o_default, 0);542 define_variable ("SUFFIXES", 8, "", o_default, 0); 530 543 else 531 544 { … … 534 547 multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1), 535 548 sizeof (struct dep)); 536 (void)define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);549 define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0); 537 550 } 538 551 } … … 540 553 /* Enter the default suffix rules as file rules. This used to be done in 541 554 install_default_implicit_rules, but that loses because we want the 542 suffix rules installed before reading makefiles, and the epattern rules555 suffix rules installed before reading makefiles, and the pattern rules 543 556 installed after. */ 544 557 … … 546 559 install_default_suffix_rules (void) 547 560 { 548 registerchar **s;561 char **s; 549 562 550 563 if (no_builtin_rules_flag) 551 564 return; 552 565 553 for (s = default_suffix_rules; *s != 0; s += 2)566 for (s = default_suffix_rules; *s != 0; s += 2) 554 567 { 555 register struct file *f = enter_file (s[0]);568 struct file *f = enter_file (strcache_add (s[0])); 556 569 /* Don't clobber cmds given in a makefile if there were any. */ 557 570 if (f->cmds == 0) 558 571 { 559 f->cmds = (struct commands *)xmalloc (sizeof (struct commands));572 f->cmds = xmalloc (sizeof (struct commands)); 560 573 f->cmds->fileinfo.filenm = 0; 561 574 f->cmds->commands = s[1]; … … 571 584 install_default_implicit_rules (void) 572 585 { 573 registerstruct pspec *p;586 struct pspec *p; 574 587 575 588 if (no_builtin_rules_flag) … … 586 599 define_default_variables (void) 587 600 { 588 registerchar **s;601 const char **s; 589 602 590 603 if (no_builtin_variables_flag) … … 592 605 593 606 for (s = default_variables; *s != 0; s += 2) 594 (void)define_variable (s[0], strlen (s[0]), s[1], o_default, 1);607 define_variable (s[0], strlen (s[0]), s[1], o_default, 1); 595 608 }
Note:
See TracChangeset
for help on using the changeset viewer.