1 # Hey Emacs, this Makefile is in -*- makefile -*- mode!
4 # If your cpp doesn't like -P, just get rid of it (the -P, not cpp).
5 # If you wish to use Gcc, then type `make CC=gcc CPPNAME='$(CC) -E''.
6 # If you wish to use GNU's Make, then change `MAKE'.
7 # If you don't like the destination, then change `bindir'.
8 # The file that you most likely want to look at is cpp-Makefile.
10 # If you haven't read README, now might be a good time.
12 # Include some boilerplate Gnu makefile definitions.
14 exec_prefix = $(prefix)
15 bindir = $(exec_prefix)/bin
25 # Force CPPNAME to be the name of your C preprocesor if Bash can't
26 # find it. For instance, `CPPNAME=/usr/libexec/cpp' on 4.4 BSD.
27 # If all else fails, set CPPNAME=$(CC) -E
29 CPP
= `$(SHELL) $(CPPMAGIC) $(GETCPPSYMS) "$(CPPNAME)"` -P
31 CPP_MAKEFILE
= $(srcdir)/cpp-Makefile
32 ANSI_MAKEFILE
= ansi-Makefile
34 # CPPFLAGS = $(SYSTEM) $(CPP_DEFINES)
35 CPPFLAGS
= $(CPP_DEFINES
) -I.
-I
$(srcdir)
36 CPP_ARGS
= -DCPP_CC
="$(CC)"
38 SUPPORTDIR
= .
/support
/
39 SUPPORTSRC
= $(srcdir)/support
/
41 MKSYSDEFS
= $(SUPPORTSRC
)mksysdefs
42 CPPMAGIC
= $(SUPPORTSRC
)cppmagic
43 CAT_S
= $(SUPPORTSRC
)cat-s
44 GETCPPSYMS
= $(SUPPORTDIR
)getcppsyms
45 GETCPPSYMS_SRC
= $(SUPPORTSRC
)getcppsyms.c
47 # Here is a command which compresses runs of multiple blank lines to a
48 # single blank line. "cat -s" works for BSD systems, but not for USG
49 # systems. You can use an awk script if you like. If you have too
50 # much trouble with this, just forget it. It is for making
51 # bash-Makefile pretty and readable; something that isn't strictly
53 # SQUASH_BLANKS = cat -s
55 SQUASH_BLANKS
= $(GAWK
) -f
$(CAT_S
)
57 all: .notified bash-Makefile
58 $(MAKE
) -f bash-Makefile
$(MFLAGS
) $(MAKEARGS
) srcdir=$(srcdir)
60 bash-Makefile
: $(CPP_MAKEFILE
) Makefile machines.h sysdefs.h config.h
61 @
-if
[ -f ansi-Makefile
]; then \
62 echo
"cp ansi-Makefile tmp-Makefile.c"; \
63 cp ansi-Makefile tmp-Makefile.c
; else \
64 echo
"cp $(CPP_MAKEFILE) tmp-Makefile.c"; \
65 cp
$(CPP_MAKEFILE
) tmp-Makefile.c
; \
68 $(SHELL
) $(SUPPORTSRC
)mkdirs support
69 $(CC
) -o
$(GETCPPSYMS
) $(GETCPPSYMS_SRC
)
71 @
$(SHELL
) -c
'echo $(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c \| $(SQUASH_BLANKS) \> bash-Makefile'
72 @
$(SHELL
) -c
'$(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c | $(SQUASH_BLANKS) >bash-Makefile'
74 @
test -s bash-Makefile ||
{ rm -f bash-Makefile
; exit
1; }
76 sysdefs.h
: $(MKSYSDEFS
)
77 $(SHELL
) $(MKSYSDEFS
) -s
$(srcdir)
79 # This is also performed by support/mksysdefs, but there's no way to change
80 # it if cpp-Makefile is changed without changing anything else, since there
81 # are no dependencies. This lets you run `make ansi-Makefile'.
82 ansi-Makefile
: $(CPP_MAKEFILE
)
83 grep
-v
'/\*\*/' $(CPP_MAKEFILE
) > $@
85 # Subsequent lines contain targets that are correctly handled by an
86 # existing bash-Makefile.
88 install uninstall newversion architecture
: bash-Makefile
89 $(MAKE
) -f bash-Makefile
$(MFLAGS
) $(MAKEARGS
) bindir=$(bindir) \
92 tests DEFINES
tags documentation
: bash-Makefile directory-frob
93 $(MAKE
) -f bash-Makefile
$(MFLAGS
) $(MAKEARGS
) $@
95 clean distclean realclean mostlyclean maintainer-clean
: bash-Makefile directory-frob
97 $(MAKE
) -f bash-Makefile
$(MFLAGS
) $(MAKEARGS
) $@
105 @echo
" You are about to make this version of GNU Bash for"
106 @echo
" this architecture for the first time. If you haven't"
107 @echo
" yet read the README file, you may want to do so. If"
108 @echo
" you wish to report a bug in Bash, or in the installation"
109 @echo
" procedure, please run the bashbug script and include:"
111 @echo
" * a description of the bug,"
112 @echo
" * a recipe for recreating the bug reliably,"
113 @echo
" * a fix for the bug if you have one!"