]>
Commit | Line | Data |
---|---|---|
726f6388 JA |
1 | # This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. |
2 | # | |
3 | MKBUILTINS = mkbuiltins | |
4 | RANLIB = /usr/bin/ranlib | |
5 | CFLAGS = -g -I.. -I. | |
6 | SHELL = /bin/sh | |
7 | # CC = cc | |
8 | AR = ar | |
9 | RM = rm -f | |
10 | CP = cp | |
11 | ||
12 | srcdir = . | |
13 | VPATH = .:$(srcdir) | |
14 | ||
15 | .SUFFIXES: | |
16 | .SUFFIXES: .def .c .o | |
17 | # How to make a .o file from a .def file. | |
18 | .def.o: | |
19 | $(RM) $@ | |
20 | ./$(MKBUILTINS) $(DIRECTDEFINE) $< | |
21 | $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c || ( $(RM) $*.c ; exit 1 ) | |
22 | $(RM) $*.c | |
23 | ||
24 | # How to make a .c file from a .def file. | |
25 | .def.c: | |
26 | $(RM) $@ | |
27 | ./$(MKBUILTINS) $(DIRECTDEFINE) $< | |
28 | ||
29 | # Here is a rule for making .o files from .c files that does not | |
30 | # force the type of the machine (like -M_MACHINE) into the flags. | |
31 | .c.o: | |
32 | $(RM) $@ | |
33 | $(CC) -c $(CFLAGS) $(CPPFLAGS) $< | |
34 | ||
35 | DEFS = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \ | |
36 | $(srcdir)/builtin.def $(srcdir)/cd.def $(srcdir)/colon.def \ | |
37 | $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \ | |
38 | $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \ | |
39 | $(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \ | |
40 | $(srcdir)/fg_bg.def $(srcdir)/hash.def $(srcdir)/help.def \ | |
41 | $(srcdir)/history.def $(srcdir)/jobs.def $(srcdir)/kill.def \ | |
42 | $(srcdir)/let.def $(srcdir)/read.def $(srcdir)/return.def \ | |
43 | $(srcdir)/set.def $(srcdir)/setattr.def $(srcdir)/shift.def \ | |
44 | $(srcdir)/source.def $(srcdir)/suspend.def $(srcdir)/test.def \ | |
45 | $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \ | |
46 | $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \ | |
47 | $(srcdir)/reserved.def | |
48 | ||
49 | STATIC_SOURCE = common.c getopt.c bashgetopt.c getopt.h | |
50 | ||
51 | OFILES = builtins.o \ | |
52 | alias.o bind.o break.o builtin.o cd.o colon.o command.o \ | |
53 | common.o declare.o echo.o enable.o eval.o exec.o exit.o \ | |
54 | fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o \ | |
55 | let.o read.o return.o set.o setattr.o shift.o source.o \ | |
56 | suspend.o test.o times.o trap.o type.o ulimit.o umask.o \ | |
57 | wait.o getopts.o getopt.o bashgetopt.o | |
58 | ||
59 | THINGS_TO_TAR = $(DEFS) $(STATIC_SOURCE) Makefile ChangeLog | |
60 | ||
61 | CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h | |
62 | ||
63 | all: $(MKBUILTINS) libbuiltins.a | |
64 | ||
65 | libbuiltins.a: $(MKBUILTINS) $(OFILES) | |
66 | $(RM) $@ | |
67 | $(AR) cq $@ $(OFILES) | |
68 | -$(RANLIB) $@ | |
69 | ||
70 | builtext.h builtins.c: $(MKBUILTINS) $(DEFS) | |
71 | $(RM) builtext.h builtins.c | |
72 | ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \ | |
73 | -noproduction $(DIRECTDEFINE) $(DEFS) | |
74 | ||
75 | mkbuiltins: $(srcdir)/mkbuiltins.c ../config.h | |
76 | $(CC) $(CFLAGS) -o $(MKBUILTINS) $(srcdir)/mkbuiltins.c | |
77 | ||
78 | ulimit.o: ulimit.def pipesize.h | |
79 | ||
80 | pipesize.h: psize.aux | |
81 | $(SHELL) $(srcdir)/psize.sh > pipesize.h | |
82 | ||
83 | psize.aux: psize.c | |
84 | $(CC) $(CFLAGS) -o $@ $(srcdir)/psize.c | |
85 | ||
86 | documentation: builtins.texi | |
87 | ||
88 | $(OFILES): $(MKBUILTINS) ../config.h | |
89 | ||
90 | builtins.texi: $(MKBUILTINS) | |
91 | ./$(MKBUILTINS) -documentonly $(DEFS) | |
92 | ||
93 | clean: | |
94 | $(RM) $(OFILES) $(CREATED_FILES) $(MKBUILTINS) | |
95 | ||
96 | mostlyclean: | |
97 | $(RM) $(OFILES) libbuiltins.a | |
98 | ||
99 | distclean realclean maintainer-clean: clean | |
100 | $(RM) libbuiltins.a | |
101 | ||
102 | alias.o: alias.def | |
103 | bind.o: bind.def | |
104 | break.o: break.def | |
105 | builtin.o: builtin.def | |
106 | cd.o: cd.def | |
107 | colon.o: colon.def | |
108 | command.o: command.def | |
109 | declare.o: declare.def | |
110 | echo.o: echo.def | |
111 | enable.o: enable.def | |
112 | eval.o: eval.def | |
113 | exec.o: exec.def | |
114 | exit.o: exit.def | |
115 | fc.o: fc.def | |
116 | fg_bg.o: fg_bg.def | |
117 | hash.o: hash.def | |
118 | help.o: help.def | |
119 | history.o: history.def | |
120 | jobs.o: jobs.def | |
121 | kill.o: kill.def | |
122 | let.o: let.def | |
123 | read.o: read.def | |
124 | return.o: return.def | |
125 | set.o: set.def | |
126 | setattr.o: setattr.def | |
127 | shift.o: shift.def | |
128 | source.o: source.def | |
129 | suspend.o: suspend.def | |
130 | test.o: test.def | |
131 | times.o: times.def | |
132 | trap.o: trap.def | |
133 | type.o: type.def | |
134 | umask.o: umask.def | |
135 | wait.o: wait.def | |
136 | getopts.o: getopts.def | |
137 | reserved.o: reserved.def | |
138 | ||
139 | common.o: ../shell.h ../command.h ../config.h ../memalloc.h ../general.h | |
140 | common.o: ../variables.h ../input.h hashcom.h ../bashhist.h | |
141 | common.o: ../quit.h ../unwind_prot.h ../maxpath.h ../jobs.h ../builtins.h | |
142 | common.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
143 | common.o: ../execute_cmd.h ../error.h | |
144 | alias.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
145 | alias.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
146 | alias.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h | |
147 | bind.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
148 | bind.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
149 | bind.o: ../maxpath.h | |
150 | bind.o: ../shell.h ../unwind_prot.h ../variables.h bashgetopt.h | |
151 | break.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
152 | break.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
153 | break.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
154 | builtin.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
155 | builtin.o: ../quit.h common.h ../maxpath.h | |
156 | builtin.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
157 | builtin.o: ../shell.h ../unwind_prot.h ../variables.h | |
158 | cd.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
159 | cd.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
160 | cd.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h | |
161 | command.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
162 | command.o: ../quit.h bashgetopt.h ../maxpath.h | |
163 | command.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
164 | command.o: ../shell.h ../unwind_prot.h ../variables.h | |
165 | declare.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
166 | declare.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
167 | declare.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
168 | echo.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
169 | echo.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
170 | echo.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
171 | enable.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
172 | enable.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
173 | enable.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
174 | eval.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
175 | eval.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
176 | eval.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
177 | exec.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
178 | exec.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
179 | exec.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../execute_cmd.h | |
180 | exec.o: ../maxpath.h ../flags.h | |
181 | exit.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
182 | exit.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
183 | exit.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
184 | fc.o: ../builtins.h ../command.h bashgetopt.h ../bashhist.h | |
185 | fc.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
186 | fc.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
187 | fc.o: ../flags.h ../unwind_prot.h ../variables.h ../shell.h ../maxpath.h | |
188 | fg_bg.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
189 | fg_bg.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
190 | fg_bg.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
191 | getopts.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
192 | getopts.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
193 | getopts.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
194 | hash.o: ../builtins.h ../command.h ../quit.h ../execute_cmd.h | |
195 | hash.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
196 | hash.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h | |
197 | help.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
198 | help.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
199 | help.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
200 | history.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
201 | history.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
202 | history.o: ../filecntl.h ../shell.h ../unwind_prot.h ../variables.h | |
203 | history.o: ../bashhist.h ../maxpath.h | |
204 | inlib.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
205 | inlib.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
206 | inlib.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
207 | jobs.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
208 | jobs.o: ../quit.h bashgetopt.h ../maxpath.h | |
209 | jobs.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
210 | jobs.o: ../shell.h ../unwind_prot.h ../variables.h | |
211 | kill.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
212 | kill.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
213 | kill.o: ../shell.h ../trap.h ../unwind_prot.h ../variables.h ../maxpath.h | |
214 | let.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
215 | let.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
216 | let.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
217 | read.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
218 | read.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
219 | read.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
220 | return.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
221 | return.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
222 | return.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
223 | set.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
224 | set.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
225 | set.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
226 | setattr.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
227 | setattr.o: ../quit.h common.h bashgetopt.h ../maxpath.h | |
228 | setattr.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
229 | setattr.o: ../shell.h ../unwind_prot.h ../variables.h | |
230 | shift.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
231 | shift.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
232 | shift.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
233 | source.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
234 | source.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
235 | source.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
236 | suspend.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
237 | suspend.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
238 | suspend.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
239 | test.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
240 | test.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
241 | test.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
242 | times.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
243 | times.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
244 | times.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
245 | trap.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
246 | trap.o: ../quit.h common.h ../maxpath.h | |
247 | trap.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
248 | trap.o: ../shell.h ../unwind_prot.h ../variables.h ../execute_cmd.h | |
249 | type.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
250 | type.o: ../quit.h common.h ../maxpath.h | |
251 | type.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
252 | type.o: ../shell.h ../unwind_prot.h ../variables.h | |
253 | ulimit.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
254 | ulimit.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
255 | ulimit.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
256 | umask.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
257 | umask.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
258 | umask.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
259 | wait.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h | |
260 | wait.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h | |
261 | wait.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h | |
262 | ||
263 | bashgetopt.o: ../bashansi.h ../ansi_stdlib.h | |
264 | mkbuiltins.o: ../bashansi.h ../ansi_stdlib.h | |
265 | fc.o: ../bashansi.h ../ansi_stdlib.h | |
266 | ||
267 | #bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h |