This commit was manufactured by cvs2svn to create tag
[kbuild-mirror.git] / kBuild / StampOutPredefines.kmk
blobb02a059346afd08abd723b4349100e7d83fcf347
1 # $Id$
2 ## @file
4 # kBuild - Stamp out GNU Make predefines.
6 # Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
9 # This file is part of kBuild.
11 # kBuild is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # kBuild is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with kBuild; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 # Default variables.
30 ifeq ($(MAKEFLAGS),$(MAKEFLAGS:R=x))
31 # add the -R makeflag to avoid doing this for submakes
32 MAKEFLAGS := R$(MAKEFLAGS)
34 define def_undefine_default
35 ifeq ($(origin $1), default)
36 $1:=
37 endif
38 endef
40 _DEFAULT_VARIABLES := .LIBPATTERNS .VARIABLES AR ARFLAGS AS CC CHECKOUT,v CO COFLAGS COMPILE.C COMPILE.F COMPILE.S COMPILE.c COMPILE.cc COMPILE.cpp COMPILE.def COMPILE.f COMPILE.mod COMPILE.p COMPILE.r COMPILE.s CPP CTANGLE CWEAVE CXX F77 F77FLAGS FC GET LD LEX LEX.l LINK.C LINK.F LINK.S LINK.c LINK.cc LINK.cpp LINK.f LINK.o LINK.p LINK.r LINK.s LINT LINT.c M2C MAKEINFO OUTPUT_OPTION PC PREPROCESS.F PREPROCESS.S PREPROCESS.r RM TANGLE TEX TEXI2DVI WEAVE YACC YACC.y
41 $(foreach i, $(_DEFAULT_VARIABLES), $(eval $(call def_undefine_default,$(i))))
42 _DEFAULT_VARIABLES :=
43 def_undefine_default :=
44 endif
47 # Suffixes.
49 .SUFFIXES:
50 SUFFIXES :=
53 # Implicit rules
55 ifeq ($(MAKEFLAGS),$(MAKEFLAGS:r=x))
56 MAKEFLAGS := r$(MAKEFLAGS)
57 # add the -r makeflag to avoid doing this for submakes
59 %.C:
60 %.F:
61 %.S:
62 %.a:
63 %.c:
64 %.c: %.l
65 %.c: %.w
66 %.c: %.w %.ch
67 %.c: %.y
68 %.cc:
69 %.ch:
70 %.cpp:
71 %.def:
72 %.dll:
73 %.dvi:
74 %.dvi: %.tex
75 %.dvi: %.texi
76 %.dvi: %.texinfo
77 %.dvi: %.txinfo
78 %.el:
79 %.elc:
80 %.exe:
81 %.f:
82 %.f: %.F
83 %.f: %.r
84 %.h:
85 %.info:
86 %.info: %.texi
87 %.info: %.texinfo
88 %.info: %.txinfo
89 %.l:
90 %.lib:
91 %.ln:
92 %.ln: %.c
93 %.ln: %.l
94 %.ln: %.y
95 %.mod:
96 %.o:
97 %.o: %.C
98 %.o: %.F
99 %.o: %.S
100 %.o: %.c
101 %.o: %.cc
102 %.o: %.cpp
103 %.o: %.f
104 %.o: %.mod
105 %.o: %.p
106 %.o: %.r
107 %.o: %.s
108 %.obj:
109 %.out:
110 %.out: %
111 %.p:
112 %.p: %.web
113 %.r:
114 %.r: %.l
115 %.s:
116 %.s: %.S
117 %.sh:
118 %.sym:
119 %.sym: %.def
120 %.tex:
121 %.tex: %.w
122 %.tex: %.w %.ch
123 %.tex: %.web
124 %.texi:
125 %.texinfo:
126 %.txinfo:
127 %.w:
128 %.web:
129 %.y:
130 %: %.C
131 %: %.F
132 %: %.S
133 %: %.c
134 %: %.cc
135 %: %.cpp
136 %: %.f
137 %: %.mod
138 %: %.o
139 %: %.p
140 %: %.r
141 %: %.s
142 %: %.sh
143 %:: %,v
144 %:: RCS/%
145 %:: RCS/%,v
146 %:: SCCS/s.%
147 %:: s.%
148 (%): %
149 endif