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