*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / data-directory / Makefile.in
1 # Copyright (C) 2010-2013 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 SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
23 VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
24
25 top_srcdir = @top_srcdir@
26 top_builddir = @top_builddir@
27
28 prefix = @prefix@
29 exec_prefix = @exec_prefix@
30
31 datarootdir = @datarootdir@
32 datadir = @datadir@
33
34 SHELL = @SHELL@
35
36 LN_S = @LN_S@
37
38 INSTALL = @INSTALL@
39 INSTALL_DATA = @INSTALL_DATA@
40 INSTALL_DIR = $(SHELL) $(srcdir)/../../mkinstalldirs
41
42 GDB_DATADIR = @GDB_DATADIR@
43
44 SYSCALLS_DIR = syscalls
45 SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
46 SYSCALLS_FILES = \
47 gdb-syscalls.dtd \
48 ppc-linux.xml ppc64-linux.xml \
49 i386-linux.xml amd64-linux.xml \
50 sparc-linux.xml sparc64-linux.xml \
51 mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml
52
53 PYTHON_DIR = python
54 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
55 PYTHON_FILES = \
56 gdb/__init__.py \
57 gdb/frames.py \
58 gdb/FrameIterator.py \
59 gdb/FrameDecorator.py \
60 gdb/types.py \
61 gdb/printing.py \
62 gdb/prompt.py \
63 gdb/command/__init__.py \
64 gdb/command/frame_filters.py \
65 gdb/command/type_printers.py \
66 gdb/command/pretty_printers.py \
67 gdb/command/prompt.py \
68 gdb/command/explore.py \
69 gdb/function/__init__.py \
70 gdb/function/strfns.py
71
72 SYSTEM_GDBINIT_DIR = system-gdbinit
73 SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
74 SYSTEM_GDBINIT_FILES = \
75 elinos.py \
76 wrs-linux.py
77
78 FLAGS_TO_PASS = \
79 "prefix=$(prefix)" \
80 "exec_prefix=$(exec_prefix)" \
81 "infodir=$(infodir)" \
82 "datarootdir=$(datarootdir)" \
83 "docdir=$(docdir)" \
84 "htmldir=$(htmldir)" \
85 "pdfdir=$(pdfdir)" \
86 "libdir=$(libdir)" \
87 "mandir=$(mandir)" \
88 "datadir=$(datadir)" \
89 "includedir=$(includedir)" \
90 "against=$(against)" \
91 "DESTDIR=$(DESTDIR)" \
92 "AR=$(AR)" \
93 "AR_FLAGS=$(AR_FLAGS)" \
94 "CC=$(CC)" \
95 "CFLAGS=$(CFLAGS)" \
96 "CXX=$(CXX)" \
97 "CXXFLAGS=$(CXXFLAGS)" \
98 "DLLTOOL=$(DLLTOOL)" \
99 "LDFLAGS=$(LDFLAGS)" \
100 "RANLIB=$(RANLIB)" \
101 "MAKEINFO=$(MAKEINFO)" \
102 "MAKEHTML=$(MAKEHTML)" \
103 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
104 "INSTALL=$(INSTALL)" \
105 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
106 "INSTALL_DATA=$(INSTALL_DATA)" \
107 "RUNTEST=$(RUNTEST)" \
108 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
109
110 .PHONY: all
111 all: stamp-syscalls stamp-python stamp-system-gdbinit
112
113 # For portability's sake, we need to handle systems that don't have
114 # symbolic links.
115 stamp-syscalls: Makefile $(SYSCALLS_FILES)
116 rm -rf ./$(SYSCALLS_DIR)
117 mkdir ./$(SYSCALLS_DIR)
118 files='$(SYSCALLS_FILES)' ; \
119 for file in $$files ; do \
120 f=$(SYSCALLS_SRCDIR)/$$file ; \
121 if test -f $$f ; then \
122 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
123 fi ; \
124 done
125 touch $@
126
127 .PHONY: clean-syscalls
128 clean-syscalls:
129 rm -rf $(SYSCALLS_DIR)
130 rm -f stamp-syscalls
131
132 # This target is responsible for properly installing the syscalls'
133 # XML files in the system.
134 .PHONY: install-syscalls
135 install-syscalls:
136 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
137 files='$(SYSCALLS_FILES)' ; \
138 for file in $$files; do \
139 f=$(SYSCALLS_SRCDIR)/$$file ; \
140 if test -f $$f ; then \
141 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
142 fi ; \
143 done
144
145 .PHONY: uninstall-syscalls
146 uninstall-syscalls:
147 files='$(SYSCALLS_FILES)' ; \
148 for file in $$files ; do \
149 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
150 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
151 while test "x$$file" != "x$$slashdir" ; do \
152 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
153 file="$$slashdir" ; \
154 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
155 done \
156 done
157
158 stamp-python: Makefile $(PYTHON_FILES)
159 rm -rf ./$(PYTHON_DIR)
160 files='$(PYTHON_FILES)' ; \
161 for file in $$files ; do \
162 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
163 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
164 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
165 done
166 touch $@
167
168 .PHONY: clean-python
169 clean-python:
170 rm -rf $(PYTHON_DIR)
171 rm -f stamp-python
172
173 .PHONY: install-python
174 install-python:
175 files='$(PYTHON_FILES)' ; \
176 for file in $$files ; do \
177 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
178 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
179 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
180 done
181
182 .PHONY: uninstall-python
183 uninstall-python:
184 files='$(PYTHON_FILES)' ; \
185 for file in $$files ; do \
186 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
187 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
188 while test "x$$file" != "x$$slashdir" ; do \
189 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
190 file="$$slashdir" ; \
191 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
192 done \
193 done
194
195 stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
196 rm -rf ./$(SYSTEM_GDBINIT_DIR)
197 mkdir ./$(SYSTEM_GDBINIT_DIR)
198 files='$(SYSTEM_GDBINIT_FILES)' ; \
199 for file in $$files ; do \
200 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
201 if test -f $$f ; then \
202 $(INSTALL_DATA) $$f ./$(SYSTEM_GDBINIT_DIR) ; \
203 fi ; \
204 done
205 touch $@
206
207 .PHONY: clean-system-gdbinit
208 clean-system-gdbinit:
209 rm -rf $(SYSTEM_GDBINIT_DIR)
210 rm -f stamp-system-gdbinit
211
212 .PHONY: install-system-gdbinit
213 install-system-gdbinit:
214 $(INSTALL_DIR) $(SYSTEM_GDBINIT_INSTALL_DIR)
215 files='$(SYSTEM_GDBINIT_FILES)' ; \
216 for file in $$files; do \
217 f=$(SYSTEM_GDBINIT_SRCDIR)/$$file ; \
218 if test -f $$f ; then \
219 $(INSTALL_DATA) $$f $(SYSTEM_GDBINIT_INSTALL_DIR) ; \
220 fi ; \
221 done
222
223 .PHONY: uninstall-system-gdbinit
224 uninstall-system-gdbinit:
225 files='$(SYSTEM_GDBINIT_FILES)' ; \
226 for file in $$files ; do \
227 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
228 rm -f $(SYSTEM_GDBINIT_INSTALL_DIR)/$$file ; \
229 while test "x$$file" != "x$$slashdir" ; do \
230 rmdir 2>/dev/null "$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
231 file="$$slashdir" ; \
232 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
233 done \
234 done
235
236 # Traditionally "install" depends on "all". But it may be useful
237 # not to; for example, if the user has made some trivial change to a
238 # source file and doesn't care about rebuilding or just wants to save the
239 # time it takes for make to check that all is up to date.
240 # install-only is intended to address that need.
241 .PHONY: install
242 install: all
243 @$(MAKE) $(FLAGS_TO_PASS) install-only
244
245 .PHONY: install-only
246 install-only: install-syscalls install-python install-system-gdbinit
247
248 .PHONY: uninstall
249 uninstall: uninstall-syscalls uninstall-python uninstall-system-gdbinit
250
251 .PHONY: clean
252 clean: clean-syscalls clean-python clean-system-gdbinit
253
254 .PHONY: maintainer-clean realclean distclean
255 maintainer-clean realclean distclean: clean
256 rm -f Makefile
257
258 .PHONY: check installcheck info dvi pdf html
259 .PHONY: install-info install-pdf install-html clean-info
260 check installcheck:
261 info dvi pdf html:
262 install-info install-pdf install-html:
263 clean-info:
264
265 # GNU Make has an annoying habit of putting *all* the Makefile variables
266 # into the environment, unless you include this target as a circumvention.
267 # Rumor is that this will be fixed (and this target can be removed)
268 # in GNU Make 4.0.
269 .NOEXPORT:
270
271 # GNU Make 3.63 has a different problem: it keeps tacking command line
272 # overrides onto the definition of $(MAKE). This variable setting
273 # will remove them.
274 MAKEOVERRIDES=
275
276 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
277 cd $(top_builddir) && $(MAKE) data-directory/Makefile
This page took 0.119935 seconds and 4 git commands to generate.