1 # Copyright (C) 2010-2014 Free Software Foundation, Inc.
3 # Makefile for building a staged copy of the data-directory.
4 # This file is part of GDB.
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.
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.
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/>.
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
)
26 top_srcdir
= @top_srcdir@
27 top_builddir
= @top_builddir@
30 exec_prefix = @
exec_prefix@
32 datarootdir
= @datarootdir@
40 INSTALL_DATA
= @INSTALL_DATA@
41 INSTALL_DIR
= $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
43 GDB_DATADIR
= @GDB_DATADIR@
45 SYSCALLS_DIR
= syscalls
46 SYSCALLS_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(SYSCALLS_DIR
)
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
57 PYTHON_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(PYTHON_DIR
)
61 gdb
/FrameIterator.py \
62 gdb
/FrameDecorator.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
78 @HAVE_PYTHON_TRUE@PYTHON_FILES
= $(PYTHON_FILE_LIST
)
79 @HAVE_PYTHON_FALSE@PYTHON_FILES
=
82 GUILE_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(GUILE_DIR
)
86 gdb
/experimental.scm \
92 @HAVE_GUILE_TRUE@GUILE_FILES
= $(GUILE_FILE_LIST
)
93 @HAVE_GUILE_FALSE@GUILE_FILES
=
95 SYSTEM_GDBINIT_DIR
= system-gdbinit
96 SYSTEM_GDBINIT_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(SYSTEM_GDBINIT_DIR
)
97 SYSTEM_GDBINIT_FILES
= \
103 "exec_prefix=$(exec_prefix)" \
104 "infodir=$(infodir)" \
105 "datarootdir=$(datarootdir)" \
107 "htmldir=$(htmldir)" \
111 "datadir=$(datadir)" \
112 "includedir=$(includedir)" \
113 "against=$(against)" \
114 "DESTDIR=$(DESTDIR)" \
116 "AR_FLAGS=$(AR_FLAGS)" \
120 "CXXFLAGS=$(CXXFLAGS)" \
121 "DLLTOOL=$(DLLTOOL)" \
122 "LDFLAGS=$(LDFLAGS)" \
124 "MAKEINFO=$(MAKEINFO)" \
125 "MAKEHTML=$(MAKEHTML)" \
126 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
127 "INSTALL=$(INSTALL)" \
128 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
129 "INSTALL_DATA=$(INSTALL_DATA)" \
130 "RUNTEST=$(RUNTEST)" \
131 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
134 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
136 # For portability's sake, we need to handle systems that don't have
138 stamp-syscalls
: Makefile
$(SYSCALLS_FILES
)
139 rm -rf .
/$(SYSCALLS_DIR
)
140 mkdir .
/$(SYSCALLS_DIR
)
141 files
='$(SYSCALLS_FILES)' ; \
142 for file in
$$files ; do \
143 f
=$(SYSCALLS_SRCDIR
)/$$file ; \
144 if
test -f
$$f ; then \
145 $(INSTALL_DATA
) $$f .
/$(SYSCALLS_DIR
) ; \
150 .PHONY
: clean-syscalls
152 rm -rf
$(SYSCALLS_DIR
)
155 # This target is responsible for properly installing the syscalls'
156 # XML files in the system.
157 .PHONY
: install-syscalls
159 $(INSTALL_DIR
) $(SYSCALLS_INSTALL_DIR
)
160 files
='$(SYSCALLS_FILES)' ; \
161 for file in
$$files; do \
162 f
=$(SYSCALLS_SRCDIR
)/$$file ; \
163 if
test -f
$$f ; then \
164 $(INSTALL_DATA
) $$f $(SYSCALLS_INSTALL_DIR
) ; \
168 .PHONY
: uninstall-syscalls
170 files
='$(SYSCALLS_FILES)' ; \
171 for file in
$$files ; do \
172 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
173 rm -f
$(SYSCALLS_INSTALL_DIR
)/$$file ; \
174 while
test "x$$file" != "x$$slashdir" ; do \
175 rmdir
2>/dev
/null
"$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
176 file
="$$slashdir" ; \
177 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
181 stamp-python
: Makefile
$(PYTHON_FILES
)
182 rm -rf .
/$(PYTHON_DIR
)
183 files
='$(PYTHON_FILES)' ; \
184 if
test "x$$files" != x
; then \
185 for file in
$$files ; do \
186 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
187 $(INSTALL_DIR
) .
/$(PYTHON_DIR
)/$$dir ; \
188 $(INSTALL_DATA
) $(PYTHON_SRCDIR
)/$$file .
/$(PYTHON_DIR
)/$$dir ; \
198 .PHONY
: install-python
200 files
='$(PYTHON_FILES)' ; \
201 if
test "x$$files" != x
; then \
202 for file in
$$files ; do \
203 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
204 $(INSTALL_DIR
) $(PYTHON_INSTALL_DIR
)/$$dir ; \
205 $(INSTALL_DATA
) .
/$(PYTHON_DIR
)/$$file $(PYTHON_INSTALL_DIR
)/$$dir ; \
209 .PHONY
: uninstall-python
211 files
='$(PYTHON_FILES)' ; \
212 if
test "x$$files" != x
; then \
213 for file in
$$files ; do \
214 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
215 rm -f
$(PYTHON_INSTALL_DIR
)/$$file ; \
216 while
test "x$$file" != "x$$slashdir" ; do \
217 rmdir
2>/dev
/null
"$(PYTHON_INSTALL_DIR)$$slashdir" ; \
218 file
="$$slashdir" ; \
219 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
224 stamp-guile
: Makefile
$(GUILE_FILES
)
225 rm -rf .
/$(GUILE_DIR
)
226 files
='$(GUILE_FILES)' ; \
227 if
test "x$$files" != x
; then \
228 for file in
$$files ; do \
229 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
230 $(INSTALL_DIR
) .
/$(GUILE_DIR
)/$$dir ; \
231 $(INSTALL_DATA
) $(GUILE_SRCDIR
)/$$file .
/$(GUILE_DIR
)/$$dir ; \
241 .PHONY
: install-guile
243 files
='$(GUILE_FILES)' ; \
244 if
test "x$$files" != x
; then \
245 for file in
$$files ; do \
246 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
247 $(INSTALL_DIR
) $(GUILE_INSTALL_DIR
)/$$dir ; \
248 $(INSTALL_DATA
) .
/$(GUILE_DIR
)/$$file $(GUILE_INSTALL_DIR
)/$$dir ; \
252 .PHONY
: uninstall-guile
254 files
='$(GUILE_FILES)' ; \
255 if
test "x$$files" != x
; then \
256 for file in
$$files ; do \
257 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
258 rm -f
$(GUILE_INSTALL_DIR
)/$$file ; \
259 while
test "x$$file" != "x$$slashdir" ; do \
260 rmdir
2>/dev
/null
"$(GUILE_INSTALL_DIR)$$slashdir" ; \
261 file
="$$slashdir" ; \
262 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
267 stamp-system-gdbinit
: Makefile
$(SYSTEM_GDBINIT_FILES
)
268 rm -rf .
/$(SYSTEM_GDBINIT_DIR
)
269 mkdir .
/$(SYSTEM_GDBINIT_DIR
)
270 files
='$(SYSTEM_GDBINIT_FILES)' ; \
271 for file in
$$files ; do \
272 f
=$(SYSTEM_GDBINIT_SRCDIR
)/$$file ; \
273 if
test -f
$$f ; then \
274 $(INSTALL_DATA
) $$f .
/$(SYSTEM_GDBINIT_DIR
) ; \
279 .PHONY
: clean-system-gdbinit
280 clean-system-gdbinit
:
281 rm -rf
$(SYSTEM_GDBINIT_DIR
)
282 rm -f stamp-system-gdbinit
284 .PHONY
: install-system-gdbinit
285 install-system-gdbinit
:
286 $(INSTALL_DIR
) $(SYSTEM_GDBINIT_INSTALL_DIR
)
287 files
='$(SYSTEM_GDBINIT_FILES)' ; \
288 for file in
$$files; do \
289 f
=$(SYSTEM_GDBINIT_SRCDIR
)/$$file ; \
290 if
test -f
$$f ; then \
291 $(INSTALL_DATA
) $$f $(SYSTEM_GDBINIT_INSTALL_DIR
) ; \
295 .PHONY
: uninstall-system-gdbinit
296 uninstall-system-gdbinit
:
297 files
='$(SYSTEM_GDBINIT_FILES)' ; \
298 for file in
$$files ; do \
299 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
300 rm -f
$(SYSTEM_GDBINIT_INSTALL_DIR
)/$$file ; \
301 while
test "x$$file" != "x$$slashdir" ; do \
302 rmdir
2>/dev
/null
"$(SYSTEM_GDBINIT_INSTALL_DIR)$$slashdir" ; \
303 file
="$$slashdir" ; \
304 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
308 # Traditionally "install" depends on "all". But it may be useful
309 # not to; for example, if the user has made some trivial change to a
310 # source file and doesn't care about rebuilding or just wants to save the
311 # time it takes for make to check that all is up to date.
312 # install-only is intended to address that need.
315 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
318 install-only
: install-syscalls install-python install-guile \
319 install-system-gdbinit
322 uninstall: uninstall-syscalls uninstall-python uninstall-guile \
323 uninstall-system-gdbinit
326 clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
328 .PHONY
: maintainer-clean
realclean distclean
329 maintainer-clean
realclean distclean: clean
332 .PHONY
: check installcheck info dvi pdf html
333 .PHONY
: install-info install-pdf install-html clean-info
336 install-info install-pdf install-html
:
339 # GNU Make has an annoying habit of putting *all* the Makefile variables
340 # into the environment, unless you include this target as a circumvention.
341 # Rumor is that this will be fixed (and this target can be removed)
345 # GNU Make 3.63 has a different problem: it keeps tacking command line
346 # overrides onto the definition of $(MAKE). This variable setting
350 Makefile
: $(srcdir)/Makefile.in
$(top_builddir
)/config.status
351 cd
$(top_builddir
) && $(MAKE
) data-directory
/Makefile