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