]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/data-directory/Makefile.in
Add Guile as an extension language.
[thirdparty/binutils-gdb.git] / gdb / data-directory / Makefile.in
1 # Copyright (C) 2010-2014 Free Software Foundation, Inc.
2
3 # Makefile for building a staged copy of the data-directory.
4 # This file is part of GDB.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 srcdir = @srcdir@
20 SYSCALLS_SRCDIR = $(srcdir)/../syscalls
21 PYTHON_SRCDIR = $(srcdir)/../python/lib
22 GUILE_SRCDIR = $(srcdir)/../guile/lib
23 SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
24 VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
25
26 top_srcdir = @top_srcdir@
27 top_builddir = @top_builddir@
28
29 prefix = @prefix@
30 exec_prefix = @exec_prefix@
31
32 datarootdir = @datarootdir@
33 datadir = @datadir@
34
35 SHELL = @SHELL@
36
37 LN_S = @LN_S@
38
39 INSTALL = @INSTALL@
40 INSTALL_DATA = @INSTALL_DATA@
41 INSTALL_DIR = $(SHELL) $(srcdir)/../../mkinstalldirs
42
43 GDB_DATADIR = @GDB_DATADIR@
44
45 SYSCALLS_DIR = syscalls
46 SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
47 SYSCALLS_FILES = \
48 gdb-syscalls.dtd \
49 arm-linux.xml \
50 ppc-linux.xml ppc64-linux.xml \
51 i386-linux.xml amd64-linux.xml \
52 sparc-linux.xml sparc64-linux.xml \
53 mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml \
54 s390-linux.xml s390x-linux.xml
55
56 PYTHON_DIR = python
57 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
58 PYTHON_FILES = \
59 gdb/__init__.py \
60 gdb/frames.py \
61 gdb/FrameIterator.py \
62 gdb/FrameDecorator.py \
63 gdb/types.py \
64 gdb/printing.py \
65 gdb/prompt.py \
66 gdb/command/bound_registers.py \
67 gdb/command/__init__.py \
68 gdb/command/frame_filters.py \
69 gdb/command/type_printers.py \
70 gdb/command/pretty_printers.py \
71 gdb/command/prompt.py \
72 gdb/command/explore.py \
73 gdb/function/__init__.py \
74 gdb/function/strfns.py
75
76 GUILE_DIR = guile
77 GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
78 GUILE_FILES = \
79 ./gdb.scm \
80 gdb/boot.scm \
81 gdb/experimental.scm \
82 gdb/init.scm \
83 gdb/iterator.scm \
84 gdb/printing.scm \
85 gdb/types.scm
86
87 SYSTEM_GDBINIT_DIR = system-gdbinit
88 SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
89 SYSTEM_GDBINIT_FILES = \
90 elinos.py \
91 wrs-linux.py
92
93 FLAGS_TO_PASS = \
94 "prefix=$(prefix)" \
95 "exec_prefix=$(exec_prefix)" \
96 "infodir=$(infodir)" \
97 "datarootdir=$(datarootdir)" \
98 "docdir=$(docdir)" \
99 "htmldir=$(htmldir)" \
100 "pdfdir=$(pdfdir)" \
101 "libdir=$(libdir)" \
102 "mandir=$(mandir)" \
103 "datadir=$(datadir)" \
104 "includedir=$(includedir)" \
105 "against=$(against)" \
106 "DESTDIR=$(DESTDIR)" \
107 "AR=$(AR)" \
108 "AR_FLAGS=$(AR_FLAGS)" \
109 "CC=$(CC)" \
110 "CFLAGS=$(CFLAGS)" \
111 "CXX=$(CXX)" \
112 "CXXFLAGS=$(CXXFLAGS)" \
113 "DLLTOOL=$(DLLTOOL)" \
114 "LDFLAGS=$(LDFLAGS)" \
115 "RANLIB=$(RANLIB)" \
116 "MAKEINFO=$(MAKEINFO)" \
117 "MAKEHTML=$(MAKEHTML)" \
118 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
119 "INSTALL=$(INSTALL)" \
120 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
121 "INSTALL_DATA=$(INSTALL_DATA)" \
122 "RUNTEST=$(RUNTEST)" \
123 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
124
125 .PHONY: all
126 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
127
128 # For portability's sake, we need to handle systems that don't have
129 # symbolic links.
130 stamp-syscalls: Makefile $(SYSCALLS_FILES)
131 rm -rf ./$(SYSCALLS_DIR)
132 mkdir ./$(SYSCALLS_DIR)
133 files='$(SYSCALLS_FILES)' ; \
134 for file in $$files ; do \
135 f=$(SYSCALLS_SRCDIR)/$$file ; \
136 if test -f $$f ; then \
137 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
138 fi ; \
139 done
140 touch $@
141
142 .PHONY: clean-syscalls
143 clean-syscalls:
144 rm -rf $(SYSCALLS_DIR)
145 rm -f stamp-syscalls
146
147 # This target is responsible for properly installing the syscalls'
148 # XML files in the system.
149 .PHONY: install-syscalls
150 install-syscalls:
151 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
152 files='$(SYSCALLS_FILES)' ; \
153 for file in $$files; do \
154 f=$(SYSCALLS_SRCDIR)/$$file ; \
155 if test -f $$f ; then \
156 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
157 fi ; \
158 done
159
160 .PHONY: uninstall-syscalls
161 uninstall-syscalls:
162 files='$(SYSCALLS_FILES)' ; \
163 for file in $$files ; do \
164 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
165 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
166 while test "x$$file" != "x$$slashdir" ; do \
167 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
168 file="$$slashdir" ; \
169 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
170 done \
171 done
172
173 stamp-python: Makefile $(PYTHON_FILES)
174 rm -rf ./$(PYTHON_DIR)
175 files='$(PYTHON_FILES)' ; \
176 for file in $$files ; do \
177 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
178 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
179 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
180 done
181 touch $@
182
183 .PHONY: clean-python
184 clean-python:
185 rm -rf $(PYTHON_DIR)
186 rm -f stamp-python
187
188 .PHONY: install-python
189 install-python:
190 files='$(PYTHON_FILES)' ; \
191 for file in $$files ; do \
192 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
193 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
194 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
195 done
196
197 .PHONY: uninstall-python
198 uninstall-python:
199 files='$(PYTHON_FILES)' ; \
200 for file in $$files ; do \
201 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
202 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
203 while test "x$$file" != "x$$slashdir" ; do \
204 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
205 file="$$slashdir" ; \
206 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
207 done \
208 done
209
210 stamp-guile: Makefile $(GUILE_FILES)
211 rm -rf ./$(GUILE_DIR)
212 files='$(GUILE_FILES)' ; \
213 for file in $$files ; do \
214 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
215 $(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
216 $(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
217 done
218 touch $@
219
220 .PHONY: clean-guile
221 clean-guile:
222 rm -rf $(GUILE_DIR)
223 rm -f stamp-guile
224
225 .PHONY: install-guile
226 install-guile:
227 files='$(GUILE_FILES)' ; \
228 for file in $$files ; do \
229 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
230 $(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
231 $(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
232 done
233
234 .PHONY: uninstall-guile
235 uninstall-guile:
236 files='$(GUILE_FILES)' ; \
237 for file in $$files ; do \
238 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
239 rm -f $(GUILE_INSTALL_DIR)/$$file ; \
240 while test "x$$file" != "x$$slashdir" ; do \
241 rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
242 file="$$slashdir" ; \
243 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
244 done \
245 done
246
247 stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
248 rm -rf ./$(SYSTEM_GDBINIT_DIR)
249 mkdir ./$(SYSTEM_GDBINIT_DIR)
250 files='$(SYSTEM_GDBINIT_FILES)' ; \
251 for file in $$files ; do \
252 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
253 if test -f $$f ; then \
254 $(INSTALL_DATA) $$f ./$(SYSTEM_GDBINIT_DIR) ; \
255 fi ; \
256 done
257 touch $@
258
259 .PHONY: clean-system-gdbinit
260 clean-system-gdbinit:
261 rm -rf $(SYSTEM_GDBINIT_DIR)
262 rm -f stamp-system-gdbinit
263
264 .PHONY: install-system-gdbinit
265 install-system-gdbinit:
266 $(INSTALL_DIR) $(SYSTEM_GDBINIT_INSTALL_DIR)
267 files='$(SYSTEM_GDBINIT_FILES)' ; \
268 for file in $$files; do \
269 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
270 if test -f $$f ; then \
271 $(INSTALL_DATA) $$f $(SYSTEM_GDBINIT_INSTALL_DIR) ; \
272 fi ; \
273 done
274
275 .PHONY: uninstall-system-gdbinit
276 uninstall-system-gdbinit:
277 files='$(SYSTEM_GDBINIT_FILES)' ; \
278 for file in $$files ; do \
279 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
280 rm -f $(SYSTEM_GDBINIT_INSTALL_DIR)/$$file ; \
281 while test "x$$file" != "x$$slashdir" ; do \
282 rmdir 2>/dev/null "$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
283 file="$$slashdir" ; \
284 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
285 done \
286 done
287
288 # Traditionally "install" depends on "all". But it may be useful
289 # not to; for example, if the user has made some trivial change to a
290 # source file and doesn't care about rebuilding or just wants to save the
291 # time it takes for make to check that all is up to date.
292 # install-only is intended to address that need.
293 .PHONY: install
294 install: all
295 @$(MAKE) $(FLAGS_TO_PASS) install-only
296
297 .PHONY: install-only
298 install-only: install-syscalls install-python install-guile \
299 install-system-gdbinit
300
301 .PHONY: uninstall
302 uninstall: uninstall-syscalls uninstall-python uninstall-guile \
303 uninstall-system-gdbinit
304
305 .PHONY: clean
306 clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
307
308 .PHONY: maintainer-clean realclean distclean
309 maintainer-clean realclean distclean: clean
310 rm -f Makefile
311
312 .PHONY: check installcheck info dvi pdf html
313 .PHONY: install-info install-pdf install-html clean-info
314 check installcheck:
315 info dvi pdf html:
316 install-info install-pdf install-html:
317 clean-info:
318
319 # GNU Make has an annoying habit of putting *all* the Makefile variables
320 # into the environment, unless you include this target as a circumvention.
321 # Rumor is that this will be fixed (and this target can be removed)
322 # in GNU Make 4.0.
323 .NOEXPORT:
324
325 # GNU Make 3.63 has a different problem: it keeps tacking command line
326 # overrides onto the definition of $(MAKE). This variable setting
327 # will remove them.
328 MAKEOVERRIDES=
329
330 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
331 cd $(top_builddir) && $(MAKE) data-directory/Makefile