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