diff options
author | Roland McGrath <roland@redhat.com> | 1992-07-30 19:53:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-07-30 19:53:39 +0000 |
commit | 5329b592b75f304609ba34e46d326def64d54dbd (patch) | |
tree | 79edb6380cd05cce9b9d931e0051ee0fff8bb4f8 /default.c | |
parent | 39e2dbb7b3e76c1965517c65715b8330493672ea (diff) | |
download | gunmake-5329b592b75f304609ba34e46d326def64d54dbd.tar.gz |
Formerly default.c.~15~
Diffstat (limited to 'default.c')
-rw-r--r-- | default.c | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -48,11 +48,11 @@ static struct pspec default_pattern_rules[] = static struct pspec default_terminal_rules[] = { - /* RCS. These commands are not echoed because RCS makes enough noise. */ + /* RCS. */ "%", "%,v", - "@test -f $@ || $(CO) $(COFLAGS) $< $@", + "$(CHECKOUT,v)", "%", "RCS/%,v", - "@test -f $@ || $(CO) $(COFLAGS) $< $@", + "$(CHECKOUT,v)", /* SCCS. */ "%", "s.%", @@ -60,7 +60,7 @@ static struct pspec default_terminal_rules[] = "%", "SCCS/s.%", "$(GET) $(GFLAGS) $<", - 0, 0, 0 + 0, 0, 0, }; static char *default_suffix_rules[] = @@ -128,8 +128,7 @@ static char *default_suffix_rules[] = ".y.ln", "$(YACC.y) $< \n $(LINT.c) -C$* y.tab.c \n $(RM) y.tab.c", ".l.ln", - "@$(RM) $*.c \n $(LEX.l) $< > $*.c \n\ -$(LINT.c) -i $*.c -o $@ \n $(RM) $*.c", + "@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c", ".y.c", "$(YACC.y) $< \n mv -f y.tab.c $@", @@ -177,8 +176,8 @@ $(LINT.c) -i $*.c -o $@ \n $(RM) $*.c", ".web.tex", "$(WEAVE) $<", - 0} -; + 0, 0, + }; static char *default_variables[] = { @@ -187,6 +186,13 @@ static char *default_variables[] = "AS", "as", "CC", "cc", "C++", "g++", + + /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist, + and to the empty string if $@ does exist. */ + "CHECKOUT,v", + "$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@,\ + $(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))", + "CO", "co", "CPP", "$(CC) -E", #ifdef CRAY |