1 # Copyright (C) 2010-2012 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 VPATH
= $(srcdir):$(SYSCALLS_SRCDIR
):$(PYTHON_SRCDIR
)
24 top_srcdir
= @top_srcdir@
25 top_builddir
= @top_builddir@
28 exec_prefix = @
exec_prefix@
30 datarootdir
= @datarootdir@
38 INSTALL_DATA
= @INSTALL_DATA@
39 INSTALL_DIR
= $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
41 GDB_DATADIR
= @GDB_DATADIR@
43 SYSCALLS_DIR
= syscalls
44 SYSCALLS_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(SYSCALLS_DIR
)
47 ppc-linux.xml ppc64-linux.xml \
48 i386-linux.xml amd64-linux.xml \
49 sparc-linux.xml sparc64-linux.xml \
50 mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml
53 PYTHON_INSTALL_DIR
= $(DESTDIR
)$(GDB_DATADIR
)/$(PYTHON_DIR
)
59 gdb
/command
/__init__.py \
60 gdb
/command
/type_printers.py \
61 gdb
/command
/pretty_printers.py \
62 gdb
/command
/prompt.py \
63 gdb
/command
/explore.py \
64 gdb
/function
/__init__.py \
65 gdb
/function
/strfns.py
69 "exec_prefix=$(exec_prefix)" \
70 "infodir=$(infodir)" \
71 "datarootdir=$(datarootdir)" \
73 "htmldir=$(htmldir)" \
77 "datadir=$(datadir)" \
78 "includedir=$(includedir)" \
79 "against=$(against)" \
80 "DESTDIR=$(DESTDIR)" \
82 "AR_FLAGS=$(AR_FLAGS)" \
86 "CXXFLAGS=$(CXXFLAGS)" \
87 "DLLTOOL=$(DLLTOOL)" \
88 "LDFLAGS=$(LDFLAGS)" \
90 "MAKEINFO=$(MAKEINFO)" \
91 "MAKEHTML=$(MAKEHTML)" \
92 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
93 "INSTALL=$(INSTALL)" \
94 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
95 "INSTALL_DATA=$(INSTALL_DATA)" \
96 "RUNTEST=$(RUNTEST)" \
97 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
100 all: stamp-syscalls stamp-python
102 # For portability's sake, we need to handle systems that don't have
104 stamp-syscalls
: Makefile
$(SYSCALLS_FILES
)
105 rm -rf .
/$(SYSCALLS_DIR
)
106 mkdir .
/$(SYSCALLS_DIR
)
107 files
='$(SYSCALLS_FILES)' ; \
108 for file in
$$files ; do \
109 f
=$(SYSCALLS_SRCDIR
)/$$file ; \
110 if
test -f
$$f ; then \
111 $(INSTALL_DATA
) $$f .
/$(SYSCALLS_DIR
) ; \
116 .PHONY
: clean-syscalls
118 rm -rf
$(SYSCALLS_DIR
)
121 # This target is responsible for properly installing the syscalls'
122 # XML files in the system.
123 .PHONY
: install-syscalls
125 $(INSTALL_DIR
) $(SYSCALLS_INSTALL_DIR
)
126 files
='$(SYSCALLS_FILES)' ; \
127 for file in
$$files; do \
128 f
=$(SYSCALLS_SRCDIR
)/$$file ; \
129 if
test -f
$$f ; then \
130 $(INSTALL_DATA
) $$f $(SYSCALLS_INSTALL_DIR
) ; \
134 .PHONY
: uninstall-syscalls
136 files
='$(SYSCALLS_FILES)' ; \
137 for file in
$$files ; do \
138 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
139 rm -f
$(SYSCALLS_INSTALL_DIR
)/$$file ; \
140 while
test "x$$file" != "x$$slashdir" ; do \
141 rmdir
2>/dev
/null
"$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
142 file
="$$slashdir" ; \
143 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
147 stamp-python
: Makefile
$(PYTHON_FILES
)
148 rm -rf .
/$(PYTHON_DIR
)
149 files
='$(PYTHON_FILES)' ; \
150 for file in
$$files ; do \
151 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
152 $(INSTALL_DIR
) .
/$(PYTHON_DIR
)/$$dir ; \
153 $(INSTALL_DATA
) $(PYTHON_SRCDIR
)/$$file .
/$(PYTHON_DIR
)/$$dir ; \
162 .PHONY
: install-python
164 files
='$(PYTHON_FILES)' ; \
165 for file in
$$files ; do \
166 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
167 $(INSTALL_DIR
) $(PYTHON_INSTALL_DIR
)/$$dir ; \
168 $(INSTALL_DATA
) .
/$(PYTHON_DIR
)/$$file $(PYTHON_INSTALL_DIR
)/$$dir ; \
171 .PHONY
: uninstall-python
173 files
='$(PYTHON_FILES)' ; \
174 for file in
$$files ; do \
175 slashdir
=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
176 rm -f
$(PYTHON_INSTALL_DIR
)/$$file ; \
177 while
test "x$$file" != "x$$slashdir" ; do \
178 rmdir
2>/dev
/null
"$(PYTHON_INSTALL_DIR)$$slashdir" ; \
179 file
="$$slashdir" ; \
180 slashdir
=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
184 # Traditionally "install" depends on "all". But it may be useful
185 # not to; for example, if the user has made some trivial change to a
186 # source file and doesn't care about rebuilding or just wants to save the
187 # time it takes for make to check that all is up to date.
188 # install-only is intended to address that need.
191 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
194 install-only
: install-syscalls install-python
197 uninstall: uninstall-syscalls uninstall-python
200 clean: clean-syscalls clean-python
202 .PHONY
: maintainer-clean
realclean distclean
203 maintainer-clean
realclean distclean: clean
206 .PHONY
: check installcheck info dvi pdf html
207 .PHONY
: install-info install-pdf install-html clean-info
210 install-info install-pdf install-html
:
213 # GNU Make has an annoying habit of putting *all* the Makefile variables
214 # into the environment, unless you include this target as a circumvention.
215 # Rumor is that this will be fixed (and this target can be removed)
219 # GNU Make 3.63 has a different problem: it keeps tacking command line
220 # overrides onto the definition of $(MAKE). This variable setting
224 Makefile
: $(srcdir)/Makefile.in
$(top_builddir
)/config.status
225 cd
$(top_builddir
) && $(MAKE
) data-directory
/Makefile