]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/data-directory/Makefile.in
2012-04-02 Siva Chandra Reddy <sivachandra@google.com>
[thirdparty/binutils-gdb.git] / gdb / data-directory / Makefile.in
1 # Copyright (C) 2010-2012 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 VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR)
23
24 top_srcdir = @top_srcdir@
25 top_builddir = @top_builddir@
26
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29
30 datarootdir = @datarootdir@
31 datadir = @datadir@
32
33 SHELL = @SHELL@
34
35 LN_S = @LN_S@
36
37 INSTALL = @INSTALL@
38 INSTALL_DATA = @INSTALL_DATA@
39 INSTALL_DIR = $(SHELL) $(srcdir)/../../mkinstalldirs
40
41 GDB_DATADIR = @GDB_DATADIR@
42
43 SYSCALLS_DIR = syscalls
44 SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
45 SYSCALLS_FILES = \
46 gdb-syscalls.dtd \
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
51
52 PYTHON_DIR = python
53 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
54 PYTHON_FILES = \
55 gdb/__init__.py \
56 gdb/types.py \
57 gdb/printing.py \
58 gdb/prompt.py \
59 gdb/command/__init__.py \
60 gdb/command/pretty_printers.py \
61 gdb/command/prompt.py \
62 gdb/command/explore.py
63
64 FLAGS_TO_PASS = \
65 "prefix=$(prefix)" \
66 "exec_prefix=$(exec_prefix)" \
67 "infodir=$(infodir)" \
68 "datarootdir=$(datarootdir)" \
69 "docdir=$(docdir)" \
70 "htmldir=$(htmldir)" \
71 "pdfdir=$(pdfdir)" \
72 "libdir=$(libdir)" \
73 "mandir=$(mandir)" \
74 "datadir=$(datadir)" \
75 "includedir=$(includedir)" \
76 "against=$(against)" \
77 "DESTDIR=$(DESTDIR)" \
78 "AR=$(AR)" \
79 "AR_FLAGS=$(AR_FLAGS)" \
80 "CC=$(CC)" \
81 "CFLAGS=$(CFLAGS)" \
82 "CXX=$(CXX)" \
83 "CXXFLAGS=$(CXXFLAGS)" \
84 "DLLTOOL=$(DLLTOOL)" \
85 "LDFLAGS=$(LDFLAGS)" \
86 "RANLIB=$(RANLIB)" \
87 "MAKEINFO=$(MAKEINFO)" \
88 "MAKEHTML=$(MAKEHTML)" \
89 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
90 "INSTALL=$(INSTALL)" \
91 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
92 "INSTALL_DATA=$(INSTALL_DATA)" \
93 "RUNTEST=$(RUNTEST)" \
94 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
95
96 .PHONY: all
97 all: stamp-syscalls stamp-python
98
99 # For portability's sake, we need to handle systems that don't have
100 # symbolic links.
101 stamp-syscalls: Makefile $(SYSCALLS_FILES)
102 rm -rf ./$(SYSCALLS_DIR)
103 mkdir ./$(SYSCALLS_DIR)
104 files='$(SYSCALLS_FILES)' ; \
105 for file in $$files ; do \
106 f=$(SYSCALLS_SRCDIR)/$$file ; \
107 if test -f $$f ; then \
108 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
109 fi ; \
110 done
111 touch $@
112
113 .PHONY: clean-syscalls
114 clean-syscalls:
115 rm -rf $(SYSCALLS_DIR)
116 rm -f stamp-syscalls
117
118 # This target is responsible for properly installing the syscalls'
119 # XML files in the system.
120 .PHONY: install-syscalls
121 install-syscalls:
122 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
123 files='$(SYSCALLS_FILES)' ; \
124 for file in $$files; do \
125 f=$(SYSCALLS_SRCDIR)/$$file ; \
126 if test -f $$f ; then \
127 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
128 fi ; \
129 done
130
131 .PHONY: uninstall-syscalls
132 uninstall-syscalls:
133 files='$(SYSCALLS_FILES)' ; \
134 for file in $$files ; do \
135 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
136 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
137 while test "x$$file" != "x$$slashdir" ; do \
138 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
139 file="$$slashdir" ; \
140 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
141 done \
142 done
143
144 stamp-python: Makefile $(PYTHON_FILES)
145 rm -rf ./$(PYTHON_DIR)
146 files='$(PYTHON_FILES)' ; \
147 for file in $$files ; do \
148 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
149 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
150 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
151 done
152 touch $@
153
154 .PHONY: clean-python
155 clean-python:
156 rm -rf $(PYTHON_DIR)
157 rm -f stamp-python
158
159 .PHONY: install-python
160 install-python:
161 files='$(PYTHON_FILES)' ; \
162 for file in $$files ; do \
163 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
164 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
165 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
166 done
167
168 .PHONY: uninstall-python
169 uninstall-python:
170 files='$(PYTHON_FILES)' ; \
171 for file in $$files ; do \
172 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
173 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
174 while test "x$$file" != "x$$slashdir" ; do \
175 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
176 file="$$slashdir" ; \
177 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
178 done \
179 done
180
181 # Traditionally "install" depends on "all". But it may be useful
182 # not to; for example, if the user has made some trivial change to a
183 # source file and doesn't care about rebuilding or just wants to save the
184 # time it takes for make to check that all is up to date.
185 # install-only is intended to address that need.
186 .PHONY: install
187 install: all
188 @$(MAKE) $(FLAGS_TO_PASS) install-only
189
190 .PHONY: install-only
191 install-only: install-syscalls install-python
192
193 .PHONY: uninstall
194 uninstall: uninstall-syscalls uninstall-python
195
196 .PHONY: clean
197 clean: clean-syscalls clean-python
198
199 .PHONY: maintainer-clean realclean distclean
200 maintainer-clean realclean distclean: clean
201 rm -f Makefile
202
203 .PHONY: check installcheck info dvi pdf html
204 .PHONY: install-info install-pdf install-html clean-info
205 check installcheck:
206 info dvi pdf html:
207 install-info install-pdf install-html:
208 clean-info:
209
210 # GNU Make has an annoying habit of putting *all* the Makefile variables
211 # into the environment, unless you include this target as a circumvention.
212 # Rumor is that this will be fixed (and this target can be removed)
213 # in GNU Make 4.0.
214 .NOEXPORT:
215
216 # GNU Make 3.63 has a different problem: it keeps tacking command line
217 # overrides onto the definition of $(MAKE). This variable setting
218 # will remove them.
219 MAKEOVERRIDES=
220
221 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
222 cd $(top_builddir) && $(MAKE) data-directory/Makefile