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
79 GUILE_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(GUILE_DIR
)
83 gdb
/experimental.scm \
89 SYSTEM_GDBINIT_DIR
= system-gdbinit
90 SYSTEM_GDBINIT_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(SYSTEM_GDBINIT_DIR
)
91 SYSTEM_GDBINIT_FILES
= \
97 "exec_prefix=$(exec_prefix)" \
98 "infodir=$(infodir)" \
99 "datarootdir=$(datarootdir)" \
101 "htmldir=$(htmldir)" \
105 "datadir=$(datadir)" \
106 "includedir=$(includedir)" \
107 "against=$(against)" \
108 "DESTDIR=$(DESTDIR)" \
110 "AR_FLAGS=$(AR_FLAGS)" \
114 "CXXFLAGS=$(CXXFLAGS)" \
115 "DLLTOOL=$(DLLTOOL)" \
116 "LDFLAGS=$(LDFLAGS)" \
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)"
128 all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
130 # For portability's sake, we need to handle systems that don't have
132 stamp-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
) ; \
144 .PHONY
: clean-syscalls
146 rm -rf
$(SYSCALLS_DIR
)
149 # This target is responsible for properly installing the syscalls'
150 # XML files in the system.
151 .PHONY
: install-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
) ; \
162 .PHONY
: uninstall-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,/[^/]*$$,,'` ; \
175 stamp-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 ; \
190 .PHONY
: install-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 ; \
199 .PHONY
: uninstall-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,/[^/]*$$,,'` ; \
212 stamp-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 ; \
227 .PHONY
: install-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 ; \
236 .PHONY
: uninstall-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,/[^/]*$$,,'` ; \
249 stamp-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
) ; \
261 .PHONY
: clean-system-gdbinit
262 clean-system-gdbinit
:
263 rm -rf
$(SYSTEM_GDBINIT_DIR
)
264 rm -f stamp-system-gdbinit
266 .PHONY
: install-system-gdbinit
267 install-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
) ; \
277 .PHONY
: uninstall-system-gdbinit
278 uninstall-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,/[^/]*$$,,'` ; \
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.
297 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
300 install-only
: install-syscalls install-python install-guile \
301 install-system-gdbinit
304 uninstall: uninstall-syscalls uninstall-python uninstall-guile \
305 uninstall-system-gdbinit
308 clean: clean-syscalls clean-python clean-guile clean-system-gdbinit
310 .PHONY
: maintainer-clean
realclean distclean
311 maintainer-clean
realclean distclean: clean
314 .PHONY
: check installcheck info dvi pdf html
315 .PHONY
: install-info install-pdf install-html clean-info
318 install-info install-pdf install-html
:
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)
327 # GNU Make 3.63 has a different problem: it keeps tacking command line
328 # overrides onto the definition of $(MAKE). This variable setting
332 Makefile
: $(srcdir)/Makefile.in
$(top_builddir
)/config.status
333 cd
$(top_builddir
) && $(MAKE
) data-directory
/Makefile