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