Makefile.tpl
3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[+ AutoGen5 template
# Makefile.tpl
# Run 'autogen Makefile.def' in the same directory to regenerate Makefile.in
#
# This file is mostly an ordinary Makefile.in.
# Certain repetitive sections are generated by autogen;
# the parts with [+ and +] around them are the macros.
#
# Use .in as the suffix for the generated file
in
# make sure we don't use csh:
(setenv "SHELL" "/bin/sh")
+]
#
# Makefile.tpl, Makefile.in, Makefile
# Copyright 2002 Free Software Foundation
#
# This file is part of GDB.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
SHELL = /bin/sh
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
infodir = @infodir@
includedir = @includedir@
srcdir = @srcdir@
abs_srcdir = @abs_srcdir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
tooldir = $(exec_prefix)
subconfigure_args = @subconfigure_args@
# Should it be INSTALL = @INSTALL@ -c ?
# The old makefile passed the -c argument.
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
# public targets
all: @all_subdirs@
install: @install_subdirs@
mostlyclean: @mostlyclean_subdirs@
clean: @clean_subdirs@
# These should always clean all sudirectories...
distclean: [+ FOR subdirs +]distclean-[+subdir+] [+ ENDFOR subdirs +]
maintainer-clean: [+ FOR subdirs +]maintainer-clean-[+subdir+] [+ ENDFOR subdirs +]
clean mostlyclean:
-rm -f *~ core *.o a.out
maintainer-clean distclean:
-rm -f Makefile config.status config.log config.cache *~ core *.o a.out
info:
install-info:
clean-info:
dvi:
.PHONY: all install clean mostlyclean distclean maintainer-clean
.PHONY: info install-info clean-info dvi
.NOEXPORT:
# Rules for regenerating this Makefile
Makefile: $(srcdir)/Makefile.in config.status
./config.status
$(srcdir)/Makefile.in: $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
cd $(srcdir) && autogen Makefile.def
config.status: $(srcdir)/configure
./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && autoconf
# Miscellaneous variable setting
AR_FLAGS = qv
FLAGS_TO_PASS = \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"AS=$(AS)" \
"CROSS_CFLAGS=$(CROSS_CFLAGS)" \
"TARGET_CFLAGS=$(TARGET_CFLAGS)" \
"INCLUDES=$(INCLUDES)"
# Everything from here on down is generated by FOR loops in autogen.
[+ FOR targets +]
# Glue for [+target+].
[+ FOR subdirs +]
[+target+]-[+subdir+]: configure-[+subdir+]
[+makeline_flag+]cd [+subdir+] && $(MAKE) [+target_flags+] [+target+]
.PHONY: [+target+]-[+subdir+]
[+ ENDFOR subdirs +][+ ENDFOR targets +]
# Glue for configure.
[+ FOR subdirs +]
configure-[+subdir+]: [+subdir+]/Makefile
[+subdir+]/Makefile: config.status
test -d [+subdir+] || mkdir [+subdir+] ; \
cd [+subdir+] && $(abs_srcdir)/[+subdir+]/configure $(subconfigure_args)/[+subdir+]
.PHONY: configure-[+subdir+]
[+ ENDFOR subdirs +]