]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/data-directory/Makefile.in
PR build/17105.
[thirdparty/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 \
76 gdb/function/strfns.py
aa2e2d8d 77
4df42755
DE
78@HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
79@HAVE_PYTHON_FALSE@PYTHON_FILES =
80
ed3ef339
DE
81GUILE_DIR = guile
82GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
4df42755 83GUILE_FILE_LIST = \
ed3ef339
DE
84 ./gdb.scm \
85 gdb/boot.scm \
86 gdb/experimental.scm \
87 gdb/init.scm \
88 gdb/iterator.scm \
89 gdb/printing.scm \
90 gdb/types.scm
91
4df42755
DE
92@HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_FILE_LIST)
93@HAVE_GUILE_FALSE@GUILE_FILES =
94
776af39e
JB
95SYSTEM_GDBINIT_DIR = system-gdbinit
96SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
97SYSTEM_GDBINIT_FILES = \
98 elinos.py \
99 wrs-linux.py
100
f474844c
JZ
101FLAGS_TO_PASS = \
102 "prefix=$(prefix)" \
103 "exec_prefix=$(exec_prefix)" \
104 "infodir=$(infodir)" \
105 "datarootdir=$(datarootdir)" \
106 "docdir=$(docdir)" \
107 "htmldir=$(htmldir)" \
108 "pdfdir=$(pdfdir)" \
109 "libdir=$(libdir)" \
110 "mandir=$(mandir)" \
111 "datadir=$(datadir)" \
112 "includedir=$(includedir)" \
113 "against=$(against)" \
114 "DESTDIR=$(DESTDIR)" \
115 "AR=$(AR)" \
116 "AR_FLAGS=$(AR_FLAGS)" \
117 "CC=$(CC)" \
118 "CFLAGS=$(CFLAGS)" \
119 "CXX=$(CXX)" \
120 "CXXFLAGS=$(CXXFLAGS)" \
121 "DLLTOOL=$(DLLTOOL)" \
122 "LDFLAGS=$(LDFLAGS)" \
123 "RANLIB=$(RANLIB)" \
124 "MAKEINFO=$(MAKEINFO)" \
125 "MAKEHTML=$(MAKEHTML)" \
126 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
127 "INSTALL=$(INSTALL)" \
128 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
129 "INSTALL_DATA=$(INSTALL_DATA)" \
130 "RUNTEST=$(RUNTEST)" \
131 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
132
aa2e2d8d 133.PHONY: all
ed3ef339 134all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
aa2e2d8d
DE
135
136# For portability's sake, we need to handle systems that don't have
137# symbolic links.
138stamp-syscalls: Makefile $(SYSCALLS_FILES)
139 rm -rf ./$(SYSCALLS_DIR)
140 mkdir ./$(SYSCALLS_DIR)
141 files='$(SYSCALLS_FILES)' ; \
142 for file in $$files ; do \
143 f=$(SYSCALLS_SRCDIR)/$$file ; \
144 if test -f $$f ; then \
145 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
146 fi ; \
147 done
148 touch $@
149
150.PHONY: clean-syscalls
151clean-syscalls:
152 rm -rf $(SYSCALLS_DIR)
153 rm -f stamp-syscalls
154
155# This target is responsible for properly installing the syscalls'
156# XML files in the system.
157.PHONY: install-syscalls
158install-syscalls:
159 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
160 files='$(SYSCALLS_FILES)' ; \
161 for file in $$files; do \
162 f=$(SYSCALLS_SRCDIR)/$$file ; \
163 if test -f $$f ; then \
164 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
165 fi ; \
166 done
167
168.PHONY: uninstall-syscalls
169uninstall-syscalls:
170 files='$(SYSCALLS_FILES)' ; \
171 for file in $$files ; do \
172 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
173 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
174 while test "x$$file" != "x$$slashdir" ; do \
175 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
176 file="$$slashdir" ; \
177 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
178 done \
179 done
180
181stamp-python: Makefile $(PYTHON_FILES)
182 rm -rf ./$(PYTHON_DIR)
183 files='$(PYTHON_FILES)' ; \
4df42755
DE
184 if test "x$$files" != x ; then \
185 for file in $$files ; do \
186 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
187 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
188 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
189 done ; \
190 fi
aa2e2d8d
DE
191 touch $@
192
193.PHONY: clean-python
194clean-python:
195 rm -rf $(PYTHON_DIR)
196 rm -f stamp-python
197
198.PHONY: install-python
199install-python:
200 files='$(PYTHON_FILES)' ; \
4df42755
DE
201 if test "x$$files" != x ; then \
202 for file in $$files ; do \
203 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
204 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
205 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
206 done ; \
207 fi
aa2e2d8d
DE
208
209.PHONY: uninstall-python
210uninstall-python:
211 files='$(PYTHON_FILES)' ; \
4df42755
DE
212 if test "x$$files" != x ; then \
213 for file in $$files ; do \
214 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
215 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
216 while test "x$$file" != "x$$slashdir" ; do \
217 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
218 file="$$slashdir" ; \
219 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
220 done \
221 done ; \
222 fi
aa2e2d8d 223
ed3ef339
DE
224stamp-guile: Makefile $(GUILE_FILES)
225 rm -rf ./$(GUILE_DIR)
226 files='$(GUILE_FILES)' ; \
4df42755
DE
227 if test "x$$files" != x ; then \
228 for file in $$files ; do \
229 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
230 $(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
231 $(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
232 done ; \
233 fi
ed3ef339
DE
234 touch $@
235
236.PHONY: clean-guile
237clean-guile:
238 rm -rf $(GUILE_DIR)
239 rm -f stamp-guile
240
241.PHONY: install-guile
242install-guile:
243 files='$(GUILE_FILES)' ; \
4df42755
DE
244 if test "x$$files" != x ; then \
245 for file in $$files ; do \
246 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
247 $(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
248 $(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
249 done ; \
250 fi
ed3ef339
DE
251
252.PHONY: uninstall-guile
253uninstall-guile:
254 files='$(GUILE_FILES)' ; \
4df42755
DE
255 if test "x$$files" != x ; then \
256 for file in $$files ; do \
257 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
258 rm -f $(GUILE_INSTALL_DIR)/$$file ; \
259 while test "x$$file" != "x$$slashdir" ; do \
260 rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
261 file="$$slashdir" ; \
262 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
263 done \
264 done ; \
265 fi
ed3ef339 266
776af39e
JB
267stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
268 rm -rf ./$(SYSTEM_GDBINIT_DIR)
269 mkdir ./$(SYSTEM_GDBINIT_DIR)
270 files='$(SYSTEM_GDBINIT_FILES)' ; \
271 for file in $$files ; do \
272 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
273 if test -f $$f ; then \
274 $(INSTALL_DATA) $$f ./$(SYSTEM_GDBINIT_DIR) ; \
275 fi ; \
276 done
277 touch $@
278
279.PHONY: clean-system-gdbinit
280clean-system-gdbinit:
281 rm -rf $(SYSTEM_GDBINIT_DIR)
282 rm -f stamp-system-gdbinit
283
284.PHONY: install-system-gdbinit
285install-system-gdbinit:
286 $(INSTALL_DIR) $(SYSTEM_GDBINIT_INSTALL_DIR)
287 files='$(SYSTEM_GDBINIT_FILES)' ; \
288 for file in $$files; do \
289 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
290 if test -f $$f ; then \
291 $(INSTALL_DATA) $$f $(SYSTEM_GDBINIT_INSTALL_DIR) ; \
292 fi ; \
293 done
294
295.PHONY: uninstall-system-gdbinit
296uninstall-system-gdbinit:
297 files='$(SYSTEM_GDBINIT_FILES)' ; \
298 for file in $$files ; do \
299 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
300 rm -f $(SYSTEM_GDBINIT_INSTALL_DIR)/$$file ; \
301 while test "x$$file" != "x$$slashdir" ; do \
302 rmdir 2>/dev/null "$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
303 file="$$slashdir" ; \
304 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
305 done \
306 done
307
aa2e2d8d
DE
308# Traditionally "install" depends on "all". But it may be useful
309# not to; for example, if the user has made some trivial change to a
310# source file and doesn't care about rebuilding or just wants to save the
311# time it takes for make to check that all is up to date.
312# install-only is intended to address that need.
313.PHONY: install
314install: all
f474844c 315 @$(MAKE) $(FLAGS_TO_PASS) install-only
aa2e2d8d
DE
316
317.PHONY: install-only
ed3ef339
DE
318install-only: install-syscalls install-python install-guile \
319 install-system-gdbinit
aa2e2d8d
DE
320
321.PHONY: uninstall
ed3ef339
DE
322uninstall: uninstall-syscalls uninstall-python uninstall-guile \
323 uninstall-system-gdbinit
aa2e2d8d
DE
324
325.PHONY: clean
ed3ef339 326clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
aa2e2d8d
DE
327
328.PHONY: maintainer-clean realclean distclean
329maintainer-clean realclean distclean: clean
330 rm -f Makefile
331
332.PHONY: check installcheck info dvi pdf html
333.PHONY: install-info install-pdf install-html clean-info
334check installcheck:
335info dvi pdf html:
336install-info install-pdf install-html:
337clean-info:
338
339# GNU Make has an annoying habit of putting *all* the Makefile variables
340# into the environment, unless you include this target as a circumvention.
341# Rumor is that this will be fixed (and this target can be removed)
342# in GNU Make 4.0.
343.NOEXPORT:
344
345# GNU Make 3.63 has a different problem: it keeps tacking command line
346# overrides onto the definition of $(MAKE). This variable setting
347# will remove them.
348MAKEOVERRIDES=
349
543ecec7 350Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
aa2e2d8d 351 cd $(top_builddir) && $(MAKE) data-directory/Makefile