Add support for catching system calls to native FreeBSD targets.
[deliverable/binutils-gdb.git] / gdb / data-directory / Makefile.in
1 # Copyright (C) 2010-2016 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 aarch64-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 freebsd.xml
56
57 PYTHON_DIR = python
58 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
59 PYTHON_FILE_LIST = \
60 gdb/__init__.py \
61 gdb/frames.py \
62 gdb/FrameIterator.py \
63 gdb/FrameDecorator.py \
64 gdb/types.py \
65 gdb/printing.py \
66 gdb/unwinder.py \
67 gdb/prompt.py \
68 gdb/xmethod.py \
69 gdb/command/__init__.py \
70 gdb/command/xmethods.py \
71 gdb/command/frame_filters.py \
72 gdb/command/unwinders.py \
73 gdb/command/type_printers.py \
74 gdb/command/pretty_printers.py \
75 gdb/command/prompt.py \
76 gdb/command/explore.py \
77 gdb/function/__init__.py \
78 gdb/function/as_string.py \
79 gdb/function/caller_is.py \
80 gdb/function/strfns.py \
81 gdb/printer/__init__.py \
82 gdb/printer/bound_registers.py
83
84 @HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
85 @HAVE_PYTHON_FALSE@PYTHON_FILES =
86
87 GUILE_DIR = guile
88 GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
89
90 GUILE_SOURCE_FILES = \
91 ./gdb.scm \
92 gdb/boot.scm \
93 gdb/experimental.scm \
94 gdb/init.scm \
95 gdb/iterator.scm \
96 gdb/printing.scm \
97 gdb/support.scm \
98 gdb/types.scm
99
100 GUILE_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)
109 @HAVE_GUILE_FALSE@GUILE_FILES =
110
111 GUILD = @GUILD@
112 GUILD_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.
120 GUILD_COMPILE_FLAGS = \
121 $(GUILD_TARGET_FLAG) \
122 -Warity-mismatch -Wformat -Wunused-toplevel \
123 -L .
124
125 SYSTEM_GDBINIT_DIR = system-gdbinit
126 SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
127 SYSTEM_GDBINIT_FILES = \
128 elinos.py \
129 wrs-linux.py
130
131 FLAGS_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
163 .PHONY: all
164 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
165
166 # For portability's sake, we need to handle systems that don't have
167 # symbolic links.
168 stamp-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
181 clean-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
188 install-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
199 uninstall-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
211 stamp-python: Makefile $(PYTHON_FILES)
212 rm -rf ./$(PYTHON_DIR)
213 files='$(PYTHON_FILES)' ; \
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
221 touch $@
222
223 .PHONY: clean-python
224 clean-python:
225 rm -rf $(PYTHON_DIR)
226 rm -f stamp-python
227
228 .PHONY: install-python
229 install-python:
230 files='$(PYTHON_FILES)' ; \
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
238
239 .PHONY: uninstall-python
240 uninstall-python:
241 files='$(PYTHON_FILES)' ; \
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
253
254 stamp-guile: Makefile $(GUILE_SOURCE_FILES)
255 rm -rf ./$(GUILE_DIR)
256 if test "x$(GUILE_FILES)" != x ; then \
257 files='$(GUILE_SOURCE_FILES)' ; \
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 ; \
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 ; \
270 fi
271 touch $@
272
273 .PHONY: clean-guile
274 clean-guile:
275 rm -rf $(GUILE_DIR)
276 rm -f stamp-guile
277
278 .PHONY: install-guile
279 install-guile:
280 files='$(GUILE_FILES)' ; \
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
288
289 .PHONY: uninstall-guile
290 uninstall-guile:
291 files='$(GUILE_FILES)' ; \
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
303
304 stamp-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
317 clean-system-gdbinit:
318 rm -rf $(SYSTEM_GDBINIT_DIR)
319 rm -f stamp-system-gdbinit
320
321 .PHONY: install-system-gdbinit
322 install-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
333 uninstall-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
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
351 install: all
352 @$(MAKE) $(FLAGS_TO_PASS) install-only
353
354 .PHONY: install-only
355 install-only: install-syscalls install-python install-guile \
356 install-system-gdbinit
357
358 .PHONY: uninstall
359 uninstall: uninstall-syscalls uninstall-python uninstall-guile \
360 uninstall-system-gdbinit
361
362 .PHONY: clean
363 clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
364
365 .PHONY: maintainer-clean realclean distclean
366 maintainer-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
371 check installcheck:
372 info dvi pdf html:
373 install-info install-pdf install-html:
374 clean-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.
385 MAKEOVERRIDES=
386
387 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
388 cd $(top_builddir) && $(MAKE) data-directory/Makefile
This page took 0.040368 seconds and 5 git commands to generate.