PR guile/17177
[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 \
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
ed3ef339
DE
78GUILE_DIR = guile
79GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
80GUILE_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
776af39e
JB
89SYSTEM_GDBINIT_DIR = system-gdbinit
90SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
91SYSTEM_GDBINIT_FILES = \
92 elinos.py \
93 wrs-linux.py
94
f474844c
JZ
95FLAGS_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
aa2e2d8d 127.PHONY: all
ed3ef339 128all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
aa2e2d8d
DE
129
130# For portability's sake, we need to handle systems that don't have
131# symbolic links.
132stamp-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
145clean-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
152install-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
163uninstall-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
175stamp-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
186clean-python:
187 rm -rf $(PYTHON_DIR)
188 rm -f stamp-python
189
190.PHONY: install-python
191install-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
200uninstall-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
ed3ef339
DE
212stamp-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
223clean-guile:
224 rm -rf $(GUILE_DIR)
225 rm -f stamp-guile
226
227.PHONY: install-guile
228install-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
237uninstall-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
776af39e
JB
249stamp-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
262clean-system-gdbinit:
263 rm -rf $(SYSTEM_GDBINIT_DIR)
264 rm -f stamp-system-gdbinit
265
266.PHONY: install-system-gdbinit
267install-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
278uninstall-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
aa2e2d8d
DE
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
296install: all
f474844c 297 @$(MAKE) $(FLAGS_TO_PASS) install-only
aa2e2d8d
DE
298
299.PHONY: install-only
ed3ef339
DE
300install-only: install-syscalls install-python install-guile \
301 install-system-gdbinit
aa2e2d8d
DE
302
303.PHONY: uninstall
ed3ef339
DE
304uninstall: uninstall-syscalls uninstall-python uninstall-guile \
305 uninstall-system-gdbinit
aa2e2d8d
DE
306
307.PHONY: clean
ed3ef339 308clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
aa2e2d8d
DE
309
310.PHONY: maintainer-clean realclean distclean
311maintainer-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
316check installcheck:
317info dvi pdf html:
318install-info install-pdf install-html:
319clean-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.
330MAKEOVERRIDES=
331
543ecec7 332Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
aa2e2d8d 333 cd $(top_builddir) && $(MAKE) data-directory/Makefile
This page took 0.292894 seconds and 4 git commands to generate.