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