Remove d-support.c and use gdb_demangle for demangling D symbols.
[deliverable/binutils-gdb.git] / gdb / data-directory / Makefile.in
CommitLineData
ecd75fc8 1# Copyright (C) 2010-2014 Free Software Foundation, Inc.
aa2e2d8d
DE
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
19srcdir = @srcdir@
20SYSCALLS_SRCDIR = $(srcdir)/../syscalls
21PYTHON_SRCDIR = $(srcdir)/../python/lib
ed3ef339 22GUILE_SRCDIR = $(srcdir)/../guile/lib
776af39e 23SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
ed3ef339 24VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
aa2e2d8d
DE
25
26top_srcdir = @top_srcdir@
27top_builddir = @top_builddir@
28
29prefix = @prefix@
30exec_prefix = @exec_prefix@
31
32datarootdir = @datarootdir@
33datadir = @datadir@
34
35SHELL = @SHELL@
36
37LN_S = @LN_S@
38
39INSTALL = @INSTALL@
40INSTALL_DATA = @INSTALL_DATA@
41INSTALL_DIR = $(SHELL) $(srcdir)/../../mkinstalldirs
42
43GDB_DATADIR = @GDB_DATADIR@
44
45SYSCALLS_DIR = syscalls
1bfda48e 46SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
aa2e2d8d
DE
47SYSCALLS_FILES = \
48 gdb-syscalls.dtd \
9f948660 49 arm-linux.xml \
aa2e2d8d
DE
50 ppc-linux.xml ppc64-linux.xml \
51 i386-linux.xml amd64-linux.xml \
385203ed 52 sparc-linux.xml sparc64-linux.xml \
237b092b
AA
53 mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml \
54 s390-linux.xml s390x-linux.xml
aa2e2d8d
DE
55
56PYTHON_DIR = python
1bfda48e 57PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
4df42755 58PYTHON_FILE_LIST = \
0e3509db 59 gdb/__init__.py \
1e611234
PM
60 gdb/frames.py \
61 gdb/FrameIterator.py \
62 gdb/FrameDecorator.py \
7b51bc51
DE
63 gdb/types.py \
64 gdb/printing.py \
fa3a4f15 65 gdb/prompt.py \
883964a7 66 gdb/xmethod.py \
09748966 67 gdb/command/bound_registers.py \
7b51bc51 68 gdb/command/__init__.py \
883964a7 69 gdb/command/xmethods.py \
1e611234 70 gdb/command/frame_filters.py \
18a9fc12 71 gdb/command/type_printers.py \
fa3a4f15 72 gdb/command/pretty_printers.py \
06fc020f 73 gdb/command/prompt.py \
a72c3253
DE
74 gdb/command/explore.py \
75 gdb/function/__init__.py \
faa42425 76 gdb/function/caller_is.py \
a72c3253 77 gdb/function/strfns.py
aa2e2d8d 78
4df42755
DE
79@HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
80@HAVE_PYTHON_FALSE@PYTHON_FILES =
81
ed3ef339
DE
82GUILE_DIR = guile
83GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
e76c5d17
DE
84
85GUILE_SOURCE_FILES = \
ed3ef339
DE
86 ./gdb.scm \
87 gdb/boot.scm \
88 gdb/experimental.scm \
89 gdb/init.scm \
90 gdb/iterator.scm \
91 gdb/printing.scm \
186fcde0 92 gdb/support.scm \
ed3ef339
DE
93 gdb/types.scm
94
e76c5d17
DE
95GUILE_COMPILED_FILES = \
96 ./gdb.go \
97 gdb/experimental.go \
98 gdb/iterator.go \
99 gdb/printing.go \
100 gdb/support.go \
101 gdb/types.go
102
103@HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_SOURCE_FILES) $(GUILE_COMPILED_FILES)
4df42755
DE
104@HAVE_GUILE_FALSE@GUILE_FILES =
105
e76c5d17
DE
106GUILD = @GUILD@
107GUILD_TARGET_FLAG = @GUILD_TARGET_FLAG@
108
109# Flags passed to 'guild compile'.
110# Note: We can't use -Wunbound-variable because all the variables
111# defined in C aren't visible when we compile.
112# Note: To work around a guile 2.0.5 issue (it can't find gdb/init.scm even if
113# we pass -L <dir>) we have to compile in the directory containing gdb.scm.
114# We still need to pass "-L ." so that other modules are found.
115GUILD_COMPILE_FLAGS = \
116 $(GUILD_TARGET_FLAG) \
117 -Warity-mismatch -Wformat -Wunused-toplevel \
118 -L .
119
776af39e
JB
120SYSTEM_GDBINIT_DIR = system-gdbinit
121SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
122SYSTEM_GDBINIT_FILES = \
123 elinos.py \
124 wrs-linux.py
125
f474844c
JZ
126FLAGS_TO_PASS = \
127 "prefix=$(prefix)" \
128 "exec_prefix=$(exec_prefix)" \
129 "infodir=$(infodir)" \
130 "datarootdir=$(datarootdir)" \
131 "docdir=$(docdir)" \
132 "htmldir=$(htmldir)" \
133 "pdfdir=$(pdfdir)" \
134 "libdir=$(libdir)" \
135 "mandir=$(mandir)" \
136 "datadir=$(datadir)" \
137 "includedir=$(includedir)" \
138 "against=$(against)" \
139 "DESTDIR=$(DESTDIR)" \
140 "AR=$(AR)" \
141 "AR_FLAGS=$(AR_FLAGS)" \
142 "CC=$(CC)" \
143 "CFLAGS=$(CFLAGS)" \
144 "CXX=$(CXX)" \
145 "CXXFLAGS=$(CXXFLAGS)" \
146 "DLLTOOL=$(DLLTOOL)" \
147 "LDFLAGS=$(LDFLAGS)" \
148 "RANLIB=$(RANLIB)" \
149 "MAKEINFO=$(MAKEINFO)" \
150 "MAKEHTML=$(MAKEHTML)" \
151 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
152 "INSTALL=$(INSTALL)" \
153 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
154 "INSTALL_DATA=$(INSTALL_DATA)" \
155 "RUNTEST=$(RUNTEST)" \
156 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
157
aa2e2d8d 158.PHONY: all
ed3ef339 159all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
aa2e2d8d
DE
160
161# For portability's sake, we need to handle systems that don't have
162# symbolic links.
163stamp-syscalls: Makefile $(SYSCALLS_FILES)
164 rm -rf ./$(SYSCALLS_DIR)
165 mkdir ./$(SYSCALLS_DIR)
166 files='$(SYSCALLS_FILES)' ; \
167 for file in $$files ; do \
168 f=$(SYSCALLS_SRCDIR)/$$file ; \
169 if test -f $$f ; then \
170 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
171 fi ; \
172 done
173 touch $@
174
175.PHONY: clean-syscalls
176clean-syscalls:
177 rm -rf $(SYSCALLS_DIR)
178 rm -f stamp-syscalls
179
180# This target is responsible for properly installing the syscalls'
181# XML files in the system.
182.PHONY: install-syscalls
183install-syscalls:
184 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
185 files='$(SYSCALLS_FILES)' ; \
186 for file in $$files; do \
187 f=$(SYSCALLS_SRCDIR)/$$file ; \
188 if test -f $$f ; then \
189 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
190 fi ; \
191 done
192
193.PHONY: uninstall-syscalls
194uninstall-syscalls:
195 files='$(SYSCALLS_FILES)' ; \
196 for file in $$files ; do \
197 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
198 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
199 while test "x$$file" != "x$$slashdir" ; do \
200 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
201 file="$$slashdir" ; \
202 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
203 done \
204 done
205
206stamp-python: Makefile $(PYTHON_FILES)
207 rm -rf ./$(PYTHON_DIR)
208 files='$(PYTHON_FILES)' ; \
4df42755
DE
209 if test "x$$files" != x ; then \
210 for file in $$files ; do \
211 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
212 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
213 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
214 done ; \
215 fi
aa2e2d8d
DE
216 touch $@
217
218.PHONY: clean-python
219clean-python:
220 rm -rf $(PYTHON_DIR)
221 rm -f stamp-python
222
223.PHONY: install-python
224install-python:
225 files='$(PYTHON_FILES)' ; \
4df42755
DE
226 if test "x$$files" != x ; then \
227 for file in $$files ; do \
228 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
229 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
230 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
231 done ; \
232 fi
aa2e2d8d
DE
233
234.PHONY: uninstall-python
235uninstall-python:
236 files='$(PYTHON_FILES)' ; \
4df42755
DE
237 if test "x$$files" != x ; then \
238 for file in $$files ; do \
239 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
240 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
241 while test "x$$file" != "x$$slashdir" ; do \
242 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
243 file="$$slashdir" ; \
244 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
245 done \
246 done ; \
247 fi
aa2e2d8d 248
e76c5d17 249stamp-guile: Makefile $(GUILE_SOURCE_FILES)
ed3ef339 250 rm -rf ./$(GUILE_DIR)
e76c5d17
DE
251 if test "x$(GUILE_FILES)" != x ; then \
252 files='$(GUILE_SOURCE_FILES)' ; \
4df42755
DE
253 for file in $$files ; do \
254 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
255 $(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
256 $(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
257 done ; \
e76c5d17
DE
258 files='$(GUILE_COMPILED_FILES)' ; \
259 cd ./$(GUILE_DIR) ; \
260 for go in $$files ; do \
261 source="`echo $$go | sed 's/\.go$$/.scm/'`" ; \
262 echo $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" ; \
263 $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" || exit 1 ; \
264 done ; \
4df42755 265 fi
ed3ef339
DE
266 touch $@
267
268.PHONY: clean-guile
269clean-guile:
270 rm -rf $(GUILE_DIR)
271 rm -f stamp-guile
272
273.PHONY: install-guile
274install-guile:
275 files='$(GUILE_FILES)' ; \
4df42755
DE
276 if test "x$$files" != x ; then \
277 for file in $$files ; do \
278 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
279 $(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
280 $(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
281 done ; \
282 fi
ed3ef339
DE
283
284.PHONY: uninstall-guile
285uninstall-guile:
286 files='$(GUILE_FILES)' ; \
4df42755
DE
287 if test "x$$files" != x ; then \
288 for file in $$files ; do \
289 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
290 rm -f $(GUILE_INSTALL_DIR)/$$file ; \
291 while test "x$$file" != "x$$slashdir" ; do \
292 rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
293 file="$$slashdir" ; \
294 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
295 done \
296 done ; \
297 fi
ed3ef339 298
776af39e
JB
299stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
300 rm -rf ./$(SYSTEM_GDBINIT_DIR)
301 mkdir ./$(SYSTEM_GDBINIT_DIR)
302 files='$(SYSTEM_GDBINIT_FILES)' ; \
303 for file in $$files ; do \
304 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
305 if test -f $$f ; then \
306 $(INSTALL_DATA) $$f ./$(SYSTEM_GDBINIT_DIR) ; \
307 fi ; \
308 done
309 touch $@
310
311.PHONY: clean-system-gdbinit
312clean-system-gdbinit:
313 rm -rf $(SYSTEM_GDBINIT_DIR)
314 rm -f stamp-system-gdbinit
315
316.PHONY: install-system-gdbinit
317install-system-gdbinit:
318 $(INSTALL_DIR) $(SYSTEM_GDBINIT_INSTALL_DIR)
319 files='$(SYSTEM_GDBINIT_FILES)' ; \
320 for file in $$files; do \
321 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
322 if test -f $$f ; then \
323 $(INSTALL_DATA) $$f $(SYSTEM_GDBINIT_INSTALL_DIR) ; \
324 fi ; \
325 done
326
327.PHONY: uninstall-system-gdbinit
328uninstall-system-gdbinit:
329 files='$(SYSTEM_GDBINIT_FILES)' ; \
330 for file in $$files ; do \
331 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
332 rm -f $(SYSTEM_GDBINIT_INSTALL_DIR)/$$file ; \
333 while test "x$$file" != "x$$slashdir" ; do \
334 rmdir 2>/dev/null "$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
335 file="$$slashdir" ; \
336 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
337 done \
338 done
339
aa2e2d8d
DE
340# Traditionally "install" depends on "all". But it may be useful
341# not to; for example, if the user has made some trivial change to a
342# source file and doesn't care about rebuilding or just wants to save the
343# time it takes for make to check that all is up to date.
344# install-only is intended to address that need.
345.PHONY: install
346install: all
f474844c 347 @$(MAKE) $(FLAGS_TO_PASS) install-only
aa2e2d8d
DE
348
349.PHONY: install-only
ed3ef339
DE
350install-only: install-syscalls install-python install-guile \
351 install-system-gdbinit
aa2e2d8d
DE
352
353.PHONY: uninstall
ed3ef339
DE
354uninstall: uninstall-syscalls uninstall-python uninstall-guile \
355 uninstall-system-gdbinit
aa2e2d8d
DE
356
357.PHONY: clean
ed3ef339 358clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
aa2e2d8d
DE
359
360.PHONY: maintainer-clean realclean distclean
361maintainer-clean realclean distclean: clean
362 rm -f Makefile
363
364.PHONY: check installcheck info dvi pdf html
365.PHONY: install-info install-pdf install-html clean-info
366check installcheck:
367info dvi pdf html:
368install-info install-pdf install-html:
369clean-info:
370
371# GNU Make has an annoying habit of putting *all* the Makefile variables
372# into the environment, unless you include this target as a circumvention.
373# Rumor is that this will be fixed (and this target can be removed)
374# in GNU Make 4.0.
375.NOEXPORT:
376
377# GNU Make 3.63 has a different problem: it keeps tacking command line
378# overrides onto the definition of $(MAKE). This variable setting
379# will remove them.
380MAKEOVERRIDES=
381
543ecec7 382Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
aa2e2d8d 383 cd $(top_builddir) && $(MAKE) data-directory/Makefile
This page took 0.303319 seconds and 4 git commands to generate.