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