summaryrefslogtreecommitdiff
path: root/default.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2007-05-11 20:57:21 +0000
committerPaul Smith <psmith@gnu.org>2007-05-11 20:57:21 +0000
commiteda0e24ccdae279a2c12059242ef89a22c274047 (patch)
treec5c6f8db878558a3982a117c3c331642334794c2 /default.c
parent52ebc531ce68b369594267a716e93f53720c8f1b (diff)
downloadgunmake-eda0e24ccdae279a2c12059242ef89a22c274047.tar.gz
Fix some documentation gitches.
Fix an uninitialized variable. Add builtin rules for Objective C. Add a new debug line that shows where the commands that are about to be run were defined.
Diffstat (limited to 'default.c')
-rw-r--r--default.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/default.c b/default.c
index 2d5480d..fbe6c1e 100644
--- a/default.c
+++ b/default.c
@@ -41,11 +41,11 @@ static char default_suffixes[]
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
.w .ch .cweb .web .com .sh .elc .el";
#elif defined(__EMX__)
- = ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
+ = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
#else
- = ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
+ = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
.w .ch .web .sh .elc .el";
#endif
@@ -192,6 +192,8 @@ static char *default_suffix_rules[] =
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
".f",
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
+ ".m",
+ "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
".p",
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
".F",
@@ -221,6 +223,8 @@ static char *default_suffix_rules[] =
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
".f.o",
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
+ ".m.o",
+ "$(COMPILE.m) $(OUTPUT_OPTION) $<",
".p.o",
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
".F.o",
@@ -249,15 +253,18 @@ static char *default_suffix_rules[] =
#endif
".l.c",
"@$(RM) $@ \n $(LEX.l) $< > $@",
+ ".ym.m",
+ "$(YACC.m) $< \n mv -f y.tab.c $@",
+ ".lm.m",
+ "@$(RM) $@ \n $(LEX.m) $< > $@",
".F.f",
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
".r.f",
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
- /* This might actually make lex.yy.c if there's no %R%
- directive in $*.l, but in that case why were you
- trying to make $*.r anyway? */
+ /* This might actually make lex.yy.c if there's no %R% directive in $*.l,
+ but in that case why were you trying to make $*.r anyway? */
".l.r",
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
@@ -398,9 +405,11 @@ static const char *default_variables[] =
# else
"CXX", "gcc",
# endif /* __MSDOS__ */
+ "OBJC", "gcc",
#else
"CC", "cc",
"CXX", "g++",
+ "OBJC", "cc",
#endif
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
@@ -468,6 +477,8 @@ static const char *default_variables[] =
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
+ "COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
+ "LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
"COMPILE.C", "$(COMPILE.cc)",
"COMPILE.cpp", "$(COMPILE.cc)",
@@ -476,6 +487,8 @@ static const char *default_variables[] =
"LINK.cpp", "$(LINK.cc)",
"YACC.y", "$(YACC) $(YFLAGS)",
"LEX.l", "$(LEX) $(LFLAGS) -t",
+ "YACC.m", "$(YACC) $(YFLAGS)",
+ "LEX.m", "$(LEX) $(LFLAGS) -t",
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",