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