source: trunk/kBuild/StampOutPredefines.kmk@ 99

Last change on this file since 99 was 69, checked in by bird, 21 years ago

early coding.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
RevLine 
[69]1# $Id: StampOutPredefines.kmk 69 2004-05-29 06:20:31Z bird $
2## @file
3#
4# kBuild - Stamp out GNU Make predefines.
5#
6# Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
7#
8#
9# This file is part of kBuild.
10#
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.
15#
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.
20#
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
24#
25#
26
27#
28# Default variables.
29#
30ifeq ($(MAKEFLAGS),$(MAKEFLAGS:R=x))
31# add the -R makeflag to avoid doing this for submakes
32MAKEFLAGS := R$(MAKEFLAGS)
33
34define def_undefine_default
35ifeq ($(origin $1), default)
36$1:=
37endif
38endef
39
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 :=
43def_undefine_default :=
44endif
45
46#
47# Suffixes.
48#
49.SUFFIXES:
50SUFFIXES :=
51
52#
53# Implicit rules
54#
55ifeq ($(MAKEFLAGS),$(MAKEFLAGS:r=x))
56MAKEFLAGS := r$(MAKEFLAGS)
57# add the -r makeflag to avoid doing this for submakes
58
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(%): %
149endif
150
151
Note: See TracBrowser for help on using the repository browser.