]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/data-directory/Makefile.in
9e34d4cffd3c96804e7e1a18d35ae1580f143f0b
[thirdparty/binutils-gdb.git] / gdb / data-directory / Makefile.in
1 # Copyright (C) 2010-2023 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 # Please keep lists in this file sorted alphabetically, with one item per line.
20 # See gdb/Makefile.in for guidelines on ordering files and directories.
21
22 srcdir = @srcdir@
23 SYSCALLS_SRCDIR = $(srcdir)/../syscalls
24 PYTHON_SRCDIR = $(srcdir)/../python/lib
25 GUILE_SRCDIR = $(srcdir)/../guile/lib
26 SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
27 VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
28 XSLTPROC = @XSLTPROC@
29
30 top_srcdir = @top_srcdir@
31 top_builddir = @top_builddir@
32
33 prefix = @prefix@
34 exec_prefix = @exec_prefix@
35
36 datarootdir = @datarootdir@
37 datadir = @datadir@
38
39 SHELL = @SHELL@
40
41 LN_S = @LN_S@
42
43 INSTALL = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45 INSTALL_DIR = $(SHELL) $(srcdir)/../../mkinstalldirs
46
47 GDB_DATADIR = @GDB_DATADIR@
48
49 SYSCALLS_DIR = syscalls
50 SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
51 GEN_SYSCALLS_FILES = \
52 aarch64-linux.xml \
53 amd64-linux.xml \
54 arm-linux.xml \
55 i386-linux.xml \
56 mips-n32-linux.xml \
57 mips-n64-linux.xml \
58 mips-o32-linux.xml \
59 ppc-linux.xml \
60 ppc64-linux.xml \
61 s390-linux.xml \
62 s390x-linux.xml \
63 sparc-linux.xml \
64 sparc64-linux.xml
65
66 SYSCALLS_FILES = gdb-syscalls.dtd freebsd.xml netbsd.xml $(GEN_SYSCALLS_FILES)
67
68 PYTHON_DIR = python
69 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
70 PYTHON_FILE_LIST = \
71 gdb/__init__.py \
72 gdb/disassembler.py \
73 gdb/FrameDecorator.py \
74 gdb/FrameIterator.py \
75 gdb/frames.py \
76 gdb/printing.py \
77 gdb/prompt.py \
78 gdb/styling.py \
79 gdb/types.py \
80 gdb/unwinder.py \
81 gdb/xmethod.py \
82 gdb/command/__init__.py \
83 gdb/command/explore.py \
84 gdb/command/frame_filters.py \
85 gdb/command/pretty_printers.py \
86 gdb/command/prompt.py \
87 gdb/command/type_printers.py \
88 gdb/command/unwinders.py \
89 gdb/command/xmethods.py \
90 gdb/dap/breakpoint.py \
91 gdb/dap/bt.py \
92 gdb/dap/disassemble.py \
93 gdb/dap/evaluate.py \
94 gdb/dap/events.py \
95 gdb/dap/frames.py \
96 gdb/dap/__init__.py \
97 gdb/dap/io.py \
98 gdb/dap/launch.py \
99 gdb/dap/memory.py \
100 gdb/dap/next.py \
101 gdb/dap/pause.py \
102 gdb/dap/scopes.py \
103 gdb/dap/server.py \
104 gdb/dap/sources.py \
105 gdb/dap/startup.py \
106 gdb/dap/state.py \
107 gdb/dap/threads.py \
108 gdb/dap/typecheck.py \
109 gdb/dap/varref.py \
110 gdb/function/__init__.py \
111 gdb/function/as_string.py \
112 gdb/function/caller_is.py \
113 gdb/function/strfns.py \
114 gdb/printer/__init__.py \
115 gdb/printer/bound_registers.py
116
117 @HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
118 @HAVE_PYTHON_FALSE@PYTHON_FILES =
119
120 GUILE_DIR = guile
121 GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
122
123 GUILE_SOURCE_FILES = \
124 ./gdb.scm \
125 gdb/boot.scm \
126 gdb/experimental.scm \
127 gdb/init.scm \
128 gdb/iterator.scm \
129 gdb/printing.scm \
130 gdb/support.scm \
131 gdb/types.scm
132
133 GUILE_COMPILED_FILES = \
134 ./gdb.go \
135 gdb/experimental.go \
136 gdb/iterator.go \
137 gdb/printing.go \
138 gdb/support.go \
139 gdb/types.go
140
141 @HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_SOURCE_FILES) $(GUILE_COMPILED_FILES)
142 @HAVE_GUILE_FALSE@GUILE_FILES =
143
144 GUILD = @GUILD@
145 GUILD_TARGET_FLAG = @GUILD_TARGET_FLAG@
146
147 # Flags passed to 'guild compile'.
148 # Note: We can't use -Wunbound-variable because all the variables
149 # defined in C aren't visible when we compile.
150 # Note: To work around a guile 2.0.5 issue (it can't find gdb/init.scm even if
151 # we pass -L <dir>) we have to compile in the directory containing gdb.scm.
152 # We still need to pass "-L ." so that other modules are found.
153 GUILD_COMPILE_FLAGS = \
154 $(GUILD_TARGET_FLAG) \
155 -Warity-mismatch -Wformat -Wunused-toplevel \
156 -L .
157
158 SYSTEM_GDBINIT_DIR = system-gdbinit
159 SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
160 SYSTEM_GDBINIT_FILES = \
161 elinos.py \
162 wrs-linux.py
163
164 FLAGS_TO_PASS = \
165 "prefix=$(prefix)" \
166 "exec_prefix=$(exec_prefix)" \
167 "infodir=$(infodir)" \
168 "datarootdir=$(datarootdir)" \
169 "docdir=$(docdir)" \
170 "htmldir=$(htmldir)" \
171 "pdfdir=$(pdfdir)" \
172 "libdir=$(libdir)" \
173 "mandir=$(mandir)" \
174 "datadir=$(datadir)" \
175 "includedir=$(includedir)" \
176 "against=$(against)" \
177 "DESTDIR=$(DESTDIR)" \
178 "AR=$(AR)" \
179 "AR_FLAGS=$(AR_FLAGS)" \
180 "CC=$(CC)" \
181 "CFLAGS=$(CFLAGS)" \
182 "CXX=$(CXX)" \
183 "CXXFLAGS=$(CXXFLAGS)" \
184 "DLLTOOL=$(DLLTOOL)" \
185 "LDFLAGS=$(LDFLAGS)" \
186 "RANLIB=$(RANLIB)" \
187 "MAKEINFO=$(MAKEINFO)" \
188 "MAKEHTML=$(MAKEHTML)" \
189 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
190 "INSTALL=$(INSTALL)" \
191 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
192 "INSTALL_DATA=$(INSTALL_DATA)" \
193 "RUNTEST=$(RUNTEST)" \
194 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
195
196 .PHONY: all
197 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
198
199 %.xml: @MAINTAINER_MODE_TRUE@ %.xml.in apply-defaults.xsl linux-defaults.xml.in
200 $(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl\
201 $(SYSCALLS_SRCDIR)/$@.in
202
203 .PHONY: syscall-xml
204 syscall-xml: $(GEN_SYSCALLS_FILES)
205
206 .PHONY: clean-syscall-xml
207 # Only clean files generated XML files.
208 clean-syscall-xml:
209 files='$(GEN_SYSCALLS_FILES)' ; \
210 for file in $$files; do \
211 rm -f "$(SYSCALLS_SRCDIR)/$$file"; \
212 done
213
214 # For portability's sake, we need to handle systems that don't have
215 # symbolic links.
216 stamp-syscalls: Makefile $(SYSCALLS_FILES)
217 rm -rf ./$(SYSCALLS_DIR)
218 mkdir ./$(SYSCALLS_DIR)
219 files='$(SYSCALLS_FILES)' ; \
220 for file in $$files ; do \
221 f=$(SYSCALLS_SRCDIR)/$$file ; \
222 if test -f $$f ; then \
223 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
224 fi ; \
225 done
226 touch $@
227
228 .PHONY: clean-syscalls
229 clean-syscalls:
230 rm -rf $(SYSCALLS_DIR)
231 rm -f stamp-syscalls
232
233 # This target is responsible for properly installing the syscalls'
234 # XML files in the system.
235 .PHONY: install-syscalls
236 install-syscalls:
237 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
238 files='$(SYSCALLS_FILES)' ; \
239 for file in $$files; do \
240 f=$(SYSCALLS_SRCDIR)/$$file ; \
241 if test -f $$f ; then \
242 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
243 fi ; \
244 done
245
246 .PHONY: uninstall-syscalls
247 uninstall-syscalls:
248 files='$(SYSCALLS_FILES)' ; \
249 for file in $$files ; do \
250 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
251 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
252 while test "x$$file" != "x$$slashdir" ; do \
253 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
254 file="$$slashdir" ; \
255 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
256 done \
257 done
258
259 stamp-python: Makefile $(PYTHON_FILES)
260 rm -rf ./$(PYTHON_DIR)
261 files='$(PYTHON_FILES)' ; \
262 if test "x$$files" != x ; then \
263 for file in $$files ; do \
264 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
265 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
266 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
267 done ; \
268 fi
269 touch $@
270
271 .PHONY: clean-python
272 clean-python:
273 rm -rf $(PYTHON_DIR)
274 rm -f stamp-python
275
276 .PHONY: install-python
277 install-python:
278 files='$(PYTHON_FILES)' ; \
279 if test "x$$files" != x ; then \
280 for file in $$files ; do \
281 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
282 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
283 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
284 done ; \
285 fi
286
287 .PHONY: uninstall-python
288 uninstall-python:
289 files='$(PYTHON_FILES)' ; \
290 if test "x$$files" != x ; then \
291 for file in $$files ; do \
292 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
293 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
294 while test "x$$file" != "x$$slashdir" ; do \
295 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
296 file="$$slashdir" ; \
297 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
298 done \
299 done ; \
300 fi
301
302 stamp-guile: Makefile $(GUILE_SOURCE_FILES)
303 rm -rf ./$(GUILE_DIR)
304 if test "x$(GUILE_FILES)" != x ; then \
305 files='$(GUILE_SOURCE_FILES)' ; \
306 for file in $$files ; do \
307 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
308 $(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
309 $(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
310 done ; \
311 files='$(GUILE_COMPILED_FILES)' ; \
312 cd ./$(GUILE_DIR) ; \
313 for go in $$files ; do \
314 source="`echo $$go | sed 's/\.go$$/.scm/'`" ; \
315 echo $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" ; \
316 $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" || exit 1 ; \
317 done ; \
318 fi
319 touch $@
320
321 .PHONY: clean-guile
322 clean-guile:
323 rm -rf $(GUILE_DIR)
324 rm -f stamp-guile
325
326 .PHONY: install-guile
327 install-guile:
328 files='$(GUILE_FILES)' ; \
329 if test "x$$files" != x ; then \
330 for file in $$files ; do \
331 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
332 $(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
333 $(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
334 done ; \
335 fi
336
337 .PHONY: uninstall-guile
338 uninstall-guile:
339 files='$(GUILE_FILES)' ; \
340 if test "x$$files" != x ; then \
341 for file in $$files ; do \
342 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
343 rm -f $(GUILE_INSTALL_DIR)/$$file ; \
344 while test "x$$file" != "x$$slashdir" ; do \
345 rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
346 file="$$slashdir" ; \
347 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
348 done \
349 done ; \
350 fi
351
352 stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
353 rm -rf ./$(SYSTEM_GDBINIT_DIR)
354 mkdir ./$(SYSTEM_GDBINIT_DIR)
355 files='$(SYSTEM_GDBINIT_FILES)' ; \
356 for file in $$files ; do \
357 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
358 if test -f $$f ; then \
359 $(INSTALL_DATA) $$f ./$(SYSTEM_GDBINIT_DIR) ; \
360 fi ; \
361 done
362 touch $@
363
364 .PHONY: clean-system-gdbinit
365 clean-system-gdbinit:
366 rm -rf $(SYSTEM_GDBINIT_DIR)
367 rm -f stamp-system-gdbinit
368
369 .PHONY: install-system-gdbinit
370 install-system-gdbinit:
371 $(INSTALL_DIR) $(SYSTEM_GDBINIT_INSTALL_DIR)
372 files='$(SYSTEM_GDBINIT_FILES)' ; \
373 for file in $$files; do \
374 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
375 if test -f $$f ; then \
376 $(INSTALL_DATA) $$f $(SYSTEM_GDBINIT_INSTALL_DIR) ; \
377 fi ; \
378 done
379
380 .PHONY: uninstall-system-gdbinit
381 uninstall-system-gdbinit:
382 files='$(SYSTEM_GDBINIT_FILES)' ; \
383 for file in $$files ; do \
384 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
385 rm -f $(SYSTEM_GDBINIT_INSTALL_DIR)/$$file ; \
386 while test "x$$file" != "x$$slashdir" ; do \
387 rmdir 2>/dev/null "$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
388 file="$$slashdir" ; \
389 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
390 done \
391 done
392
393 # Traditionally "install" depends on "all". But it may be useful
394 # not to; for example, if the user has made some trivial change to a
395 # source file and doesn't care about rebuilding or just wants to save the
396 # time it takes for make to check that all is up to date.
397 # install-only is intended to address that need.
398 .PHONY: install
399 install: all
400 @$(MAKE) $(FLAGS_TO_PASS) install-only
401
402 .PHONY: install-only
403 install-only: install-syscalls install-python install-guile \
404 install-system-gdbinit
405
406 .PHONY: uninstall
407 uninstall: uninstall-syscalls uninstall-python uninstall-guile \
408 uninstall-system-gdbinit
409
410 .PHONY: clean
411 clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
412
413 .PHONY: maintainer-clean realclean distclean
414 maintainer-clean realclean distclean: clean
415 rm -f Makefile
416
417 .PHONY: check installcheck info dvi pdf html
418 .PHONY: install-info install-pdf install-html clean-info
419 check installcheck:
420 info dvi pdf html:
421 install-info install-pdf install-html:
422 clean-info:
423
424 # GNU Make has an annoying habit of putting *all* the Makefile variables
425 # into the environment, unless you include this target as a circumvention.
426 # Rumor is that this will be fixed (and this target can be removed)
427 # in GNU Make 4.0.
428 .NOEXPORT:
429
430 # GNU Make 3.63 has a different problem: it keeps tacking command line
431 # overrides onto the definition of $(MAKE). This variable setting
432 # will remove them.
433 MAKEOVERRIDES=
434
435 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
436 cd .. && $(SHELL) ./config.status data-directory/Makefile
437
438 # Disable implicit make rules.
439 include $(srcdir)/../disable-implicit-rules.mk