New python module gdb.types.
[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
aa2e2d8d
DE
57.PHONY: all
58all: stamp-syscalls stamp-python
59
60# For portability's sake, we need to handle systems that don't have
61# symbolic links.
62stamp-syscalls: Makefile $(SYSCALLS_FILES)
63 rm -rf ./$(SYSCALLS_DIR)
64 mkdir ./$(SYSCALLS_DIR)
65 files='$(SYSCALLS_FILES)' ; \
66 for file in $$files ; do \
67 f=$(SYSCALLS_SRCDIR)/$$file ; \
68 if test -f $$f ; then \
69 $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \
70 fi ; \
71 done
72 touch $@
73
74.PHONY: clean-syscalls
75clean-syscalls:
76 rm -rf $(SYSCALLS_DIR)
77 rm -f stamp-syscalls
78
79# This target is responsible for properly installing the syscalls'
80# XML files in the system.
81.PHONY: install-syscalls
82install-syscalls:
83 $(INSTALL_DIR) $(SYSCALLS_INSTALL_DIR)
84 files='$(SYSCALLS_FILES)' ; \
85 for file in $$files; do \
86 f=$(SYSCALLS_SRCDIR)/$$file ; \
87 if test -f $$f ; then \
88 $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \
89 fi ; \
90 done
91
92.PHONY: uninstall-syscalls
93uninstall-syscalls:
94 files='$(SYSCALLS_FILES)' ; \
95 for file in $$files ; do \
96 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
97 rm -f $(SYSCALLS_INSTALL_DIR)/$$file ; \
98 while test "x$$file" != "x$$slashdir" ; do \
99 rmdir 2>/dev/null "$(SYSCALLS_INSTALL_DIR)$$slashdir" ; \
100 file="$$slashdir" ; \
101 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
102 done \
103 done
104
105stamp-python: Makefile $(PYTHON_FILES)
106 rm -rf ./$(PYTHON_DIR)
107 files='$(PYTHON_FILES)' ; \
108 for file in $$files ; do \
109 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
110 $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
111 $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
112 done
113 touch $@
114
115.PHONY: clean-python
116clean-python:
117 rm -rf $(PYTHON_DIR)
118 rm -f stamp-python
119
120.PHONY: install-python
121install-python:
122 files='$(PYTHON_FILES)' ; \
123 for file in $$files ; do \
124 dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
125 $(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
126 $(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
127 done
128
129.PHONY: uninstall-python
130uninstall-python:
131 files='$(PYTHON_FILES)' ; \
132 for file in $$files ; do \
133 slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
134 rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
135 while test "x$$file" != "x$$slashdir" ; do \
136 rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
137 file="$$slashdir" ; \
138 slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
139 done \
140 done
141
142# Traditionally "install" depends on "all". But it may be useful
143# not to; for example, if the user has made some trivial change to a
144# source file and doesn't care about rebuilding or just wants to save the
145# time it takes for make to check that all is up to date.
146# install-only is intended to address that need.
147.PHONY: install
148install: all
149 $(MAKE) install-only
150
151.PHONY: install-only
152install-only: install-syscalls install-python
153
154.PHONY: uninstall
155uninstall: uninstall-syscalls uninstall-python
156
157.PHONY: clean
158clean: clean-syscalls clean-python
159
160.PHONY: maintainer-clean realclean distclean
161maintainer-clean realclean distclean: clean
162 rm -f Makefile
163
164.PHONY: check installcheck info dvi pdf html
165.PHONY: install-info install-pdf install-html clean-info
166check installcheck:
167info dvi pdf html:
168install-info install-pdf install-html:
169clean-info:
170
171# GNU Make has an annoying habit of putting *all* the Makefile variables
172# into the environment, unless you include this target as a circumvention.
173# Rumor is that this will be fixed (and this target can be removed)
174# in GNU Make 4.0.
175.NOEXPORT:
176
177# GNU Make 3.63 has a different problem: it keeps tacking command line
178# overrides onto the definition of $(MAKE). This variable setting
179# will remove them.
180MAKEOVERRIDES=
181
543ecec7 182Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
aa2e2d8d 183 cd $(top_builddir) && $(MAKE) data-directory/Makefile
This page took 0.031395 seconds and 4 git commands to generate.