]>
Commit | Line | Data |
---|---|---|
726f6388 JA |
1 | /* This -*- C -*- file (cpp-Makefile) is run through the C preprocessor |
2 | to produce bash-Makefile which is machine specific. | |
3 | ||
4 | If you have Gcc and/or Bison, you might wish to mention that right | |
5 | below here. | |
6 | ||
7 | Since this is to become a Makefile, blank lines which appear outside | |
8 | of comments may not contain a TAB character. | |
9 | ||
10 | Copyright (C) 1987,1991 Free Software Foundation, Inc. | |
11 | ||
12 | This file is part of GNU Bash, the Bourne Again SHell. | |
13 | ||
14 | Bash is free software; you can redistribute it and/or modify it under | |
15 | the terms of the GNU General Public License as published by the Free | |
16 | Software Foundation; either version 1, or (at your option) any later | |
17 | version. | |
18 | ||
19 | Bash is distributed in the hope that it will be useful, but WITHOUT ANY | |
20 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
21 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
22 | for more details. | |
23 | ||
24 | You should have received a copy of the GNU General Public License along | |
25 | with Bash; see the file COPYING. If not, write to the Free Software | |
26 | Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
27 | ||
28 | /**/# This Makefile is automagically made from cpp-Makefile. You should | |
29 | /**/# not be editing this file; edit cpp-Makefile, machines.h, or | |
30 | /**/# support/mksysdefs instead. Then, assuming the edits were required | |
31 | /**/# to compile Bash on your system, mail the changes you had to make to | |
32 | /**/# bash-maintainers@prep.ai.mit.edu. We will do our best to incorporate | |
33 | /**/# them into the next release. | |
34 | ||
35 | /**/# Make sure the first target in the makefile is the right one | |
36 | all: .made | |
37 | ||
38 | /* **************************************************************** */ | |
39 | /* */ | |
40 | /* Which compiler are you using? */ | |
41 | /* */ | |
42 | /* **************************************************************** */ | |
43 | ||
44 | /* Define HAVE_GCC if you have the GNU C compiler. */ | |
45 | /* #define HAVE_GCC */ | |
46 | ||
47 | #if defined (__GNUC__) && !defined (HAVE_GCC) && !defined (GCC_STANDARD) | |
48 | # define HAVE_GCC | |
49 | #endif | |
50 | ||
51 | /* Undefine HAVE_FIXED_INCLUDES if you are not using GCC with the fixed | |
52 | header files. */ | |
53 | #if defined (HAVE_GCC) && !defined (HAVE_FIXED_INCLUDES) | |
54 | # define HAVE_FIXED_INCLUDES | |
55 | #endif /* HAVE_GCC && !HAVE_FIXED_INCLUDES */ | |
56 | ||
57 | /* Define HAVE_BISON if you have the GNU replacement for Yacc. */ | |
58 | /**/# We would like you to use Bison instead of Yacc since some | |
59 | /**/# versions of Yacc cannot handle reentrant parsing. Unfortunately, | |
60 | /**/# this includes the Yacc currently being shipped with SunOS4.x. | |
61 | /**/# If you do use Yacc, please make sure that any bugs in parsing | |
62 | /**/# are not really manifestations of Yacc bugs before you report | |
63 | /**/# them. | |
64 | /* #define HAVE_BISON */ | |
65 | ||
66 | /* Include some boilerplate Gnu makefile definitions. */ | |
67 | prefix = /usr/local | |
68 | ||
69 | exec_prefix = $(prefix) | |
70 | bindir = $(exec_prefix)/bin | |
71 | libdir = $(exec_prefix)/lib | |
72 | ||
73 | manroot = $(prefix)/man | |
74 | ||
75 | man1ext = 1 | |
76 | man1dir = $(manroot)/man$(man1ext) | |
77 | man3ext = 3 | |
78 | man3dir = $(manroot)/man$(man3ext) | |
79 | mandir = $(man1dir) | |
80 | manext = $(man1ext) | |
81 | ||
82 | infodir = $(prefix)/info | |
83 | ||
84 | srcdir = . | |
85 | ||
86 | VPATH = .:$(srcdir) | |
87 | ||
88 | /* If you have purify, and want to use it, uncomment this definition or | |
89 | run the make as `make -f bash-Makefile bash PURIFY=purify'. */ | |
90 | PURIFY = # purify | |
91 | ||
92 | /* This includes the appropriate description for the machine that you are | |
93 | using (we hope). If the compilation doesn't work correctly, then you | |
94 | will have to edit the file `machines.h' to include a description for the | |
95 | machine that your Cpp uniquely identifies this as. For example, Sun 4's | |
96 | are recognized by the Cpp identifier `sparc', Vax is recognized with `vax', | |
97 | etc. The order of these files is very important. Config.h must come last, | |
98 | since it is capable of undef'ing various things. */ | |
99 | #define BUILDING_MAKEFILE /* Tell config.h to avoid #including anything. */ | |
100 | #include "sysdefs.h" | |
101 | #include "machines.h" | |
102 | #include "config.h" | |
103 | ||
104 | /* Can't use the Gnu malloc library without saying we want the Gnu malloc. */ | |
105 | #if !defined (USE_GNU_MALLOC) | |
106 | # undef USE_GNU_MALLOC_LIBRARY | |
107 | #endif /* !USE_GNU_MALLOC */ | |
108 | ||
109 | .SUFFIXES: .aux | |
110 | /**/# Here is a rule for making .o files from .c files that does not | |
111 | /**/# force the type of the machine (like -M_MACHINE) into the flags. | |
112 | .c.o: | |
113 | $(RM) $@ | |
114 | $(CC) $(CCFLAGS) $(CPPFLAGS) -c $< | |
115 | ||
116 | .c.aux: | |
117 | $(RM) $@ | |
118 | $(CC) $(CCFLAGS) $(CPPFLAGS) -o $@ $< | |
119 | ||
120 | #if defined (HAVE_BISON) | |
121 | BISON = bison -y | |
122 | #else | |
123 | BISON = yacc | |
124 | #endif | |
125 | ||
126 | #if defined (HAVE_GCC) | |
127 | # if defined (GCC_FLAGS) | |
128 | GCC_EXTRAS = GCC_FLAGS | |
129 | # endif /* GCC_FLAGS */ | |
130 | # if !defined (HAVE_FIXED_INCLUDES) | |
131 | /* This is guaranteed to work, even if you have the fixed includes! | |
132 | (Unless, of course, you have the fixed include files installed in | |
133 | /usr/include. Then it will break.) */ | |
134 | CC = gcc -traditional -I/usr/include $(GCC_EXTRAS) | |
135 | # else /* HAVE_FIXED_INCLUDES */ | |
136 | CC = gcc $(GCC_EXTRAS) | |
137 | # endif /* HAVE_FIXED_INCLUDES */ | |
138 | #else /* !HAVE_GCC */ | |
139 | CC = CPP_CC | |
140 | #endif /* !HAVE_GCC */ | |
141 | ||
142 | /**/# If the user has specified a Make shell, then use that. | |
143 | #if defined (MAKE_SHELL) | |
144 | SHELL = MAKE_SHELL | |
145 | #else | |
146 | SHELL=/bin/sh | |
147 | #endif /* MAKE_SHELL */ | |
148 | ||
149 | CP = cp | |
150 | RM = rm -f | |
151 | AR = ar | |
152 | ||
153 | INSTALL = $(SUPPORT_SRC)install.sh | |
154 | INSTALL_PROGRAM = $(INSTALL) -c | |
155 | INSTALL_DATA = $(INSTALL) -c -m 644 | |
156 | ||
157 | COMPRESS = gzip | |
158 | COMPRESS_EXT = .gz | |
159 | ||
160 | Machine = M_MACHINE | |
161 | OS = M_OS | |
162 | ||
163 | /**/# PROFILE_FLAGS is either -pg, to generate profiling info for use | |
164 | /**/# with gprof, or nothing (the default). | |
165 | PROFILE_FLAGS= | |
166 | ||
167 | #if defined (SYSDEP_CFLAGS) | |
168 | /**/# This system has some peculiar flags that must be passed to the | |
169 | /**/# the C compiler (or to cpp). | |
170 | SYSDEP = SYSDEP_CFLAGS | |
171 | #endif /* SYSDEP_CFLAGS */ | |
172 | ||
173 | #if defined (SYSDEP_LDFLAGS) | |
174 | /**/# This system has some peculiar flags that must be passed to the | |
175 | /**/# link editor (ld). | |
176 | SYSDEP_LD = SYSDEP_LDFLAGS | |
177 | #endif /* SYSDEP_LDFLAGS */ | |
178 | ||
179 | #if defined (HAVE_SETLINEBUF) | |
180 | /**/# This system has the setlinebuf () call. | |
181 | LINEBUF = -DHAVE_SETLINEBUF | |
182 | #endif | |
183 | ||
184 | #if defined (HAVE_VFPRINTF) | |
185 | /**/# This system has the vprintf () and vfprintf () calls. | |
186 | VPRINTF = -DHAVE_VFPRINTF | |
187 | #endif /* HAVE_VFPRINTF */ | |
188 | ||
189 | #if defined (USE_VFPRINTF_EMULATION) | |
190 | VPRINTF = -DHAVE_VFPRINTF | |
191 | VPRINT_OBJ = vprint.o | |
192 | #endif /* USE_VFPRINTF_EMULATION */ | |
193 | ||
194 | #if defined (HAVE_SYS_STREAM_H) | |
195 | /**/# This system has <sys/stream.h> | |
196 | STREAM = -DHAVE_SYS_STREAM_H | |
197 | #endif /* HAVE_SYS_STREAM_H */ | |
198 | ||
199 | #if defined (HAVE_SYS_PTEM_H) | |
200 | /**/# This system has <sys/ptem.h> | |
201 | PTEM = -DHAVE_SYS_PTEM_H | |
202 | #endif /* HAVE_SYS_PTEM_H */ | |
203 | ||
204 | #if defined (HAVE_SYS_PTE_H) | |
205 | /**/# This system has <sys/pte.h> | |
206 | PTE = -DHAVE_SYS_PTE_H | |
207 | #endif /* HAVE_SYS_PTE_H */ | |
208 | ||
209 | /**/# This system has <unistd.h>. | |
210 | #if defined (HAVE_UNISTD_H) | |
211 | UNISTD = -DHAVE_UNISTD_H | |
212 | #endif | |
213 | ||
214 | /**/# This system has <stdlib.h> | |
215 | #if defined (HAVE_STDLIB_H) | |
216 | STDLIB = -DHAVE_STDLIB_H | |
217 | #endif | |
218 | ||
219 | /**/# This system has <limits.h> | |
220 | #if defined (HAVE_LIMITS_H) | |
221 | LIMITSH = -DHAVE_LIMITS_H | |
222 | #endif | |
223 | ||
224 | #if defined (HAVE_GETGROUPS) | |
225 | /**/# This system has multiple groups. | |
226 | GROUPS = -DHAVE_GETGROUPS | |
227 | #endif | |
228 | ||
229 | #if defined (HAVE_RESOURCE) | |
230 | /**/# This system has <sys/resource.h> | |
231 | RESOURCE = -DHAVE_RESOURCE | |
232 | #endif | |
233 | ||
234 | #if defined (HAVE_SYS_PARAM) | |
235 | /**/# This system has <sys/param.h> | |
236 | PARAM = -DHAVE_SYS_PARAM | |
237 | #endif | |
238 | ||
239 | #if defined (VOID_SIGHANDLER) | |
240 | /**/# The signal () call provided by the system returns a pointer to | |
241 | /**/# a function returning void. The signal handlers themselves are | |
242 | /**/# thus void functions. | |
243 | SIGHANDLER = -DVOID_SIGHANDLER | |
244 | #endif | |
245 | ||
246 | #if defined (HAVE_STRERROR) | |
247 | /**/# This system has the strerror () function. | |
248 | STRERROR = -DHAVE_STRERROR | |
249 | #endif | |
250 | ||
251 | #if defined (HAVE_WAIT_H) | |
252 | /**/# This system has <sys/wait.h> | |
253 | WAITH = -DHAVE_WAIT_H | |
254 | #endif | |
255 | ||
256 | #if defined (HAVE_GETWD) | |
257 | /**/# This system has the getwd () call. | |
258 | GETWD = -DHAVE_GETWD | |
259 | #endif | |
260 | ||
261 | #if defined (HAVE_DUP2) | |
262 | /**/# This system has a working version of dup2 (). | |
263 | DUP2 = -DHAVE_DUP2 | |
264 | #endif /* HAVE_DUP2 */ | |
265 | ||
266 | #if defined (HAVE_DIRENT) | |
267 | /**/# This system uses struct dirent for reading directories with readdir. | |
268 | DIRENT = -DHAVE_DIRENT | |
269 | #endif /* HAVE_DIRENT */ | |
270 | ||
271 | #if defined (HAVE_DIRENT_H) | |
272 | /**/# This system has /usr/include/dirent.h | |
273 | DIRENTH = -DHAVE_DIRENT_H | |
274 | #endif /* HAVE_DIRENT_H */ | |
275 | ||
276 | #if defined (HAVE_STRING_H) | |
277 | /**/# This system has /usr/include/string.h | |
278 | STRINGH = -DHAVE_STRING_H | |
279 | #endif /* HAVE_STRING_H */ | |
280 | ||
281 | #if defined (HAVE_VARARGS_H) | |
282 | /**/# This system has /usr/include/varargs.h | |
283 | VARARGSH = -DHAVE_VARARGS_H | |
284 | #endif /* HAVE_VARARGS_H */ | |
285 | ||
286 | #if defined (HAVE_STRCHR) | |
287 | /**/# This system has strchr () and strrchr () string functions. | |
288 | STRCHR = -DHAVE_STRCHR | |
289 | #endif /* HAVE_STRCHR */ | |
290 | ||
291 | #if defined (HAVE_STRCASECMP) | |
292 | STRCASE = -DHAVE_STRCASECMP | |
293 | #endif /* HAVE_STRCASECMP */ | |
294 | ||
295 | #if defined (HAVE_DEV_FD) | |
296 | /**/# This system has the /dev/fd directory for naming open files. | |
297 | DEVFD = -DHAVE_DEV_FD | |
298 | #endif /* HAVE_DEV_FD */ | |
299 | ||
300 | /**/# The GNU coding standards don't recognize the possibility that | |
301 | /**/# other information besides optimization and debugging might be | |
302 | /**/# passed to cc. A different name should have been used. | |
303 | CFLAGS = -O -g | |
304 | ||
305 | SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(STDLIB) $(LIMITSH) \ | |
306 | $(GROUPS) $(RESOURCE) $(PARAM) $(SIGHANDLER) $(SYSDEP) $(WAITH) \ | |
307 | $(GETWD) $(DUP2) $(STRERROR) $(DIRENT) $(DIRENTH) $(STRINGH) \ | |
308 | $(VARARGSH) $(STRCHR) $(STRCASE) $(DEVFD) \ | |
309 | -D$(Machine) -D$(OS) | |
310 | LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(PROFILE_FLAGS) $(CFLAGS) | |
311 | CCFLAGS = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \ | |
312 | $(MALLOC_CFLAGS) $(CFLAGS) | |
313 | CPPFLAGS= -I. -I$(srcdir) -I$(LIBSRC) | |
314 | GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \ | |
315 | -Wwrite-strings -Werror -Wstrict-prototypes \ | |
316 | -Wmissing-prototypes | |
317 | GCC_LINT_CFLAGS = $(PROFILE_FLAGS) $(CFLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \ | |
318 | $(MALLOC_CFLAGS) $(GCC_LINT_FLAGS) | |
319 | ||
320 | /* It is conceivable that you wish to edit some things beyond this point, | |
321 | but I guess that it is highly unlikely, and may give you a headache. */ | |
322 | ||
323 | /* **************************************************************** */ | |
324 | /* */ | |
325 | /* How to Build the support libraries. */ | |
326 | /* */ | |
327 | /* **************************************************************** */ | |
328 | ||
329 | /**/# The location of sources for the support libraries. | |
330 | LIBPATH = ./lib/ | |
331 | LIBSRC = $(srcdir)/$(LIBPATH) | |
332 | ||
333 | /**/# Preface building with the full path of the current library source. | |
334 | LIBINC_DECL = topdir=`sh $(srcdir)/support/srcdir $(srcdir)`; export topdir | |
335 | LIBINC_USAGE = "-I$${topdir} -I$${topdir}/$(LIBPATH) -I$(LIBSRC)" | |
336 | ||
337 | /* Defines used when building libraries. */ | |
338 | #define LIB_CFLAGS_DECL CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE) | |
339 | #define LIB_CPPFLAGS_DECL CPPFLAGS='$(CPPFLAGS)' | |
340 | #define LIB_LDFLAGS_DECL LDFLAGS='$(LDFLAGS)' | |
341 | #define LIBMAKE_FLAGS LIB_CFLAGS_DECL LIB_CPPFLAGS_DECL LIB_LDFLAGS_DECL \ | |
342 | RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' RM='$(RM)' \ | |
343 | ||
344 | /* Macro used to build a library. */ | |
345 | #define build_lib_in_dir(directory, target, srcdef, makefile) \ | |
346 | @echo "Building in " directory "..."; \ | |
347 | sh $(SUPPORT_SRC)mkdirs directory ; \ | |
348 | ($(LIBINC_DECL); cd directory; \ | |
349 | if [ ! -f Makefile ]; then cp makefile Makefile; fi; \ | |
350 | $(MAKE) target $(MFLAGS) LIBMAKE_FLAGS srcdef) | |
351 | ||
352 | /* The builtins are somewhat special in that more information is needed | |
353 | to compile them correctly. */ | |
354 | #define build_builtins(target) \ | |
355 | @sh $(SUPPORT_SRC)mkdirs $(DEFDIR) ; \ | |
356 | ($(LIBINC_DECL); cd $(DEFDIR); \ | |
357 | if [ ! -f Makefile ]; then \ | |
358 | cp $(BUILTIN_ABSSRC)/Makefile Makefile; \ | |
359 | fi; \ | |
360 | $(MAKE) $(MFLAGS) target \ | |
361 | srcdir=$(BUILTIN_ABSSRC) CPPFLAGS='$(CPPFLAGS)' \ | |
362 | CFLAGS='$(CCFLAGS) '$(LIBINC_USAGE)' -I. -I$(BUILTIN_ABSSRC)' \ | |
363 | LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' \ | |
364 | RM='$(RM)' RL_LIBSRC='$(RL_ABSSRC)' \ | |
365 | DIRECTDEFINE='-D '$(srcdir)/$(DEFDIR)) | |
366 | ||
367 | /**/# Flags used when building libraries. | |
368 | LIBRARY_CFLAGS = $(PROFILE_FLAGS) $(CFLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \ | |
369 | $(SYSDEP) $(DIRENT) $(DIRENTH) $(STRINGH) $(VARARGSH) \ | |
370 | $(PTEM) $(PTE) $(STREAM) $(STRERROR) $(RESOURCE) \ | |
371 | $(STRCHR) -D$(Machine) -D$(OS) $(UNISTD) $(LIMITSH) \ | |
372 | $(STRCASE) $(STDLIB) -DSHELL | |
373 | ||
374 | /**/# These are required for sending bug reports. | |
375 | SYSTEM_NAME = $(Machine) | |
376 | OS_NAME = $(OS) | |
377 | ||
378 | /**/# The name of this program. | |
379 | Program = bash | |
380 | ||
381 | /**/# The type of machine and OS Bash is being compiled on. | |
382 | HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)' -DOSTYPE='$(OS_NAME)' | |
383 | ||
384 | /**/# The group of configuration flags. These are for shell.c | |
385 | CFG_FLAGS = -DOS_NAME='$(OS_NAME)' -DSYSTEM_NAME='$(SYSTEM_NAME)' \ | |
386 | $(SIGLIST_FLAG) | |
387 | ||
388 | /* **************************************************************** */ | |
389 | /* */ | |
390 | /* Support for desired libraries. */ | |
391 | /* This includes Termcap, Glob, Tilde, History, and Readline. */ | |
392 | /* */ | |
393 | /* **************************************************************** */ | |
394 | ||
395 | /* Does this machine's linker need a space after -L? */ | |
396 | #if defined (HAVE_GCC) | |
397 | # undef SEARCH_LIB_NEEDS_SPACE | |
398 | #endif /* HAVE_GCC */ | |
399 | ||
400 | #if defined (SEARCH_LIB_NEEDS_SPACE) | |
401 | /**/# The native compiler for this machines requires a space after '-L'. | |
402 | SEARCH_LIB = -L $(UNSET_VARIABLE_CREATES_SPACE) | |
403 | #else | |
404 | /**/# The compiler being used to build Bash can handle -L/library/path. | |
405 | SEARCH_LIB = -L | |
406 | #endif /* !SEARCH_LIB_NEEDS_SPACE */ | |
407 | ||
408 | #if defined (EXTRA_LIB_SEARCH_PATH) | |
409 | /**/# Additional instructions to the linker telling it how to find libraries. | |
410 | LOCAL_LD_PATH = EXTRA_LIB_SEARCH_PATH | |
411 | EXTRA_LD_PATH = $(SEARCH_LIB)$(LOCAL_LD_PATH) | |
412 | #endif /* EXTRA_LIB_SEARCH_PATH */ | |
413 | ||
414 | /* Right now we assume that you have the full source code to Bash. If | |
415 | you simply have the library and header files installed, then | |
416 | undefine HAVE_READLINE_SOURCE. */ | |
417 | #define HAVE_READLINE_SOURCE | |
418 | ||
419 | #if defined (HAVE_READLINE_SOURCE) | |
420 | ||
421 | RL_LIBSRC = $(LIBSRC)readline/ | |
422 | RL_LIBDOC = $(RL_LIBSRC)doc/ | |
423 | RL_LIBDIR = $(LIBPATH)readline/ | |
424 | RL_ABSSRC = $${topdir}/$(RL_LIBDIR) | |
425 | ||
426 | READLINE_LIBRARY = $(RL_LIBDIR)libreadline.a | |
427 | ||
428 | /**/# The source, object and documentation of the GNU Readline library. | |
429 | READLINE_SOURCE = $(RL_LIBSRC)rldefs.h $(RL_LIBSRC)rlconf.h \ | |
430 | $(RL_LIBSRC)readline.h \ | |
431 | $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)keymaps.h \ | |
432 | $(RL_LIBSRC)funmap.c $(RL_LIBSRC)emacs_keymap.c \ | |
433 | $(RL_LIBSRC)search.c $(RL_LIBSRC)vi_keymap.c \ | |
434 | $(RL_LIBSRC)keymaps.c $(RL_LIBSRC)parens.c \ | |
435 | $(RL_LIBSRC)vi_mode.c $(RL_LIBSRC)history.c \ | |
436 | $(RL_LIBSRC)readline.c $(RL_LIBSRC)tilde.c \ | |
437 | $(RL_LIBSRC)rltty.c $(RL_LIBSRC)complete.c \ | |
438 | $(RL_LIBSRC)bind.c $(RL_LIBSRC)isearch.c \ | |
439 | $(RL_LIBSRC)display.c $(RL_LIBSRC)signals.c \ | |
440 | $(RL_LIBSRC)posixstat.h $(RL_LIBSRC)tilde.h \ | |
441 | $(RL_LIBSRC)xmalloc.c | |
442 | ||
443 | READLINE_OBJ = $(RL_LIBDIR)readline.o $(RL_LIBDIR)funmap.o \ | |
444 | $(RL_LIBDIR)parens.o $(RL_LIBDIR)search.o \ | |
445 | $(RL_LIBDIR)keymaps.o $(RL_LIBDIR)history.o \ | |
446 | $(RL_LIBDIR)rltty.o $(RL_LIBDIR)complete.o \ | |
447 | $(RL_LIBDIR)bind.o $(RL_LIBDIR)isearch.o \ | |
448 | $(RL_LIBDIR)display.o $(RL_LIBDIR)signals.o \ | |
449 | $(RL_LIBDIR)tilde.o $(RL_LIBDIR)xmalloc.o | |
450 | ||
451 | READLINE_DOC = $(RL_LIBDOC)rlman.texinfo $(RL_LIBDOC)rluser.texinfo \ | |
452 | $(RL_LIBDOC)rltech.texinfo | |
453 | ||
454 | READLINE_DOC_SUPPORT = $(RL_LIBDOC)Makefile $(RL_LIBDOC)readline.dvi \ | |
455 | $(RL_LIBDOC)readline.info | |
456 | ||
457 | /**/# This has to be written funny to avoid looking like a C comment starter. | |
458 | READLINE_EXAMPLES = $(RL_LIBSRC)examples/[a-zA-Z]*.[ch] \ | |
459 | $(RL_LIBSRC)examples/Makefile $(RL_LIBSRC)examples/Inputrc | |
460 | ||
461 | /**/# Support files for GNU Readline. | |
462 | READLINE_SUPPORT = $(RL_LIBSRC)Makefile $(RL_LIBSRC)ChangeLog \ | |
463 | $(RL_LIBSRC)COPYING $(READLINE_EXAMPLES) \ | |
464 | $(READLINE_DOC_SUPPORT) | |
465 | ||
466 | #else /* !HAVE_READLINE_SOURCE */ | |
467 | ||
468 | # if defined (READLINE) | |
469 | READLINE_LIBRARY = -lreadline | |
470 | # endif /* READLINE */ | |
471 | RL_LIBDIR = $(srcdir)/$(LIBSRC)readline/ | |
472 | ||
473 | #endif /* !HAVE_READLINE_SOURCE */ | |
474 | ||
475 | /* Right now we assume that you have the full source code to Bash, | |
476 | including the source code to the history library. If you only have | |
477 | the library and header files installed, then you can undefine | |
478 | HAVE_HISTORY_SOURCE. */ | |
479 | #define HAVE_HISTORY_SOURCE | |
480 | ||
481 | #if defined (READLINE) && !defined (HISTORY) | |
482 | # define HISTORY | |
483 | #endif /* READLINE && !HISTORY */ | |
484 | ||
485 | # if defined (HISTORY) && !defined (READLINE) | |
486 | /**/# You are compiling with history features but without line editing. | |
487 | HISTORY_LIB = -lhistory | |
488 | # endif /* HISTORY && !READLINE */ | |
489 | ||
490 | #if defined (HISTORY) | |
491 | HIST_SUPPORT_SRC = bashhist.c | |
492 | HIST_SUPPORT_OBJ = bashhist.o | |
493 | #endif /* HISTORY */ | |
494 | ||
495 | #if defined (HAVE_HISTORY_SOURCE) | |
496 | ||
497 | HIST_LIBSRC = $(LIBSRC)readline/ | |
498 | HIST_LIBDOC = $(HIST_LIBSRC)doc/ | |
499 | HIST_LIBDIR = $(LIBPATH)readline/ | |
500 | HIST_ABSSRC = $${topdir}/$(HIST_LIBDIR)/ | |
501 | ||
502 | /* If you are building with readline, then you do not explicitly need the | |
503 | history library. */ | |
504 | # if defined (READLINE) | |
505 | HISTORY_LIBRARY = | |
506 | # else | |
507 | HISTORY_LIBRARY = $(HIST_LIBDIR)libhistory.a | |
508 | # endif /* !READLINE */ | |
509 | ||
510 | /**/# The source, object and documentation of the history library. | |
511 | HISTORY_SOURCE = $(HIST_LIBSRC)history.c $(HIST_LIBSRC)history.h | |
512 | HISTORY_OBJ = $(HIST_LIBDIR)history.o | |
513 | HISTORY_DOC = $(HIST_LIBDOC)hist.texinfo $(HIST_LIBDOC)hsuser.texinfo \ | |
514 | $(HIST_LIBDOC)hstech.texinfo | |
515 | ||
516 | /**/# Directory list for -L so that the link editor (ld) can find -lhistory. | |
517 | # if defined (HISTORY) && !defined (READLINE) | |
518 | # if !defined (LD_HAS_NO_DASH_L) | |
519 | HISTORY_LDFLAGS = $(SEARCH_LIB)$(HIST_LIBDIR) | |
520 | # endif /* LD_HAS_NO_DASH_L */ | |
521 | # endif /* HISTORY && !READLINE */ | |
522 | #else /* !HAVE_HISTORY_SOURCE */ | |
523 | # if defined (HISTORY) && !defined (READLINE) | |
524 | HISTORY_LIBRARY = -lhistory | |
525 | HISTORY_LDFLAGS = $(SEARCH_LIB)$(libdir) $(SEARCH_LIB)/usr/local/lib | |
526 | # endif /* HISTORY && !READLINE */ | |
527 | #endif /* !HAVE_HISTORY_SOURCE */ | |
528 | ||
529 | #if defined (USE_GNU_TERMCAP) | |
530 | # define HAVE_TERMCAP_SOURCE | |
531 | TERM_LIBSRC = $(LIBSRC)termcap/ | |
532 | TERM_LIBDIR = $(LIBPATH)termcap/ | |
533 | TERM_ABSSRC = $${topdir}/$(TERM_LIBDIR) | |
534 | ||
535 | /**/# The source, object and documentation for the GNU Termcap library. | |
536 | TERMCAP_LIBRARY = $(TERM_LIBDIR)libtermcap.a | |
537 | ||
538 | TERMCAP_SOURCE = $(TERM_LIBSRC)termcap.c $(TERM_LIBSRC)tparam.c | |
539 | TERMCAP_OBJ = $(TERM_LIBDIR)termcap.o $(TERM_LIBDIR)tparam.o | |
540 | TERMCAP_DOC = $(TERM_LIBSRC)termcap.texinfo | |
541 | TERMCAP_SUPPORT = $(TERM_LIBSRC)Makefile $(TERM_LIBSRC)ChangeLog | |
542 | ||
543 | # if !defined (LD_HAS_NO_DASH_L) | |
544 | TERMCAP_LDFLAGS = $(SEARCH_LIB)$(TERM_LIBDIR) | |
545 | # endif /* !LD_HAS_NO_DASH_L */ | |
546 | #else /* !USE_GNU_TERMCAP */ | |
547 | ||
548 | /* Guessed at symbol for LIBRARIES, below. */ | |
549 | # if defined (USE_TERMCAP_EMULATION) | |
550 | TERMCAP_LIBRARY = -lcurses | |
551 | # else /* !USE_TERMCAP_EMULATION */ | |
552 | TERMCAP_LIBRARY = -ltermcap | |
553 | # endif /* !USE_TERMCAP_EMULATION */ | |
554 | #endif /* !USE_GNU_TERMCAP */ | |
555 | ||
556 | /* The glob library is always used. */ | |
557 | #define USE_GLOB_LIBRARY | |
558 | ||
559 | #if defined (USE_GLOB_LIBRARY) | |
560 | GLOB_LIBSRC = $(LIBSRC)glob/ | |
561 | GLOB_LIBDIR = $(LIBPATH)glob/ | |
562 | GLOB_ABSSRC = $${topdir}/$(GLOB_LIBDIR) | |
563 | ||
564 | GLOB_LIBRARY = $(GLOB_LIBDIR)libglob.a | |
565 | ||
566 | GLOB_SOURCE = $(GLOB_LIBSRC)glob.c $(GLOB_LIBSRC)fnmatch.c \ | |
567 | $(GLOB_LIBSRC)fnmatch.h | |
568 | GLOB_OBJ = $(GLOB_LIBDIR)glob.o $(GLOB_LIBDIR)fnmatch.o | |
569 | GLOB_DOC = $(GLOB_LIBSRC)doc/glob.texi $(GLOB_LIBSRC)doc/Makefile | |
570 | GLOB_SUPPORT= $(GLOB_LIBSRC)Makefile $(GLOB_LIBSRC)ChangeLog | |
571 | ||
572 | # if !defined (LD_HAS_NO_DASH_L) | |
573 | GLOB_LDFLAGS = $(SEARCH_LIB)$(GLOB_LIBDIR) | |
574 | # endif /* !LD_HAS_NO_DASH_L */ | |
575 | GLOB_LIB = -lglob | |
576 | #endif /* USE_GLOB_LIBRARY */ | |
577 | ||
578 | /* The source code for the tilde expansion library. */ | |
579 | #if defined (HAVE_READLINE_SOURCE) | |
580 | # define HAVE_TILDE_SOURCE | |
581 | #endif /* HAVE_READLINE_SOURCE */ | |
582 | ||
583 | #if defined (HAVE_TILDE_SOURCE) | |
584 | /**/# The source, object and documentation for the GNU Tilde library. | |
585 | TILDE_LIBSRC = $(LIBSRC)tilde/ | |
586 | TILDE_LIBDIR = $(LIBPATH)tilde/ | |
587 | TILDE_ABSSRC = $${topdir}/$(TILDE_LIBDIR) | |
588 | ||
589 | TILDE_LIBRARY = $(TILDE_LIBDIR)libtilde.a | |
590 | ||
591 | TILDE_SOURCE = $(TILDE_LIBSRC)tilde.c $(TILDE_LIBSRC)tilde.h | |
592 | TILDE_OBJ = $(TILDE_LIBDIR)tilde.o | |
593 | TILDE_DOC = $(TILDE_LIBSRC)doc/tilde.texi $(TILDE_LIBSRC)doc/Makefile | |
594 | TILDE_SUPPORT = $(TILDE_LIBSRC)Makefile $(TILDE_LIBSRC)ChangeLog | |
595 | ||
596 | TILDE_LIB = -ltilde | |
597 | ||
598 | # if !defined (LD_HAS_NO_DASH_L) | |
599 | TILDE_LDFLAGS = $(SEARCH_LIB)$(TILDE_LIBDIR) | |
600 | # endif /* !LD_HAS_NO_DASH_L */ | |
601 | ||
602 | #else /* !HAVE_TILDE_SOURCE */ | |
603 | /**/# Guessed at location of the tilde | |
604 | TILDE_LIBRARY = $(libdir)/libtilde.a | |
605 | #endif /* !HAVE_TILDE_SOURCE */ | |
606 | ||
607 | #if defined (USE_GNU_MALLOC_LIBRARY) | |
608 | /**/# Our malloc library. | |
609 | MALLOC_LIBSRC = $(LIBSRC)malloclib/ | |
610 | MALLOC_LIBDIR = $(LIBPATH)malloclib/ | |
611 | MALLOC_ABSSRC = $${topdir}/$(MALLOC_LIBDIR) | |
612 | ||
613 | MALLOC_LIBRARY = $(MALLOC_LIBDIR)libmalloc.a | |
614 | ||
615 | MALLOC_SOURCE = $(MALLOC_LIBSRC)calloc.c $(MALLOC_LIBSRC)cfree.c \ | |
616 | $(MALLOC_LIBSRC)free.c $(MALLOC_LIBSRC)malloc.c \ | |
617 | $(MALLOC_LIBSRC)mcheck.c $(MALLOC_LIBSRC)memalign.c \ | |
618 | $(MALLOC_LIBSRC)morecore.c $(MALLOC_LIBSRC)mstats.c \ | |
619 | $(MALLOC_LIBSRC)mtrace.c $(MALLOC_LIBSRC)realloc.c \ | |
620 | $(MALLOC_LIBSRC)valloc.c | |
621 | MALLOC_OBJ = $(MALLOC_LIBDIR)calloc.c $(MALLOC_LIBDIR)cfree.c \ | |
622 | $(MALLOC_LIBDIR)free.c $(MALLOC_LIBDIR)malloc.c \ | |
623 | $(MALLOC_LIBDIR)mcheck.c $(MALLOC_LIBDIR)memalign.c \ | |
624 | $(MALLOC_LIBDIR)morecore.c $(MALLOC_LIBDIR)mstats.c \ | |
625 | $(MALLOC_LIBDIR)mtrace.c $(MALLOC_LIBDIR)realloc.c \ | |
626 | $(MALLOC_LIBDIR)valloc.c | |
627 | ||
628 | MALLOC_SUPPORT= $(MALLOC_LIBSRC)Makefile | |
629 | MALLOC_CFLAGS = -DUSE_GNU_MALLOC_LIBRARY | |
630 | ||
631 | # if !defined (LD_HAS_NO_DASH_L) | |
632 | MALLOC_LDFLAGS = $(SEARCH_LIB)$(MALLOC_LIBDIR) | |
633 | # endif /* !LD_HAS_NO_DASH_L */ | |
634 | MALLOC_LIB = -lmalloc | |
635 | ||
636 | MALLOC_DEP = $(MALLOC_LIBRARY) | |
637 | #else | |
638 | MALLOC_LIBRARY = | |
639 | #endif /* USE_GNU_MALLOC_LIBRARY */ | |
640 | ||
641 | BASHPOSIX_LIB = $(LIBSRC)posixheaders/ | |
642 | BASHPOSIX_SUPPORT = $(BASHPOSIX_LIB)posixstat.h $(BASHPOSIX_LIB)ansi_stdlib.h \ | |
643 | $(BASHPOSIX_LIB)memalloc.h $(BASHPOSIX_LIB)stdc.h | |
644 | ||
645 | /**/# Declare all of the sources for the libraries that we have. | |
646 | LIBRARY_SOURCE = $(READLINE_SOURCE) $(HISTORY_SOURCE) $(TERMCAP_SOURCE) \ | |
647 | $(GLOB_SOURCE) $(TILDE_SOURCE) $(MALLOC_SOURCE) | |
648 | LIBRARY_DOC = $(READLINE_DOC) $(HISTORY_DOC) $(TERMCAP_DOC) $(GLOB_DOC) \ | |
649 | $(TILDE_DOC) $(MALLOC_DOC) | |
650 | LIBRARY_SUPPORT = $(READLINE_SUPPORT) $(HISTORY_SUPPORT) $(TERMCAP_SUPPORT) \ | |
651 | $(GLOB_SUPPORT) $(TILDE_SUPPORT) $(MALLOC_SUPPORT) | |
652 | LIBRARY_TAR = $(LIBRARY_SOURCE) $(LIBRARY_DOC) $(LIBRARY_SUPPORT) | |
653 | ||
654 | #if defined (READLINE) | |
655 | /**/# You wish to compile with the line editing features installed. | |
656 | READLINE_LIB = -lreadline | |
657 | ||
658 | /**/# You only need termcap (or curses) if you are linking with GNU Readline. | |
659 | # if defined (USE_TERMCAP_EMULATION) | |
660 | TERMCAP_LIB = -lcurses | |
661 | # else /* !USE_TERMCAP_EMULATION */ | |
662 | TERMCAP_LIB = -ltermcap | |
663 | # endif /* !USE_TERMCAP_EMULATION */ | |
664 | ||
665 | /**/# Directory list for -L so that the link editor (ld) can find -lreadline. | |
666 | # if !defined (LD_HAS_NO_DASH_L) | |
667 | # if defined (HAVE_READLINE_SOURCE) | |
668 | READLINE_LDFLAGS = $(SEARCH_LIB)$(RL_LIBDIR) $(TERMCAP_LDFLAGS) | |
669 | # else | |
670 | READLINE_LDFLAGS = $(TERMCAP_LDFLAGS) $(SEARCH_LIB)$(libdir) \ | |
671 | $(SEARCH_LIB)/usr/local/lib | |
672 | # endif /* HAVE_READLINE_SOURCE */ | |
673 | # endif /* LD_HAS_NO_DASH_L */ | |
674 | ||
675 | /**/# The source and object of the bash<->readline interface code. | |
676 | RL_SUPPORT_SRC = bashline.c bracecomp.c | |
677 | RL_SUPPORT_OBJ = bashline.o $(BRACECOMP_OBJECT) | |
678 | #endif /* READLINE */ | |
679 | ||
680 | /**/# The order is important. Most dependent first. | |
681 | #if defined (LD_HAS_NO_DASH_L) | |
682 | /**/# This linker does not know how to grok the -l flag, or perhaps how | |
683 | /**/# to grok the -L flag, or both. | |
684 | LIBRARIES = $(READLINE_LIBRARY) $(HISTORY_LIBRARY) $(TERMCAP_LIBRARY) \ | |
685 | $(GLOB_LIBRARY) $(TILDE_LIBRARY) $(MALLOC_LIBRARY) $(LOCAL_LIBS) | |
686 | #else /* !LD_HAS_NO_DASH_L */ | |
687 | LIBRARIES = $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \ | |
688 | $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS) | |
689 | #endif /* !LD_HAS_NO_DASH_L */ | |
690 | ||
691 | #if defined (READLINE) | |
692 | # if defined (HAVE_TERMCAP_SOURCE) | |
693 | TERMCAP_DEP = $(TERMCAP_LIBRARY) | |
694 | # endif /* HAVE_TERMCAP_SOURCE */ | |
695 | # if defined (HAVE_READLINE_SOURCE) | |
696 | READLINE_DEP = $(READLINE_LIBRARY) | |
697 | # endif /* HAVE_READLINE_SOURCE */ | |
698 | #endif /* READLINE */ | |
699 | ||
700 | #if defined (HISTORY) && defined (HAVE_HISTORY_SOURCE) && !defined (READLINE) | |
701 | HISTORY_DEP = $(HISTORY_LIBRARY) | |
702 | #endif | |
703 | ||
704 | #if defined (USE_GLOB_LIBRARY) | |
705 | GLOB_DEP = $(GLOB_LIBRARY) | |
706 | #else | |
707 | GLOBC = glob.c fnmatch.c | |
708 | GLOBO = glob.o fnmatch.o | |
709 | #endif /* USE_GLOB_LIBRARY */ | |
710 | ||
711 | #if defined (HAVE_TILDE_SOURCE) | |
712 | TILDE_DEP = $(TILDE_LIBRARY) | |
713 | #endif | |
714 | ||
715 | /**/# Source files for libraries that Bash depends on. | |
716 | LIBDEP = $(READLINE_DEP) $(TERMCAP_DEP) $(GLOB_DEP) $(HISTORY_DEP) $(TILDE_DEP) $(MALLOC_DEP) | |
717 | ||
718 | /**/# Rules for cleaning the readline and termcap sources. | |
719 | #if defined (HAVE_READLINE_SOURCE) | |
720 | CLEAN_READLINE = (cd $(RL_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
721 | #else | |
722 | CLEAN_READLINE = : | |
723 | #endif /* !HAVE_READLINE_SOURCE */ | |
724 | ||
725 | #if defined (HAVE_HISTORY_SOURCE) | |
726 | # if !defined (READLINE) | |
727 | CLEAN_HISTORY = (cd $(HIST_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
728 | # else | |
729 | CLEAN_HISTORY = : | |
730 | # endif /* READLINE */ | |
731 | #endif /* !HAVE_HISTORY_SOURCE */ | |
732 | ||
733 | #if defined (HAVE_TERMCAP_SOURCE) | |
734 | CLEAN_TERMCAP = (cd $(TERM_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
735 | #else | |
736 | CLEAN_TERMCAP = : | |
737 | #endif /* !HAVE_TERMCAP_SOURCE */ | |
738 | ||
739 | #if defined (USE_GLOB_LIBRARY) | |
740 | CLEAN_GLOB = (cd $(GLOB_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
741 | #else | |
742 | CLEAN_GLOB = : | |
743 | #endif /* !USE_GLOB_LIBRARY */ | |
744 | ||
745 | #if defined (HAVE_TILDE_SOURCE) | |
746 | CLEAN_TILDE = (cd $(TILDE_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
747 | #else | |
748 | CLEAN_TILDE = : | |
749 | #endif /* !HAVE_TILDE_SOURCE */ | |
750 | ||
751 | #if defined (USE_GNU_MALLOC_LIBRARY) | |
752 | CLEAN_MALLOC = (cd $(MALLOC_LIBDIR); $(MAKE) $(MFLAGS) $@) | |
753 | #else | |
754 | CLEAN_MALLOC = : | |
755 | #endif /* !USE_GNU_MALLOC_LIBRARY */ | |
756 | ||
757 | LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(TILDE_LDFLAGS) \ | |
758 | $(GLOB_LDFLAGS) $(MALLOC_LDFLAGS) | |
759 | ||
760 | /**/# The directory which contains the source for malloc. The name must | |
761 | /**/# end in a slash, as in "./lib/malloc/". | |
762 | ALLOC_LIBSRC = $(LIBSRC)malloc/ | |
763 | ALLOC_LIBDIR = $(LIBPATH)malloc/ | |
764 | ALLOC_ABSSRC = $${topdir}/$(ALLOC_LIBDIR) | |
765 | ||
766 | /**/# Our malloc. | |
767 | #if defined (USE_GNU_MALLOC) && !defined (USE_GNU_MALLOC_LIBRARY) | |
768 | ||
769 | MALLOC_OBJ = $(ALLOC_LIBDIR)malloc.o | |
770 | MALLOC_SRC = $(ALLOC_LIBSRC)malloc.c | |
771 | MALLOC_DEP = $(MALLOC_SRC) $(ALLOC_LIBSRC)getpagesize.h | |
772 | MALLOC_FLAGS = -Drcheck -Dbotch=programming_error | |
773 | ||
774 | MALLOC_LIBRARY = | |
775 | ||
776 | #endif /* USE_GNU_MALLOC && !USE_GNU_MALLOC_LIBRARY */ | |
777 | ||
778 | /* If this user doesn't have alloca (), then we must try to supply them | |
779 | with a working one. */ | |
780 | #if !defined (HAVE_ALLOCA) | |
781 | ALLOCA = $(ALLOC_LIBDIR)alloca.o | |
782 | # if defined (ALLOCA_ASM) | |
783 | ALLOCA_SOURCE = ALLOCA_ASM | |
784 | ALLOCA_OBJECT = ALLOCA_OBJ | |
785 | # else | |
786 | ALLOCA_SOURCE = alloca.c | |
787 | ALLOCA_OBJECT = alloca.o | |
788 | # endif /* ALLOCA_ASM */ | |
789 | ALLOCA_DEP = $(ALLOC_LIBSRC)$(ALLOCA_SOURCE) | |
790 | #endif /* !HAVE_ALLOCA */ | |
791 | ||
792 | /* Compilation flags to use in the shell directory and to pass to builds | |
793 | in subdirectories (readline, termcap) to ensure that alloca is treated | |
794 | in a consistent fashion. */ | |
795 | #if defined (HAVE_ALLOCA_H) | |
796 | ALLOCA_H_DEFINE = -DHAVE_ALLOCA_H | |
797 | #else | |
798 | ALLOCA_H_DEFINE = | |
799 | #endif /* HAVE_ALLOCA_H */ | |
800 | ||
801 | #if defined (HAVE_ALLOCA) | |
802 | ALLOCA_DEFINE = -DHAVE_ALLOCA | |
803 | #else | |
804 | ALLOCA_DEFINE = | |
805 | #endif /* HAVE_ALLOCA */ | |
806 | ||
807 | ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE) | |
808 | ||
809 | /* Protect the `i386' used in the definition of ALLOC_FILES. */ | |
810 | #if defined (i386) | |
811 | # undef i386 | |
812 | # define i386_defined | |
813 | #endif /* i386 */ | |
814 | ||
815 | ALLOC_HEADERS = $(ALLOC_LIBSRC)getpagesize.h | |
816 | ALLOC_FILES = $(ALLOC_LIBSRC)malloc.c $(ALLOC_LIBSRC)alloca.c \ | |
817 | $(ALLOC_LIBSRC)i386-alloca.s $(ALLOC_LIBSRC)x386-alloca.s \ | |
818 | $(ALLOC_LIBSRC)xmalloc.c | |
819 | ||
820 | /* Perhaps restore the `i386' define. */ | |
821 | #if defined (i386_defined) | |
822 | # define i386 | |
823 | # undef i386_defined | |
824 | #endif /* i386_defined */ | |
825 | ||
826 | #if defined (USE_GNU_MALLOC) && !defined (USE_GNU_MALLOC_LIBRARY) | |
827 | $(MALLOC_OBJ): $(MALLOC_DEP) | |
828 | @sh $(SUPPORT_SRC)mkdirs $(ALLOC_LIBDIR) | |
829 | @$(RM) $@ | |
830 | @($(LIBINC_DECL); cd $(ALLOC_LIBDIR) ; \ | |
831 | if [ ! -f Makefile ]; then cp $(ALLOC_ABSSRC)Makefile Makefile ; fi; \ | |
832 | $(MAKE) $(MFLAGS) \ | |
833 | CFLAGS='$(LIBRARY_CFLAGS) $(MALLOC_FLAGS)' \ | |
834 | CPPFLAGS='$(CPPFLAGS)' MALLOC_SOURCE=$(MALLOC_SRC) \ | |
835 | srcdir=$(ALLOC_ABSSRC) malloc.o ) | |
836 | #endif /* USE_GNU_MALLOC && !USE_GNU_MALLOC_LIBRARY */ | |
837 | ||
838 | #if !defined (HAVE_ALLOCA) | |
839 | $(ALLOCA): $(ALLOCA_DEP) | |
840 | @sh $(SUPPORT_SRC)mkdirs $(ALLOC_LIBDIR) | |
841 | @$(RM) $@ | |
842 | @($(LIBINC_DECL); cd $(ALLOC_LIBDIR) ; \ | |
843 | if [ ! -f Makefile ]; then cp $(ALLOC_ABSSRC)Makefile Makefile ; fi; \ | |
844 | $(MAKE) $(MFLAGS) CC='$(CC)' \ | |
845 | CFLAGS='$(LIBRARY_CFLAGS) $(MALLOC_FLAGS)' \ | |
846 | CPPFLAGS='$(CPPFLAGS)' ALLOCA_SOURCE=$(ALLOCA_SOURCE) \ | |
847 | ALLOCA_OBJECT=$(ALLOCA_OBJECT) \ | |
848 | srcdir=$(ALLOC_ABSSRC) alloca.o ) | |
849 | #endif /* !HAVE_ALLOCA */ | |
850 | ||
851 | /**/# The location of ranlib on your system. | |
852 | #if defined (RANLIB_LOCATION) | |
853 | RANLIB = RANLIB_LOCATION | |
854 | #else | |
855 | RANLIB = ranlib | |
856 | #endif /* RANLIB_LOCATION */ | |
857 | ||
858 | /* **************************************************************** */ | |
859 | /* */ | |
860 | /* Support for optional object files */ | |
861 | /* */ | |
862 | /* **************************************************************** */ | |
863 | #if !defined (HAVE_SYS_SIGLIST) | |
864 | /**/# Since this system does not have sys_siglist, we define SIGLIST | |
865 | /**/# as siglist.o. | |
866 | SIGLIST = siglist.o | |
867 | SIGLIST_FLAG=-DINITIALIZE_SIGLIST | |
868 | #endif /* HAVE_SYS_SIGLIST */ | |
869 | ||
870 | #if !defined (HAVE_GETCWD) | |
871 | /**/# Since this system does not have a correctly working getcwd (), | |
872 | /**/# we define GETCWD as getcwd.o. | |
873 | GETCWD = getcwd.o | |
874 | #endif /* !HAVE_GETCWD */ | |
875 | ||
876 | /**/# The source and object of the curly brace expansion and completion code. | |
877 | BRACES_SOURCE = braces.c | |
878 | BRACECOMP_SOURCE = bracecomp.c | |
879 | #if defined (BRACE_EXPANSION) | |
880 | BRACES_OBJECT = braces.o | |
881 | # if defined (READLINE) | |
882 | BRACECOMP_OBJECT = bracecomp.o | |
883 | # endif /* READLINE */ | |
884 | #endif /* BRACE_EXPANSION */ | |
885 | ||
886 | #if defined (REQUIRED_LIBRARIES) | |
887 | /**/# Locally required libraries. | |
888 | LOCAL_LIBS = REQUIRED_LIBRARIES | |
889 | #endif /* REQUIRED_LIBRARIES */ | |
890 | ||
891 | BUILTINS_LIB = builtins/libbuiltins.a | |
892 | ||
893 | /**/# The main source code for the Bourne Again SHell. | |
894 | CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \ | |
895 | dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \ | |
896 | expr.c copy_cmd.c flags.c subst.c hash.c mailcheck.c \ | |
897 | test.c trap.c jobs.c nojobs.c $(ALLOC_FILES) $(BRACES_SOURCE) \ | |
898 | vprint.c input.c bashhist.c \ | |
899 | unwind_prot.c siglist.c getcwd.c $(RL_SUPPORT_SRC) error.c | |
900 | ||
901 | HSOURCES = shell.h flags.h trap.h hash.h jobs.h builtins.h alias.c y.tab.h \ | |
902 | general.h variables.h config.h $(ALLOC_HEADERS) alias.h maxpath.h \ | |
903 | quit.h machines.h posixstat.h filecntl.h unwind_prot.h parser.h \ | |
904 | command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h \ | |
905 | subst.h externs.h siglist.h bashhist.h bashtypes.h | |
906 | ||
907 | SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS) | |
908 | ||
909 | /**/# Matching object files. | |
910 | OBJECTS = shell.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \ | |
911 | dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o \ | |
912 | expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o \ | |
913 | trap.o alias.o $(MALLOC_OBJ) $(ALLOCA) $(BRACES_OBJECT) \ | |
914 | unwind_prot.o $(VPRINT_OBJ) input.o $(HIST_SUPPORT_OBJ) \ | |
915 | $(SIGLIST) $(GETCWD) version.o $(RL_SUPPORT_OBJ) $(BUILTINS_LIB) | |
916 | ||
917 | /**/# Where the source code of the shell builtins resides. | |
918 | BUILTIN_SRCDIR=$(srcdir)/builtins/ | |
919 | /**/# The trailing slash was left off this definition on purpose | |
920 | BUILTIN_ABSSRC=$${topdir}/builtins | |
921 | DEFDIR = builtins/ | |
922 | BUILTIN_DEFS = $(DEFDIR)alias.def $(DEFDIR)bind.def $(DEFDIR)break.def \ | |
923 | $(DEFDIR)builtin.def $(DEFDIR)cd.def $(DEFDIR)colon.def \ | |
924 | $(DEFDIR)command.def $(DEFDIR)declare.def $(LOAD_DEF) \ | |
925 | $(DEFDIR)echo.def $(DEFDIR)enable.def $(DEFDIR)eval.def \ | |
926 | $(DEFDIR)exec.def $(DEFDIR)exit.def $(DEFDIR)fc.def \ | |
927 | $(DEFDIR)fg_bg.def $(DEFDIR)hash.def $(DEFDIR)help.def \ | |
928 | $(DEFDIR)history.def $(DEFDIR)jobs.def $(DEFDIR)kill.def \ | |
929 | $(DEFDIR)let.def $(DEFDIR)read.def $(DEFDIR)return.def \ | |
930 | $(DEFDIR)set.def $(DEFDIR)setattr.def $(DEFDIR)shift.def \ | |
931 | $(DEFDIR)source.def $(DEFDIR)suspend.def $(DEFDIR)test.def \ | |
932 | $(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def \ | |
933 | $(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def \ | |
934 | $(DEFDIR)getopts.def $(DEFDIR)reserved.def | |
935 | BUILTIN_C_SRC = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c \ | |
936 | $(DEFDIR)hashcom.h $(DEFDIR)/bashgetopt.c $(GETOPT_SOURCE) | |
937 | BUILTIN_C_OBJ = $(GETOPTS_OBJ) $(DEFDIR)common.o $(DEFDIR)bashgetopt.o | |
938 | BUILTIN_OBJS = $(DEFDIR)alias.o $(DEFDIR)bind.o $(DEFDIR)break.o \ | |
939 | $(DEFDIR)builtin.o $(DEFDIR)cd.o $(DEFDIR)colon.o \ | |
940 | $(DEFDIR)command.o $(DEFDIR)declare.o $(LOAD_OBJ) \ | |
941 | $(DEFDIR)echo.o $(DEFDIR)enable.o $(DEFDIR)eval.o \ | |
942 | $(DEFDIR)exec.o $(DEFDIR)exit.o $(DEFDIR)fc.o \ | |
943 | $(DEFDIR)fg_bg.o $(DEFDIR)hash.o $(DEFDIR)help.o \ | |
944 | $(DEFDIR)history.o $(DEFDIR)jobs.o $(DEFDIR)kill.o \ | |
945 | $(DEFDIR)let.o $(DEFDIR)read.o $(DEFDIR)return.o \ | |
946 | $(DEFDIR)set.o $(DEFDIR)setattr.o $(DEFDIR)shift.o \ | |
947 | $(DEFDIR)source.o $(DEFDIR)suspend.o $(DEFDIR)test.o \ | |
948 | $(DEFDIR)times.o $(DEFDIR)trap.o $(DEFDIR)type.o \ | |
949 | $(DEFDIR)ulimit.o $(DEFDIR)umask.o $(DEFDIR)wait.o \ | |
950 | $(BUILTIN_C_OBJ) | |
951 | #if defined (GETOPTS_BUILTIN) | |
952 | GETOPTS_OBJ = $(DEFDIR)getopts.o | |
953 | #endif | |
954 | GETOPT_SOURCE = $(DEFDIR)getopt.c $(DEFDIR)getopt.h | |
955 | PSIZE_SOURCE = $(DEFDIR)psize.sh $(DEFDIR)psize.c | |
956 | BUILTIN_SUPPORT = $(DEFDIR)Makefile $(DEFDIR)ChangeLog $(PSIZE_SOURCE) \ | |
957 | $(BUILTIN_C_SRC) | |
958 | ||
959 | /**/# Documentation for the shell. | |
960 | DOCDIR = $(srcdir)/documentation/ | |
961 | BASH_TEXINFO = $(DOCDIR)*.texi $(DOCDIR)*.tex \ | |
962 | $(DOCDIR)*.dvi $(DOCDIR)Makefile | |
963 | BASH_MAN = $(DOCDIR)bash.1 | |
964 | BASHDOCS = $(BASH_TEXINFO) $(BASH_MAN) INSTALL README RELEASE | |
965 | DOCUMENTATION = $(BASHDOCS) $(LIBRARY_DOC) | |
966 | ||
967 | /**/# Some example files demonstrating use of the shell. | |
968 | /* This has to be written funny to avoid looking like a comment starter. */ | |
969 | EXAMPLES = examples/[a-zA-Z]* | |
970 | ||
971 | ENDIAN_SUPPORT = endian.c | |
972 | #if !defined (HAVE_WAIT_H) | |
973 | ENDIAN_HEADER = bash_endian.h | |
974 | #else | |
975 | ENDIAN_HEADER = | |
976 | #endif | |
977 | ENDIAN_OUTPUT = endian.aux $(ENDIAN_HEADER) | |
978 | ||
979 | SIGNAMES_SUPPORT = signames.c | |
980 | SIGNAMES_OUTPUT = signames.aux signames.h | |
981 | ||
982 | SUPPORT_SRC = $(srcdir)/support/ | |
983 | SDIR = ./support/ | |
984 | MKTARFILE = $(SDIR)mktarfile | |
985 | SCRIPTS_SUPPORT = $(SUPPORT_SRC)mksysdefs $(SUPPORT_SRC)cppmagic \ | |
986 | $(SUPPORT_SRC)cat-s $(MKTARFILE) $(SUPPORT_SRC)mail-shell \ | |
987 | $(SUPPORT_SRC)inform $(SUPPORT_SRC)/fixdist \ | |
988 | $(SUPPORT_SRC)mklinks $(SUPPORT_SRC)PORTING \ | |
989 | $(SUPPORT_SRC)/clone.bash | |
990 | FAQ = $(SUPPORT_SRC)FAQ | |
991 | ||
992 | TEST_SUITE = ./test-suite/ | |
993 | TEST_SUITE_SUPPORT = $(TEST_SUITE)[a-zA-Z0-9]* $(SUPPORT_SRC)recho.c | |
994 | ||
995 | CREATED_SUPPORT = $(ENDIAN_OUTPUT) $(SIGNAMES_OUTPUT) sysdefs.h \ | |
996 | $(SDIR)getcppsyms recho tests/recho tests/printenv | |
997 | ||
998 | SUPPORT = configure $(ENDIAN_SUPPORT) $(SIGNAMES_SUPPORT) $(SCRIPTS_SUPPORT) \ | |
999 | $(BUILTIN_SUPPORT) COPYING Makefile cpp-Makefile ChangeLog \ | |
1000 | .distribution newversion.c $(EXAMPLES) $(SUPPORT_SRC)bash.xbm \ | |
1001 | $(FAQ) $(SUPPORT_SRC)getcppsyms.c $(TEST_SUITE_SUPPORT) | |
1002 | ||
1003 | /**/# BAGGAGE consists of things that you want to keep with the shell for some | |
1004 | /**/# reason, but do not actually use; old source code, etc. | |
1005 | BAGGAGE = | |
1006 | ||
1007 | /**/# Things that the world at large needs. | |
1008 | THINGS_TO_TAR = $(SOURCES) $(LIBRARY_TAR) $(BASHDOCS) $(SUPPORT) $(BAGGAGE) | |
1009 | ||
1010 | /**/# Keep GNU Make from exporting the entire environment for small machines. | |
1011 | .NOEXPORT: | |
1012 | ||
1013 | .made: $(Program) bashbug | |
1014 | cp .machine .made | |
1015 | ||
1016 | $(Program): .build $(OBJECTS) $(LIBDEP) $(srcdir)/.distribution | |
1017 | $(RM) $@ | |
1018 | $(PURIFY) $(CC) $(LDFLAGS) $(LIBRARY_LDFLAGS) -o $(Program) $(OBJECTS) $(LIBRARIES) | |
1019 | ls -l $(Program) | |
1020 | size $(Program) | |
1021 | ||
1022 | .build: $(SOURCES) cpp-Makefile newversion.aux | |
1023 | if ./newversion.aux -dir $(srcdir) -build; then mv -f newversion.h version.h; fi | |
1024 | @echo | |
1025 | @echo " ***************************************************" | |
1026 | @echo " * *" | |
1027 | @echo " * Making Bash-`cat $(srcdir)/.distribution`.`cat $(srcdir)/.patchlevel` for a $(Machine) running $(OS)" | |
1028 | @echo " * *" | |
1029 | @echo " ***************************************************" | |
1030 | @echo | |
1031 | @echo "$(Program) last made for a $(Machine) running $(OS)" >.machine | |
1032 | ||
1033 | bashbug: $(SUPPORT_SRC)bashbug.sh cpp-Makefile newversion.aux | |
1034 | @sed -e "s:@MACHINE@:$(Machine):" -e "s:@OS@:$(OS):" \ | |
1035 | -e "s:@CFLAGS@:$(CCFLAGS):" -e "s:@CC@:$(CC):" \ | |
1036 | -e "s:@RELEASE@:`cat $(srcdir)/.distribution`:" \ | |
1037 | -e "s:@PATCHLEVEL@:`cat $(srcdir)/.patchlevel`:" \ | |
1038 | $(SUPPORT_SRC)bashbug.sh > $@ | |
1039 | @chmod a+rx bashbug | |
1040 | ||
1041 | version.h: newversion.aux | |
1042 | if ./newversion.aux -dir $(srcdir) -build; then mv -f newversion.h version.h; fi | |
1043 | ||
1044 | y.tab.c: parser-built | |
1045 | y.tab.h: parser-built | |
1046 | parser-built: parse.y parser.h command.h stdc.h input.h | |
1047 | $(RM) $@ | |
1048 | -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi | |
1049 | @echo expect 66 shift/reduce conflicts | |
1050 | $(BISON) -d $(srcdir)/parse.y | |
1051 | -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi | |
1052 | touch $@ | |
1053 | ||
1054 | #if defined (READLINE) && defined (HAVE_READLINE_SOURCE) | |
1055 | $(READLINE_LIBRARY): $(READLINE_SOURCE) | |
1056 | build_lib_in_dir ($(RL_LIBDIR), libreadline.a, srcdir=$(RL_ABSSRC), $(RL_ABSSRC)Makefile) | |
1057 | #endif /* READLINE && HAVE_READLINE_SOURCE */ | |
1058 | ||
1059 | #if defined (HISTORY) && defined (HAVE_HISTORY_SOURCE) && !defined (READLINE) | |
1060 | $(HISTORY_LIBRARY): $(HISTORY_SOURCE) | |
1061 | build_lib_in_dir ($(HIST_LIBDIR), libhistory.a, srcdir=$(HIST_ABSSRC), $(HIST_ABSSRC)Makefile) | |
1062 | #endif /* HISTORY && HAVE_HISTORY_SOURCE && !READLINE */ | |
1063 | ||
1064 | #if defined (HAVE_TERMCAP_SOURCE) | |
1065 | $(TERMCAP_LIBRARY): $(TERMCAP_SOURCE) | |
1066 | build_lib_in_dir ($(TERM_LIBDIR), libtermcap.a, srcdir=$(TERM_ABSSRC), $(TERM_ABSSRC)Makefile) | |
1067 | #endif /* HAVE_TERMCAP_SOURCE */ | |
1068 | ||
1069 | #if defined (USE_GLOB_LIBRARY) | |
1070 | $(GLOB_LIBRARY): $(GLOB_SOURCE) | |
1071 | build_lib_in_dir ($(GLOB_LIBDIR), libglob.a, srcdir=$(GLOB_ABSSRC), $(GLOB_ABSSRC)Makefile) | |
1072 | #endif /* USE_GLOB_LIBRARY */ | |
1073 | ||
1074 | #if defined (HAVE_TILDE_SOURCE) | |
1075 | $(TILDE_LIBRARY): $(TILDE_SOURCE) | |
1076 | build_lib_in_dir ($(TILDE_LIBDIR), libtilde.a, srcdir=$(TILDE_ABSSRC), $(TILDE_ABSSRC)Makefile) | |
1077 | #endif /* HAVE_TILDE_SOURCE */ | |
1078 | ||
1079 | #if defined (USE_GNU_MALLOC) && defined (USE_GNU_MALLOC_LIBRARY) | |
1080 | $(MALLOC_LIBRARY): $(MALLOC_SOURCE) | |
1081 | build_lib_in_dir ($(MALLOC_LIBDIR), libmalloc.a, srcdir=$(MALLOC_ABSSRC), $(MALLOC_ABSSRC)Makefile) | |
1082 | #endif /* USE_GNU_MALLOC && USE_GNU_MALLOC_LIBRARY */ | |
1083 | ||
1084 | version.o: version.c version.h | |
1085 | ||
1086 | shell.o: shell.c shell.h flags.h shell.c posixstat.h filecntl.h stdc.h $(ENDIAN_HEADER) parser.h | |
1087 | $(RM) $@ | |
1088 | $(CC) $(CFG_FLAGS) $(CCFLAGS) $(CPPFLAGS) -c $(srcdir)/shell.c | |
1089 | ||
1090 | #if !defined (HAVE_WAIT_H) | |
1091 | $(ENDIAN_HEADER): endian.aux | |
1092 | $(RM) $@ | |
1093 | ./endian.aux $@ | |
1094 | #endif | |
1095 | ||
1096 | signames.h: signames.aux | |
1097 | $(RM) $@ | |
1098 | ./signames.aux $@ | |
1099 | ||
1100 | variables.o: variables.c shell.h hash.h flags.h variables.h | |
1101 | $(RM) $@ | |
1102 | $(CC) -c $(CCFLAGS) $(HOSTTYPE_DECL) $(CPPFLAGS) $(srcdir)/variables.c | |
1103 | ||
1104 | builtins/libbuiltins.a: $(BUILTIN_OBJS) config.h memalloc.h | |
1105 | build_builtins (libbuiltins.a) | |
1106 | ||
1107 | #if 0 | |
1108 | /* This is a nice idea, but it does not work right, and the syntax is | |
1109 | not universally available. */ | |
1110 | $(BUILTIN_OBJS): $(BUILTIN_DEFS) | |
1111 | build_builtins ($(@F)) | |
1112 | #endif | |
1113 | ||
1114 | builtins/common.o: $(BUILTIN_SRCDIR)common.c | |
1115 | build_builtins (common.o) | |
1116 | builtins/bashgetopt.o: $(BUILTIN_SRCDIR)bashgetopt.c | |
1117 | build_builtins (bashgetopt.o) | |
1118 | ||
1119 | builtins/builtext.h: builtins/libbuiltins.a | |
1120 | ||
1121 | /* Dependencies for the main bash source. */ | |
1122 | copy_cmd.o: shell.h command.h stdc.h hash.h | |
1123 | copy_cmd.o: general.h variables.h config.h memalloc.h quit.h | |
1124 | copy_cmd.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1125 | dispose_cmd.o: shell.h command.h stdc.h | |
1126 | dispose_cmd.o: general.h variables.h config.h memalloc.h quit.h | |
1127 | dispose_cmd.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1128 | error.o: error.h | |
1129 | execute_cmd.o: shell.h command.h stdc.h y.tab.h posixstat.h flags.h jobs.h | |
1130 | execute_cmd.o: general.h variables.h config.h memalloc.h quit.h hash.h | |
1131 | execute_cmd.o: unwind_prot.h siglist.h builtins/builtext.h | |
1132 | execute_cmd.o: dispose_cmd.h make_cmd.h subst.h externs.h bashtypes.h | |
1133 | expr.o: shell.h command.h stdc.h hash.h | |
1134 | expr.o: general.h variables.h config.h memalloc.h quit.h | |
1135 | expr.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1136 | flags.o: flags.h stdc.h config.h memalloc.h general.h quit.h | |
1137 | general.o: shell.h command.h stdc.h maxpath.h | |
1138 | general.o: general.h variables.h config.h memalloc.h quit.h machines.h | |
1139 | general.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1140 | hash.o: shell.h command.h stdc.h hash.h | |
1141 | hash.o: general.h variables.h config.h memalloc.h quit.h | |
1142 | hash.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1143 | jobs.o: shell.h command.h stdc.h hash.h trap.h jobs.h siglist.h | |
1144 | jobs.o: general.h variables.h config.h memalloc.h quit.h | |
1145 | jobs.o: dispose_cmd.h make_cmd.h subst.h externs.h builtins/builtext.h | |
1146 | mailcheck.o: posixstat.h maxpath.h variables.h | |
1147 | mailcheck.o: hash.h quit.h | |
1148 | make_cmd.o: shell.h command.h stdc.h flags.h input.h bashtypes.h | |
1149 | make_cmd.o: general.h variables.h config.h memalloc.h quit.h | |
1150 | make_cmd.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1151 | y.tab.o: shell.h command.h stdc.h flags.h maxpath.h alias.h | |
1152 | y.tab.o: general.h variables.h config.h memalloc.h quit.h | |
1153 | y.tab.o: dispose_cmd.h make_cmd.h subst.h externs.h bashtypes.h | |
1154 | print_cmd.o: shell.h command.h stdc.h y.tab.h | |
1155 | print_cmd.o: general.h variables.h config.h memalloc.h quit.h | |
1156 | print_cmd.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1157 | shell.o: shell.h command.h stdc.h flags.h machines.h | |
1158 | shell.o: general.h variables.h config.h memalloc.h quit.h | |
1159 | shell.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1160 | shell.o: posixstat.h filecntl.h jobs.h input.h | |
1161 | subst.o: shell.h command.h stdc.h flags.h jobs.h siglist.h bashtypes.h | |
1162 | subst.o: general.h variables.h config.h memalloc.h quit.h | |
1163 | subst.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h | |
1164 | test.o: posixstat.h | |
1165 | trap.o: trap.h shell.h command.h stdc.h hash.h unwind_prot.h signames.h | |
1166 | trap.o: general.h variables.h config.h memalloc.h quit.h | |
1167 | trap.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1168 | unwind_prot.o: config.h memalloc.h general.h unwind_prot.h | |
1169 | variables.o: shell.h command.h stdc.h hash.h flags.h | |
1170 | variables.o: config.h memalloc.h general.h variables.h quit.h | |
1171 | variables.o: execute_cmd.h dispose_cmd.h make_cmd.h subst.h externs.h | |
1172 | version.o: version.h .build | |
1173 | ||
1174 | alias.o: ansi_stdlib.h | |
1175 | bashline.o: ansi_stdlib.h | |
1176 | variables.o: ansi_stdlib.h | |
1177 | shell.o: ansi_stdlib.h | |
1178 | error.o: ansi_stdlib.h | |
1179 | hash.o: ansi_stdlib.h | |
1180 | signames.o: ansi_stdlib.h | |
1181 | expr.o: ansi_stdlib.h | |
1182 | general.o: ansi_stdlib.h | |
1183 | input.o: ansi_stdlib.h | |
1184 | ||
1185 | #if !defined (JOB_CONTROL) | |
1186 | jobs.o: nojobs.c | |
1187 | #endif /* !JOB_CONTROL */ | |
1188 | ||
1189 | #if defined (BRACE_EXPANSION) | |
1190 | braces.o: general.h shell.h variables.h quit.h config.h memalloc.h | |
1191 | braces.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1192 | braces.o: maxpath.h unwind_prot.h command.h stdc.h | |
1193 | # if defined (READLINE) | |
1194 | bracecomp.o: bracecomp.c | |
1195 | bracecomp.o: shell.h command.h hash.h builtins.h general.h variables.h | |
1196 | bracecomp.o: quit.h alias.h | |
1197 | bracecomp.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1198 | # if defined (HAVE_READLINE_SOURCE) | |
1199 | bracecomp.o: $(RL_LIBSRC)readline.h | |
1200 | # endif /* HAVE_READLINE_SOURCE */ | |
1201 | # endif /* READLINE */ | |
1202 | #endif /* BRACE_EXPANSION */ | |
1203 | ||
1204 | #if defined (READLINE) | |
1205 | bashline.o: shell.h command.h stdc.h hash.h builtins.h execute_cmd.h | |
1206 | bashline.o: general.h variables.h config.h memalloc.h quit.h alias.h | |
1207 | bashline.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1208 | #endif /* READLINE */ | |
1209 | ||
1210 | /* Dependencies which rely on the user using the source to READLINE. */ | |
1211 | #if defined (READLINE) && defined (HAVE_READLINE_SOURCE) | |
1212 | bashline.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h | |
1213 | y.tab.o: $(RL_LIBSRC)keymaps.h $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h | |
1214 | #endif /* READLINE && HAVE_READLINE_SOURCE */ | |
1215 | ||
1216 | #if defined (HISTORY) && defined (HAVE_HISTORY_SOURCE) | |
1217 | subst.o: $(HIST_LIBSRC)history.h | |
1218 | bashline.o: $(HIST_LIBSRC)history.h | |
1219 | y.tab.o: $(HIST_LIBSRC)history.h | |
1220 | #endif /* HISTORY && HAVE_HISTORY_SOURCE */ | |
1221 | ||
1222 | #if defined (USE_GLOB_LIBRARY) | |
1223 | subst.o: $(GLOB_LIBSRC)fnmatch.h | |
1224 | execute_cmd.o: $(GLOB_LIBSRC)fnmatch.h | |
1225 | #endif /* USE_GLOB_LIBRARY */ | |
1226 | ||
1227 | #if defined (HAVE_TILDE_SOURCE) | |
1228 | execute_cmd.o: $(TILDE_LIBSRC)tilde.h | |
1229 | general.o: $(TILDE_LIBSRC)tilde.h | |
1230 | mailcheck.o: $(TILDE_LIBSRC)tilde.h | |
1231 | shell.o: $(TILDE_LIBSRC)tilde.h | |
1232 | subst.o: $(TILDE_LIBSRC)tilde.h | |
1233 | variables.o: $(TILDE_LIBSRC)tilde.h | |
1234 | #endif /* HAVE_TILDE_SOURCE */ | |
1235 | ||
1236 | /* Dependencies for the shell builtins. */ | |
1237 | builtins/common.o: shell.h command.h config.h memalloc.h general.h error.h | |
1238 | builtins/common.o: variables.h input.h $(DEFDIR)hashcom.h siglist.h | |
1239 | builtins/common.o: quit.h unwind_prot.h maxpath.h jobs.h builtins.h | |
1240 | builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h | |
1241 | builtins/common.o: execute_cmd.h stdc.h | |
1242 | builtins/alias.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1243 | builtins/alias.o: quit.h builtins/common.h | |
1244 | builtins/alias.o: shell.h command.h stdc.h unwind_prot.h variables.h | |
1245 | builtins/alias.o: dispose_cmd.h make_cmd.h subst.h externs.h | |
1246 | builtins/bind.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1247 | builtins/bind.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1248 | builtins/bind.o: shell.h unwind_prot.h variables.h quit.h | |
1249 | builtins/bind.o: $(DEFDIR)bashgetopt.h | |
1250 | builtins/break.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1251 | builtins/break.o: shell.h unwind_prot.h variables.h quit.h | |
1252 | builtins/break.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1253 | builtins/builtin.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1254 | builtins/builtin.o: quit.h $(DEFDIR)common.h | |
1255 | builtins/builtin.o: shell.h unwind_prot.h variables.h | |
1256 | builtins/builtin.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1257 | builtins/cd.o: command.h config.h memalloc.h error.h general.h maxpath.h quit.h | |
1258 | builtins/cd.o: shell.h unwind_prot.h variables.h $(DEFDIR)common.h | |
1259 | builtins/cd.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1260 | builtins/command.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1261 | builtins/command.o: quit.h $(DEFDIR)bashgetopt.h | |
1262 | builtins/command.o: shell.h unwind_prot.h variables.h | |
1263 | builtins/command.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1264 | builtins/declare.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1265 | builtins/declare.o: shell.h unwind_prot.h variables.h quit.h | |
1266 | builtins/declare.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1267 | builtins/echo.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1268 | builtins/echo.o: shell.h unwind_prot.h variables.h quit.h | |
1269 | builtins/echo.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1270 | builtins/enable.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1271 | builtins/enable.o: shell.h unwind_prot.h variables.h quit.h | |
1272 | builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1273 | builtins/eval.o: command.h config.h memalloc.h error.h general.h maxpath.h quit.h | |
1274 | builtins/eval.o: shell.h unwind_prot.h variables.h | |
1275 | builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1276 | builtins/exec.o: command.h config.h memalloc.h error.h general.h maxpath.h quit.h | |
1277 | builtins/exec.o: shell.h unwind_prot.h variables.h $(DEFDIR)common.h stdc.h | |
1278 | builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h | |
1279 | builtins/exec.o: flags.h | |
1280 | builtins/exit.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1281 | builtins/exit.o: shell.h unwind_prot.h variables.h quit.h | |
1282 | builtins/exit.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1283 | builtins/fc.o: builtins.h command.h stdc.h | |
1284 | builtins/fc.o: command.h config.h memalloc.h error.h general.h maxpath.h quit.h | |
1285 | builtins/fc.o: flags.h unwind_prot.h variables.h shell.h | |
1286 | builtins/fc.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1287 | builtins/fc.o: $(DEFDIR)bashgetopt.h bashhist.h | |
1288 | builtins/fg_bg.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1289 | builtins/fg_bg.o: shell.h unwind_prot.h variables.h quit.h | |
1290 | builtins/fg_bg.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1291 | builtins/getopts.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1292 | builtins/getopts.o: shell.h unwind_prot.h variables.h quit.h | |
1293 | builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1294 | builtins/hash.o: builtins.h command.h execute_cmd.h stdc.h | |
1295 | builtins/hash.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1296 | builtins/hash.o: shell.h unwind_prot.h variables.h $(DEFDIR)common.h quit.h | |
1297 | builtins/help.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1298 | builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1299 | builtins/help.o: shell.h unwind_prot.h variables.h quit.h | |
1300 | builtins/history.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1301 | builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1302 | builtins/history.o: filecntl.h shell.h unwind_prot.h variables.h | |
1303 | builtins/history.o: bashhist.h | |
1304 | builtins/inlib.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1305 | builtins/inlib.o: shell.h unwind_prot.h variables.h quit.h | |
1306 | builtins/inlib.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1307 | builtins/jobs.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1308 | builtins/jobs.o: quit.h $(DEFDIR)bashgetopt.h | |
1309 | builtins/jobs.o: shell.h unwind_prot.h variables.h | |
1310 | builtins/jobs.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1311 | builtins/kill.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1312 | builtins/kill.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1313 | builtins/kill.o: shell.h trap.h unwind_prot.h variables.h | |
1314 | builtins/let.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1315 | builtins/let.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1316 | builtins/let.o: shell.h unwind_prot.h variables.h | |
1317 | builtins/read.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1318 | builtins/read.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1319 | builtins/read.o: shell.h unwind_prot.h variables.h | |
1320 | builtins/return.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1321 | builtins/return.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1322 | builtins/return.o: shell.h unwind_prot.h variables.h | |
1323 | builtins/set.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1324 | builtins/set.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h | |
1325 | builtins/set.o: shell.h unwind_prot.h variables.h flags.h stdc.h | |
1326 | builtins/setattr.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1327 | builtins/setattr.o: quit.h $(DEFDIR)common.h $(DEFDIR)bashgetopt.h | |
1328 | builtins/setattr.o: shell.h unwind_prot.h variables.h | |
1329 | builtins/setattr.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1330 | builtins/shift.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1331 | builtins/shift.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1332 | builtins/shift.o: shell.h unwind_prot.h variables.h | |
1333 | builtins/shift.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1334 | builtins/source.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1335 | builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1336 | builtins/source.o: shell.h unwind_prot.h variables.h | |
1337 | builtins/suspend.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1338 | builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1339 | builtins/suspend.o: shell.h unwind_prot.h variables.h | |
1340 | builtins/test.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1341 | builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1342 | builtins/test.o: shell.h unwind_prot.h variables.h | |
1343 | builtins/times.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1344 | builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1345 | builtins/times.o: shell.h unwind_prot.h variables.h | |
1346 | builtins/trap.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1347 | builtins/trap.o: quit.h $(DEFDIR)common.h | |
1348 | builtins/trap.o: shell.h unwind_prot.h variables.h | |
1349 | builtins/trap.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1350 | builtins/type.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1351 | builtins/type.o: quit.h $(DEFDIR)common.h | |
1352 | builtins/type.o: shell.h unwind_prot.h variables.h execute_cmd.h | |
1353 | builtins/type.o: dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1354 | builtins/ulimit.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1355 | builtins/ulimit.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1356 | builtins/ulimit.o: shell.h unwind_prot.h variables.h | |
1357 | builtins/umask.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1358 | builtins/umask.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1359 | builtins/umask.o: shell.h unwind_prot.h variables.h | |
1360 | builtins/wait.o: command.h config.h memalloc.h error.h general.h maxpath.h | |
1361 | builtins/wait.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h stdc.h | |
1362 | builtins/wait.o: shell.h unwind_prot.h variables.h | |
1363 | ||
1364 | builtins/bashgetopt.o: bashansi.h ansi_stdlib.h | |
1365 | builtins/mkbuiltins.o: bashansi.h ansi_stdlib.h | |
1366 | builtins/fc.o: bashansi.h ansi_stdlib.h | |
1367 | ||
1368 | #if defined (READLINE) && defined (HAVE_READLINE_SOURCE) | |
1369 | builtins/bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h | |
1370 | #endif /* READLINE && HAVE_READLINE_SOURCE */ | |
1371 | ||
1372 | #if defined (HISTORY) && defined (HAVE_HISTORY_SOURCE) | |
1373 | builtins/bind.o: $(HIST_LIBSRC)history.h | |
1374 | builtins/fc.o: $(HIST_LIBSRC)history.h | |
1375 | builtins/history.o: $(HIST_LIBSRC)history.h | |
1376 | #endif /* HISTORY && HAVE_HISTORY_SOURCE */ | |
1377 | ||
1378 | #if defined (HAVE_TILDE_SOURCE) | |
1379 | builtins/common.o: $(TILDE_LIBSRC)tilde.h | |
1380 | builtins/cd.o: $(TILDE_LIBSRC)tilde.h | |
1381 | #endif /* HAVE_TILDE_SOURCE */ | |
1382 | ||
1383 | builtins/alias.o: builtins/alias.def | |
1384 | builtins/bind.o: builtins/bind.def | |
1385 | builtins/break.o: builtins/break.def | |
1386 | builtins/builtin.o: builtins/builtin.def | |
1387 | builtins/cd.o: builtins/cd.def | |
1388 | builtins/colon.o: builtins/colon.def | |
1389 | builtins/command.o: builtins/command.def | |
1390 | builtins/declare.o: builtins/declare.def | |
1391 | builtins/echo.o: builtins/echo.def | |
1392 | builtins/enable.o: builtins/enable.def | |
1393 | builtins/eval.o: builtins/eval.def | |
1394 | builtins/exec.o: builtins/exec.def | |
1395 | builtins/exit.o: builtins/exit.def | |
1396 | builtins/fc.o: builtins/fc.def | |
1397 | builtins/fg_bg.o: builtins/fg_bg.def | |
1398 | builtins/getopts.o: builtins/getopts.def | |
1399 | builtins/hash.o: builtins/hash.def | |
1400 | builtins/help.o: builtins/help.def | |
1401 | builtins/histctl.o: builtins/histctl.def | |
1402 | builtins/history.o: builtins/history.def | |
1403 | builtins/inlib.o: builtins/inlib.def | |
1404 | builtins/jobs.o: builtins/jobs.def | |
1405 | builtins/kill.o: builtins/kill.def | |
1406 | builtins/let.o: builtins/let.def | |
1407 | builtins/read.o: builtins/read.def | |
1408 | builtins/reserved.o: builtins/reserved.def | |
1409 | builtins/return.o: builtins/return.def | |
1410 | builtins/set.o: builtins/set.def | |
1411 | builtins/setattr.o: builtins/setattr.def | |
1412 | builtins/shift.o: builtins/shift.def | |
1413 | builtins/source.o: builtins/source.def | |
1414 | builtins/suspend.o: builtins/suspend.def | |
1415 | builtins/test.o: builtins/test.def | |
1416 | builtins/times.o: builtins/times.def | |
1417 | builtins/trap.o: builtins/trap.def | |
1418 | builtins/type.o: builtins/type.def | |
1419 | builtins/ulimit.o: builtins/ulimit.def | |
1420 | builtins/umask.o: builtins/umask.def | |
1421 | builtins/wait.o: builtins/wait.def | |
1422 | ||
1423 | $(Program).tar: $(THINGS_TO_TAR) .distribution | |
1424 | @$(MKTARFILE) $(Program) `cat .distribution` $(THINGS_TO_TAR) | |
1425 | ||
1426 | $(Program).tar$(COMPRESS_EXT): $(Program).tar | |
1427 | $(COMPRESS) < $(Program).tar > $@ | |
1428 | ||
1429 | clone: $(THINGS_TO_TAR) | |
1430 | @$(MKTARFILE) +notar $(Machine) $(OS) $(THINGS_TO_TAR) | |
1431 | ||
1432 | installdirs: | |
1433 | @${SHELL} $(SUPPORT_SRC)mkdirs $(bindir) | |
1434 | @${SHELL} $(SUPPORT_SRC)mkdirs $(mandir) $(man3dir) | |
1435 | @${SHELL} $(SUPPORT_SRC)mkdirs $(infodir) | |
1436 | ||
1437 | install: .made installdirs documentation | |
1438 | -if [ -f $(bindir)/$(Program) ]; then \ | |
1439 | rm -f $(bindir)/$(Program).old ;\ | |
1440 | ln $(bindir)/$(Program) $(bindir)/$(Program).old; \ | |
1441 | fi | |
1442 | $(INSTALL_PROGRAM) $(Program) $(bindir)/$(Program) | |
1443 | -if [ -f $(bindir)/bashbug ]; \ | |
1444 | then mv $(bindir)/bashbug $(bindir)/bashbug.old; \ | |
1445 | fi | |
1446 | $(INSTALL_PROGRAM) bashbug $(bindir)/bashbug | |
1447 | ( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) mandir=$(mandir) \ | |
1448 | man3dir=$(man3dir) infodir=$(infodir) $@ ) | |
1449 | ||
1450 | uninstall: .made | |
1451 | $(RM) $(bindir)/$(Program) installed-$(Program) $(bindir)/bashbug | |
1452 | ( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) mandir=$(mandir) man3dir=$(man3dir) infodir=$(infodir) $@ ) | |
1453 | ||
1454 | .distribution: | |
1455 | ./newversion.aux -dir $(srcdir) -dist `$(Program) -c 'echo $$BASH_VERSION'` | |
1456 | ||
1457 | distribution: $(Program) $(Program).tar$(COMPRESS_EXT) .distribution | |
1458 | @echo cp $(Program).tar$(COMPRESS_EXT) \ | |
1459 | $(Program)-`cat .distribution`.tar$(COMPRESS_EXT) | |
1460 | @cp $(Program).tar$(COMPRESS_EXT) \ | |
1461 | $(Program)-`cat .distribution`.tar$(COMPRESS_EXT) | |
1462 | ||
1463 | mailable: distribution | |
1464 | /bin/rm -rf uuencoded | |
1465 | mkdir uuencoded | |
1466 | $(SHELL) -c 'f=$(Program)-`cat .distribution`.tar.Z;uuencode $$f $$f | split -800 - uuencoded/$$f.uu.' | |
1467 | ||
1468 | newversion.aux: newversion.c | |
1469 | $(CC) $(CCFLAGS) -o $@ $(srcdir)/newversion.c | |
1470 | ||
1471 | newversion: newversion.aux | |
1472 | $(RM) .build | |
1473 | ./newversion.aux -dir $(srcdir) -dist | |
1474 | mv -f newversion.h version.h | |
1475 | $(MAKE) -f $(srcdir)/Makefile $(MFLAGS) srcdir=$(srcdir) | |
1476 | ||
1477 | documentation: force | |
1478 | (cd $(DOCDIR); $(MAKE) $(MFLAGS)) | |
1479 | ||
1480 | force: | |
1481 | ||
1482 | tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) | |
1483 | etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) | |
1484 | ||
1485 | TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) | |
1486 | ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ | |
1487 | ||
1488 | basic-clean: | |
1489 | $(RM) $(OBJECTS) $(Program) bashbug ansi-Makefile *.aux | |
1490 | $(RM) .build .made .machine version.h | |
1491 | $(RM) $(CREATED_SUPPORT) | |
1492 | $(RM) tags TAGS | |
1493 | ||
1494 | mostlyclean: | |
1495 | $(RM) $(OBJECTS) $(Program) bashbug | |
1496 | $(RM) .build .made .machine version.h | |
1497 | $(RM) tags TAGS | |
1498 | (cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) | |
1499 | (cd builtins && $(MAKE) $(MFLAGS) $@ ) | |
1500 | $(CLEAN_READLINE) ; | |
1501 | $(CLEAN_HISTORY) ; | |
1502 | $(CLEAN_TERMCAP) ; | |
1503 | $(CLEAN_GLOB) ; | |
1504 | $(CLEAN_TILDE) ; | |
1505 | $(CLEAN_MALLOC) ; | |
1506 | ||
1507 | distclean clean: basic-clean | |
1508 | (cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) | |
1509 | (cd builtins && $(MAKE) $(MFLAGS) $@ ) | |
1510 | $(CLEAN_READLINE) ; | |
1511 | $(CLEAN_HISTORY) ; | |
1512 | $(CLEAN_TERMCAP) ; | |
1513 | $(CLEAN_GLOB) ; | |
1514 | $(CLEAN_TILDE) ; | |
1515 | $(CLEAN_MALLOC) ; | |
1516 | $(RM) bash-Makefile | |
1517 | ||
1518 | realclean maintainer-clean: basic-clean | |
1519 | $(RM) y.tab.c y.tab.h parser-built | |
1520 | (cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) | |
1521 | (cd builtins && $(MAKE) $(MFLAGS) $@ ) | |
1522 | $(CLEAN_READLINE) ; | |
1523 | $(CLEAN_HISTORY) ; | |
1524 | $(CLEAN_TERMCAP) ; | |
1525 | $(CLEAN_GLOB) ; | |
1526 | $(CLEAN_TILDE) ; | |
1527 | $(CLEAN_MALLOC) ; | |
1528 | $(RM) bash-Makefile | |
1529 | ||
1530 | recho: $(SUPPORT_SRC)recho.c | |
1531 | @$(CC) -o $@ $(SUPPORT_SRC)recho.c | |
1532 | ||
1533 | tests check: force $(Program) recho | |
1534 | @cp recho $(SUPPORT_SRC)printenv tests | |
1535 | ( cd tests ; sh run-all ) | |
1536 | ||
1537 | /**/# Here is a convenient rule when you arrive at a new site and wish to | |
1538 | /**/# install bash on several different architectures. It creates a new | |
1539 | /**/# directory to hold the results of compilation. The directory is | |
1540 | /**/# named Machine-OS. | |
1541 | architecture: $(Machine)-$(OS)/$(Program) | |
1542 | ||
1543 | $(Machine)-$(OS): | |
1544 | -mkdir $(Machine)-$(OS) | |
1545 | ||
1546 | $(Machine)-$(OS)/$(Program): $(Machine)-$(OS) $(Program) | |
1547 | mv $(Program) $(Machine)-$(OS) | |
1548 | mv sysdefs.h $(Machine)-$(OS) | |
1549 | mv $(SDIR)getcppsyms $(Machine)-$(OS) | |
1550 | $(MAKE) $(MFLAGS) clean | |
1551 | ||
1552 | DEFINES: config.h memalloc.h cpp-Makefile sysdefs.h | |
1553 | echo $(CCFLAGS) $(CPPFLAGS) >DEFINES |