1992-01-11 19:37:36 +08:00
|
|
|
|
/* Data base of default implicit rules for GNU Make.
|
2013-05-17 13:46:11 +08:00
|
|
|
|
Copyright (C) 1988-2013 Free Software Foundation, Inc.
|
1992-01-11 19:37:36 +08:00
|
|
|
|
This file is part of GNU Make.
|
|
|
|
|
|
2006-02-12 03:02:21 +08:00
|
|
|
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
2007-07-05 03:35:15 +08:00
|
|
|
|
Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
|
version.
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
2006-02-12 03:02:21 +08:00
|
|
|
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
2006-02-12 03:02:21 +08:00
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
2007-07-05 03:35:15 +08:00
|
|
|
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
2013-01-21 00:01:01 +08:00
|
|
|
|
#include "makeint.h"
|
2013-05-13 16:29:35 +08:00
|
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
2003-05-02 09:44:59 +08:00
|
|
|
|
#include "filedef.h"
|
|
|
|
|
#include "variable.h"
|
1992-01-11 19:37:36 +08:00
|
|
|
|
#include "rule.h"
|
|
|
|
|
#include "dep.h"
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#include "job.h"
|
1992-01-11 19:37:36 +08:00
|
|
|
|
#include "commands.h"
|
|
|
|
|
|
1994-07-26 06:54:09 +08:00
|
|
|
|
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
|
|
|
|
your system (gcc/bison/flex vs cc/yacc/lex). */
|
2003-03-25 07:14:15 +08:00
|
|
|
|
#if defined(__MSDOS__) || defined(__EMX__)
|
|
|
|
|
# define GCC_IS_NATIVE
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
/* This is the default list of suffixes for suffix rules.
|
2012-03-04 08:24:20 +08:00
|
|
|
|
'.s' must come last, so that a '.o' file will be made from
|
|
|
|
|
a '.c' or '.p' or ... file rather than from a .s file. */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
static char default_suffixes[]
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#ifdef VMS
|
2000-01-22 13:43:03 +08:00
|
|
|
|
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
|
|
|
|
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
1996-03-20 22:57:41 +08:00
|
|
|
|
.w .ch .cweb .web .com .sh .elc .el";
|
2003-03-25 07:14:15 +08:00
|
|
|
|
#elif defined(__EMX__)
|
2007-05-12 04:57:21 +08:00
|
|
|
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
2003-03-25 07:14:15 +08:00
|
|
|
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
|
|
|
|
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#else
|
2007-05-12 04:57:21 +08:00
|
|
|
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
1993-04-13 03:58:26 +08:00
|
|
|
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
1993-06-26 02:59:05 +08:00
|
|
|
|
.w .ch .web .sh .elc .el";
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#endif
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
static struct pspec default_pattern_rules[] =
|
|
|
|
|
{
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "(%)", "%",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(AR) $(ARFLAGS) $@ $<" },
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
/* The X.out rules are only in BSD's default set because
|
2012-03-04 08:24:20 +08:00
|
|
|
|
BSD Make has no null-suffix rules, so 'foo.out' and
|
|
|
|
|
'foo' are the same thing. */
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#ifdef VMS
|
|
|
|
|
{ "%.exe", "%",
|
|
|
|
|
"copy $< $@" },
|
|
|
|
|
#else
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "%.out", "%",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"@rm -f $@ \n cp $< $@" },
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#endif
|
1993-06-26 02:59:05 +08:00
|
|
|
|
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
|
|
|
|
{ "%.c", "%.w %.ch",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(CTANGLE) $^ $@" },
|
1993-06-26 02:59:05 +08:00
|
|
|
|
{ "%.tex", "%.w %.ch",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(CWEAVE) $^ $@" },
|
1993-06-26 02:59:05 +08:00
|
|
|
|
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ 0, 0, 0 }
|
1992-01-11 19:37:36 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static struct pspec default_terminal_rules[] =
|
|
|
|
|
{
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#ifdef VMS
|
|
|
|
|
/* RCS. */
|
|
|
|
|
{ "%", "%$$5lv", /* Multinet style */
|
|
|
|
|
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
|
|
|
|
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
|
|
|
|
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
|
|
|
|
{ "%", "%_v", /* Normal style */
|
|
|
|
|
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
|
|
|
|
{ "%", "[.rcs]%_v", /* Normal style */
|
|
|
|
|
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
|
|
|
|
|
|
|
|
|
/* SCCS. */
|
2010-11-07 05:56:23 +08:00
|
|
|
|
/* ain't no SCCS on vms */
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#else
|
1992-07-31 03:53:39 +08:00
|
|
|
|
/* RCS. */
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "%", "%,v",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(CHECKOUT,v)" },
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "%", "RCS/%,v",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(CHECKOUT,v)" },
|
1998-07-31 04:54:47 +08:00
|
|
|
|
{ "%", "RCS/%",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(CHECKOUT,v)" },
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
/* SCCS. */
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "%", "s.%",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ "%", "SCCS/s.%",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#endif /* !VMS */
|
1992-11-24 04:48:49 +08:00
|
|
|
|
{ 0, 0, 0 }
|
1992-01-11 19:37:36 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static char *default_suffix_rules[] =
|
|
|
|
|
{
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#ifdef VMS
|
|
|
|
|
".obj.exe",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".mar.exe",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
|
|
|
|
".s.exe",
|
|
|
|
|
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".c.exe",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".cc.exe",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"$(COMPILE.cc) $^ \n $(LINK.obj) $(CXXSTARTUP),sys$$disk:[]$(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
|
|
|
|
#else
|
|
|
|
|
"$(COMPILE.cc) $^ \n $(CXXLINK.obj) $(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
|
|
|
|
".cxx.exe",
|
|
|
|
|
"$(COMPILE.cxx) $^ \n $(CXXLINK.obj) $(subst .cxx,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
|
|
|
|
#endif
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".for.exe",
|
|
|
|
|
"$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
|
|
|
|
".pas.exe",
|
|
|
|
|
"$(COMPILE.pas) $^ \n $(LINK.obj) $(subst .pas,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
|
|
|
|
|
|
|
|
|
".com",
|
|
|
|
|
"copy $< >$@",
|
|
|
|
|
|
|
|
|
|
".mar.obj",
|
|
|
|
|
"$(COMPILE.mar) /obj=$@ $<",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
".s.obj",
|
|
|
|
|
"$(COMPILE.s) /obj=$@ $<",
|
|
|
|
|
".ss.obj",
|
|
|
|
|
"$(COMPILE.s) /obj=$@ $<",
|
|
|
|
|
".c.i",
|
|
|
|
|
"$(COMPILE.c)/prep /list=$@ $<",
|
|
|
|
|
".c.s",
|
|
|
|
|
"$(COMPILE.c)/noobj/machine /list=$@ $<",
|
|
|
|
|
".i.s",
|
|
|
|
|
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".c.obj",
|
|
|
|
|
"$(COMPILE.c) /obj=$@ $<",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
".cc.ii",
|
|
|
|
|
"$(COMPILE.cc)/prep /list=$@ $<",
|
|
|
|
|
".cc.ss",
|
|
|
|
|
"$(COMPILE.cc)/noobj/machine /list=$@ $<",
|
|
|
|
|
".ii.ss",
|
|
|
|
|
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".cc.obj",
|
|
|
|
|
"$(COMPILE.cc) /obj=$@ $<",
|
2003-03-25 07:14:15 +08:00
|
|
|
|
".cxx.obj",
|
|
|
|
|
"$(COMPILE.cxx) /obj=$@ $<",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
".for.obj",
|
|
|
|
|
"$(COMPILE.for) /obj=$@ $<",
|
|
|
|
|
".pas.obj",
|
|
|
|
|
"$(COMPILE.pas) /obj=$@ $<",
|
|
|
|
|
|
|
|
|
|
".y.c",
|
|
|
|
|
"$(YACC.y) $< \n rename y_tab.c $@",
|
|
|
|
|
".l.c",
|
|
|
|
|
"$(LEX.l) $< \n rename lexyy.c $@",
|
|
|
|
|
|
|
|
|
|
".texinfo.info",
|
|
|
|
|
"$(MAKEINFO) $<",
|
|
|
|
|
|
|
|
|
|
".tex.dvi",
|
|
|
|
|
"$(TEX) $<",
|
|
|
|
|
|
|
|
|
|
#else /* ! VMS */
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".o",
|
|
|
|
|
"$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".s",
|
|
|
|
|
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".S",
|
|
|
|
|
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".c",
|
|
|
|
|
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".cc",
|
|
|
|
|
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".C",
|
|
|
|
|
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
1998-07-31 04:54:47 +08:00
|
|
|
|
".cpp",
|
|
|
|
|
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".f",
|
|
|
|
|
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
".m",
|
|
|
|
|
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".p",
|
|
|
|
|
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".F",
|
|
|
|
|
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".r",
|
|
|
|
|
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
|
|
|
|
".mod",
|
|
|
|
|
"$(COMPILE.mod) -o $@ -e $@ $^",
|
|
|
|
|
|
1995-12-12 11:33:25 +08:00
|
|
|
|
".def.sym",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"$(COMPILE.def) -o $@ $<",
|
|
|
|
|
|
|
|
|
|
".sh",
|
|
|
|
|
"cat $< >$@ \n chmod a+x $@",
|
|
|
|
|
|
|
|
|
|
".s.o",
|
|
|
|
|
"$(COMPILE.s) -o $@ $<",
|
|
|
|
|
".S.o",
|
|
|
|
|
"$(COMPILE.S) -o $@ $<",
|
|
|
|
|
".c.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.c) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".cc.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.cc) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".C.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.C) $(OUTPUT_OPTION) $<",
|
1998-07-31 04:54:47 +08:00
|
|
|
|
".cpp.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".f.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
".m.o",
|
|
|
|
|
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".p.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".F.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.F) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".r.o",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".mod.o",
|
|
|
|
|
"$(COMPILE.mod) -o $@ $<",
|
|
|
|
|
|
|
|
|
|
".c.ln",
|
|
|
|
|
"$(LINT.c) -C$* $<",
|
|
|
|
|
".y.ln",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#ifndef __MSDOS__
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"$(YACC.y) $< \n $(LINT.c) -C$* y.tab.c \n $(RM) y.tab.c",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#else
|
|
|
|
|
"$(YACC.y) $< \n $(LINT.c) -C$* y_tab.c \n $(RM) y_tab.c",
|
|
|
|
|
#endif
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".l.ln",
|
1992-07-31 03:53:39 +08:00
|
|
|
|
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".y.c",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#ifndef __MSDOS__
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"$(YACC.y) $< \n mv -f y.tab.c $@",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#else
|
|
|
|
|
"$(YACC.y) $< \n mv -f y_tab.c $@",
|
|
|
|
|
#endif
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".l.c",
|
|
|
|
|
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
".ym.m",
|
|
|
|
|
"$(YACC.m) $< \n mv -f y.tab.c $@",
|
|
|
|
|
".lm.m",
|
|
|
|
|
"@$(RM) $@ \n $(LEX.m) $< > $@",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".F.f",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".r.f",
|
1999-07-22 12:20:14 +08:00
|
|
|
|
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
2007-05-12 04:57:21 +08:00
|
|
|
|
/* 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? */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".l.r",
|
|
|
|
|
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
|
|
|
|
|
|
|
|
|
".S.s",
|
|
|
|
|
"$(PREPROCESS.S) $< > $@",
|
|
|
|
|
|
|
|
|
|
".texinfo.info",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".texi.info",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
1993-04-13 03:58:26 +08:00
|
|
|
|
".txinfo.info",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
1993-04-13 03:58:26 +08:00
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
".tex.dvi",
|
|
|
|
|
"$(TEX) $<",
|
|
|
|
|
|
|
|
|
|
".texinfo.dvi",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".texi.dvi",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
1993-04-13 03:58:26 +08:00
|
|
|
|
".txinfo.dvi",
|
1994-01-18 06:05:22 +08:00
|
|
|
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
1993-04-13 03:58:26 +08:00
|
|
|
|
|
1993-06-22 05:56:36 +08:00
|
|
|
|
".w.c",
|
2012-03-04 08:24:20 +08:00
|
|
|
|
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".web.p",
|
|
|
|
|
"$(TANGLE) $<",
|
|
|
|
|
|
1993-06-22 05:56:36 +08:00
|
|
|
|
".w.tex",
|
2012-03-04 08:24:20 +08:00
|
|
|
|
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
".web.tex",
|
|
|
|
|
"$(WEAVE) $<",
|
|
|
|
|
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#endif /* !VMS */
|
|
|
|
|
|
1992-07-31 03:53:39 +08:00
|
|
|
|
0, 0,
|
|
|
|
|
};
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
2006-11-19 04:53:44 +08:00
|
|
|
|
static const char *default_variables[] =
|
1992-01-11 19:37:36 +08:00
|
|
|
|
{
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#ifdef VMS
|
2000-01-22 13:43:03 +08:00
|
|
|
|
#ifdef __ALPHA
|
|
|
|
|
"ARCH", "ALPHA",
|
2004-05-17 03:16:52 +08:00
|
|
|
|
#endif
|
|
|
|
|
#ifdef __ia64
|
|
|
|
|
"ARCH", "IA64",
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef __VAX
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"ARCH", "VAX",
|
|
|
|
|
#endif
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"AR", "library/obj",
|
|
|
|
|
"ARFLAGS", "/replace",
|
|
|
|
|
"AS", "macro",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"MACRO", "macro",
|
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"CC", "gcc",
|
|
|
|
|
#else
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"CC", "cc",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
#endif
|
|
|
|
|
"CD", "builtin_cd",
|
|
|
|
|
"MAKE", "make",
|
|
|
|
|
"ECHO", "write sys$$output \"",
|
|
|
|
|
#ifdef GCC_IS_NATIVE
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"C++", "gcc/plus",
|
|
|
|
|
"CXX", "gcc/plus",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
#else
|
|
|
|
|
"C++", "cxx",
|
|
|
|
|
"CXX", "cxx",
|
|
|
|
|
"CXXLD", "cxxlink",
|
|
|
|
|
#endif
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"CO", "co",
|
|
|
|
|
"CPP", "$(CC) /preprocess_only",
|
|
|
|
|
"FC", "fortran",
|
|
|
|
|
/* System V uses these, so explicit rules using them should work.
|
|
|
|
|
However, there is no way to make implicit rules use them and FC. */
|
|
|
|
|
"F77", "$(FC)",
|
|
|
|
|
"F77FLAGS", "$(FFLAGS)",
|
|
|
|
|
"LD", "link",
|
|
|
|
|
"LEX", "lex",
|
|
|
|
|
"PC", "pascal",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"YACC", "bison/yacc",
|
|
|
|
|
"YFLAGS", "/Define/Verbose",
|
|
|
|
|
"BISON", "bison",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"MAKEINFO", "makeinfo",
|
|
|
|
|
"TEX", "tex",
|
|
|
|
|
"TEXINDEX", "texindex",
|
|
|
|
|
|
|
|
|
|
"RM", "delete/nolog",
|
|
|
|
|
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"CSTARTUP", "",
|
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"CRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj",
|
|
|
|
|
"CXXSTARTUP", "gnu_cc_library:crtbegin.obj",
|
|
|
|
|
"CXXRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crtend.obj,gnu_cc_library:gxx_main.obj",
|
|
|
|
|
"LXLIBS", ",gnu_cc_library:libstdcxx.olb/lib,gnu_cc_library:libgccplus.olb/lib",
|
|
|
|
|
"LDLIBS", ",gnu_cc_library:libgcc.olb/lib",
|
|
|
|
|
#else
|
|
|
|
|
"CRT0", "",
|
|
|
|
|
"CXXSTARTUP", "",
|
|
|
|
|
"CXXRT0", "",
|
|
|
|
|
"LXLIBS", "",
|
|
|
|
|
"LDLIBS", "",
|
|
|
|
|
#endif
|
|
|
|
|
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"LINK.obj", "$(LD) $(LDFLAGS)",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
#ifndef GCC_IS_NATIVE
|
|
|
|
|
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
|
|
|
|
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
#endif
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
|
|
|
|
"LEX.l", "$(LEX) $(LFLAGS)",
|
|
|
|
|
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
2000-01-22 13:43:03 +08:00
|
|
|
|
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
|
|
|
|
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
1996-03-20 22:57:41 +08:00
|
|
|
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
|
|
|
|
|
"MV", "rename/new_version",
|
|
|
|
|
"CP", "copy",
|
|
|
|
|
|
|
|
|
|
#else /* !VMS */
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"AR", "ar",
|
|
|
|
|
"ARFLAGS", "rv",
|
|
|
|
|
"AS", "as",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"CC", "gcc",
|
2000-02-05 15:50:47 +08:00
|
|
|
|
# ifdef __MSDOS__
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
2000-02-05 15:50:47 +08:00
|
|
|
|
# else
|
1994-09-07 08:15:23 +08:00
|
|
|
|
"CXX", "gcc",
|
2000-02-05 15:50:47 +08:00
|
|
|
|
# endif /* __MSDOS__ */
|
2007-05-12 04:57:21 +08:00
|
|
|
|
"OBJC", "gcc",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#else
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"CC", "cc",
|
1992-12-10 06:09:42 +08:00
|
|
|
|
"CXX", "g++",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
"OBJC", "cc",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#endif
|
1992-07-31 03:53:39 +08:00
|
|
|
|
|
|
|
|
|
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
|
|
|
|
and to the empty string if $@ does exist. */
|
2000-03-26 14:56:54 +08:00
|
|
|
|
"CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"CO", "co",
|
2000-03-26 14:56:54 +08:00
|
|
|
|
"COFLAGS", "",
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"CPP", "$(CC) -E",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifdef CRAY
|
1992-06-03 09:13:51 +08:00
|
|
|
|
"CF77PPFLAGS", "-P",
|
|
|
|
|
"CF77PP", "/lib/cpp",
|
|
|
|
|
"CFT", "cft77",
|
|
|
|
|
"CF", "cf77",
|
|
|
|
|
"FC", "$(CF)",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#else /* Not CRAY. */
|
|
|
|
|
#ifdef _IBMR2
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"FC", "xlf",
|
1992-12-23 06:31:16 +08:00
|
|
|
|
#else
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifdef __convex__
|
1992-12-23 06:31:16 +08:00
|
|
|
|
"FC", "fc",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
#else
|
|
|
|
|
"FC", "f77",
|
1992-12-23 06:31:16 +08:00
|
|
|
|
#endif /* __convex__ */
|
|
|
|
|
#endif /* _IBMR2 */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
/* System V uses these, so explicit rules using them should work.
|
|
|
|
|
However, there is no way to make implicit rules use them and FC. */
|
|
|
|
|
"F77", "$(FC)",
|
|
|
|
|
"F77FLAGS", "$(FFLAGS)",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#endif /* Cray. */
|
1993-04-16 08:54:40 +08:00
|
|
|
|
"GET", SCCS_GET,
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"LD", "ld",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"LEX", "flex",
|
|
|
|
|
#else
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"LEX", "lex",
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#endif
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"LINT", "lint",
|
|
|
|
|
"M2C", "m2c",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifdef pyr
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"PC", "pascal",
|
1992-06-03 09:13:51 +08:00
|
|
|
|
#else
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifdef CRAY
|
1992-06-03 09:13:51 +08:00
|
|
|
|
"PC", "PASCAL",
|
|
|
|
|
"SEGLDR", "segldr",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
#else
|
|
|
|
|
"PC", "pc",
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#endif /* CRAY. */
|
|
|
|
|
#endif /* pyr. */
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#ifdef GCC_IS_NATIVE
|
|
|
|
|
"YACC", "bison -y",
|
|
|
|
|
#else
|
2010-11-07 05:56:23 +08:00
|
|
|
|
"YACC", "yacc", /* Or "bison -y" */
|
1994-07-26 06:54:09 +08:00
|
|
|
|
#endif
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"MAKEINFO", "makeinfo",
|
|
|
|
|
"TEX", "tex",
|
|
|
|
|
"TEXI2DVI", "texi2dvi",
|
|
|
|
|
"WEAVE", "weave",
|
|
|
|
|
"CWEAVE", "cweave",
|
|
|
|
|
"TANGLE", "tangle",
|
|
|
|
|
"CTANGLE", "ctangle",
|
|
|
|
|
|
|
|
|
|
"RM", "rm -f",
|
|
|
|
|
|
|
|
|
|
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
1992-12-10 06:09:42 +08:00
|
|
|
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"COMPILE.C", "$(COMPILE.cc)",
|
1998-07-31 04:54:47 +08:00
|
|
|
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
1992-12-10 06:09:42 +08:00
|
|
|
|
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"LINK.C", "$(LINK.cc)",
|
1998-07-31 04:54:47 +08:00
|
|
|
|
"LINK.cpp", "$(LINK.cc)",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
|
|
|
|
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
2007-05-12 04:57:21 +08:00
|
|
|
|
"YACC.m", "$(YACC) $(YFLAGS)",
|
|
|
|
|
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
|
|
|
|
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
"LINK.s", "$(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
|
|
|
|
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
|
|
|
|
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
|
|
|
|
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
|
|
|
|
"PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
|
|
|
|
|
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
|
|
|
|
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
|
|
|
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
|
|
|
|
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifndef NO_MINUS_C_MINUS_O
|
1992-01-11 19:37:36 +08:00
|
|
|
|
"OUTPUT_OPTION", "-o $@",
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-11-07 05:56:23 +08:00
|
|
|
|
#ifdef SCCS_GET_MINUS_G
|
1993-12-15 05:59:57 +08:00
|
|
|
|
"SCCS_OUTPUT_OPTION", "-G$@",
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-09-10 04:14:09 +08:00
|
|
|
|
#if defined(_AMIGA)
|
1999-02-22 15:23:30 +08:00
|
|
|
|
".LIBPATTERNS", "%.lib",
|
2012-09-10 04:14:09 +08:00
|
|
|
|
#elif defined(__MSDOS__)
|
1999-02-22 15:23:30 +08:00
|
|
|
|
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
2012-09-10 04:14:09 +08:00
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
|
".LIBPATTERNS", "lib%.dylib lib%.a",
|
1999-02-22 15:23:30 +08:00
|
|
|
|
#else
|
|
|
|
|
".LIBPATTERNS", "lib%.so lib%.a",
|
|
|
|
|
#endif
|
|
|
|
|
|
1996-03-20 22:57:41 +08:00
|
|
|
|
#endif /* !VMS */
|
2013-05-13 14:48:04 +08:00
|
|
|
|
/* Make this assignment to avoid undefined variable warnings. */
|
|
|
|
|
"GNUMAKEFLAGS", "",
|
1992-01-11 19:37:36 +08:00
|
|
|
|
0, 0
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Set up the default .SUFFIXES list. */
|
|
|
|
|
|
|
|
|
|
void
|
2002-10-15 05:54:04 +08:00
|
|
|
|
set_default_suffixes (void)
|
1992-01-11 19:37:36 +08:00
|
|
|
|
{
|
2007-03-20 11:02:26 +08:00
|
|
|
|
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
2013-05-13 16:29:35 +08:00
|
|
|
|
suffix_file->builtin = 1;
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
if (no_builtin_rules_flag)
|
2009-10-25 08:26:34 +08:00
|
|
|
|
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
1992-01-11 19:37:36 +08:00
|
|
|
|
else
|
|
|
|
|
{
|
2013-05-13 16:29:35 +08:00
|
|
|
|
struct dep *d;
|
1992-01-11 19:37:36 +08:00
|
|
|
|
char *p = default_suffixes;
|
2013-07-22 14:19:13 +08:00
|
|
|
|
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ (&p, struct dep),
|
|
|
|
|
NULL);
|
2013-05-13 16:29:35 +08:00
|
|
|
|
for (d = suffix_file->deps; d; d = d->next)
|
|
|
|
|
d->file->builtin = 1;
|
|
|
|
|
|
2009-10-25 08:26:34 +08:00
|
|
|
|
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
1992-01-11 19:37:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1993-10-15 06:25:17 +08:00
|
|
|
|
/* Enter the default suffix rules as file rules. This used to be done in
|
|
|
|
|
install_default_implicit_rules, but that loses because we want the
|
2007-03-20 11:02:26 +08:00
|
|
|
|
suffix rules installed before reading makefiles, and the pattern rules
|
1993-10-15 06:25:17 +08:00
|
|
|
|
installed after. */
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
|
|
|
|
void
|
2002-10-15 05:54:04 +08:00
|
|
|
|
install_default_suffix_rules (void)
|
1992-01-11 19:37:36 +08:00
|
|
|
|
{
|
2006-11-19 04:53:44 +08:00
|
|
|
|
char **s;
|
1995-12-12 11:33:25 +08:00
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
if (no_builtin_rules_flag)
|
|
|
|
|
return;
|
|
|
|
|
|
2006-11-19 04:53:44 +08:00
|
|
|
|
for (s = default_suffix_rules; *s != 0; s += 2)
|
1992-01-11 19:37:36 +08:00
|
|
|
|
{
|
2007-03-20 11:02:26 +08:00
|
|
|
|
struct file *f = enter_file (strcache_add (s[0]));
|
2013-05-13 16:29:35 +08:00
|
|
|
|
/* This function should run before any makefile is parsed. */
|
|
|
|
|
assert (f->cmds == 0);
|
|
|
|
|
f->cmds = xmalloc (sizeof (struct commands));
|
|
|
|
|
f->cmds->fileinfo.filenm = 0;
|
|
|
|
|
f->cmds->commands = s[1];
|
|
|
|
|
f->cmds->command_lines = 0;
|
|
|
|
|
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
|
|
|
|
f->builtin = 1;
|
1992-01-11 19:37:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1993-10-15 06:25:17 +08:00
|
|
|
|
|
|
|
|
|
/* Install the default pattern rules. */
|
|
|
|
|
|
|
|
|
|
void
|
2002-10-15 05:54:04 +08:00
|
|
|
|
install_default_implicit_rules (void)
|
1993-10-15 06:25:17 +08:00
|
|
|
|
{
|
2006-11-19 04:53:44 +08:00
|
|
|
|
struct pspec *p;
|
1995-12-12 11:33:25 +08:00
|
|
|
|
|
1993-10-15 06:25:17 +08:00
|
|
|
|
if (no_builtin_rules_flag)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
for (p = default_pattern_rules; p->target != 0; ++p)
|
|
|
|
|
install_pattern_rule (p, 0);
|
|
|
|
|
|
|
|
|
|
for (p = default_terminal_rules; p->target != 0; ++p)
|
|
|
|
|
install_pattern_rule (p, 1);
|
|
|
|
|
}
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
void
|
2002-10-15 05:54:04 +08:00
|
|
|
|
define_default_variables (void)
|
1992-01-11 19:37:36 +08:00
|
|
|
|
{
|
2006-11-19 04:53:44 +08:00
|
|
|
|
const char **s;
|
1992-01-11 19:37:36 +08:00
|
|
|
|
|
1999-07-08 14:49:52 +08:00
|
|
|
|
if (no_builtin_variables_flag)
|
|
|
|
|
return;
|
|
|
|
|
|
1992-01-11 19:37:36 +08:00
|
|
|
|
for (s = default_variables; *s != 0; s += 2)
|
2006-11-19 04:53:44 +08:00
|
|
|
|
define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
1992-01-11 19:37:36 +08:00
|
|
|
|
}
|
2013-05-13 16:29:35 +08:00
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
undefine_default_variables (void)
|
|
|
|
|
{
|
|
|
|
|
const char **s;
|
|
|
|
|
|
|
|
|
|
for (s = default_variables; *s != 0; s += 2)
|
|
|
|
|
undefine_variable_global (s[0], strlen (s[0]), o_default);
|
|
|
|
|
}
|