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