]>
Commit | Line | Data |
---|---|---|
41850419 TT |
1 | ## Makefile for the python subdirectory of the GNU C++ Standard library. |
2 | ## | |
a945c346 | 3 | ## Copyright (C) 2009-2024 Free Software Foundation, Inc. |
41850419 TT |
4 | ## |
5 | ## This file is part of the libstdc++ version 3 distribution. | |
6 | ## Process this file with automake to produce Makefile.in. | |
7 | ||
8 | ## This file is part of the GNU ISO C++ Library. This library is free | |
9 | ## software; you can redistribute it and/or modify it under the | |
10 | ## terms of the GNU General Public License as published by the | |
4bee90f7 | 11 | ## Free Software Foundation; either version 3, or (at your option) |
41850419 | 12 | ## any later version. |
4bee90f7 | 13 | ## |
41850419 TT |
14 | ## This library is distributed in the hope that it will be useful, |
15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ## GNU General Public License for more details. | |
4bee90f7 | 18 | ## |
41850419 | 19 | ## You should have received a copy of the GNU General Public License along |
4bee90f7 PC |
20 | ## with this library; see the file COPYING3. If not see |
21 | ## <http://www.gnu.org/licenses/>. | |
41850419 TT |
22 | |
23 | include $(top_srcdir)/fragment.am | |
24 | ||
25 | ## Where to install the module code. | |
2a5d011c BK |
26 | if ENABLE_PYTHONDIR |
27 | pythondir = $(prefix)/$(python_mod_dir) | |
28 | else | |
35204bbe | 29 | pythondir = $(datadir)/gcc-$(gcc_version)/python |
2a5d011c | 30 | endif |
41850419 | 31 | |
db853ff7 JW |
32 | if GLIBCXX_BUILD_DEBUG |
33 | debug_gdb_py = YES | |
34 | else | |
35 | debug_gdb_py = | |
36 | endif | |
37 | ||
41850419 TT |
38 | all-local: gdb.py |
39 | ||
40 | nobase_python_DATA = \ | |
41 | libstdcxx/v6/printers.py \ | |
e9e08827 | 42 | libstdcxx/v6/xmethods.py \ |
41850419 TT |
43 | libstdcxx/v6/__init__.py \ |
44 | libstdcxx/__init__.py | |
45 | ||
46 | gdb.py: hook.in Makefile | |
35204bbe TT |
47 | sed -e 's,@pythondir@,$(pythondir),' \ |
48 | -e 's,@toolexeclibdir@,$(toolexeclibdir),' < $(srcdir)/hook.in > $@ | |
41850419 TT |
49 | |
50 | install-data-local: gdb.py | |
51 | @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) | |
35204bbe | 52 | ## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the |
c2fc1702 PB |
53 | ## full name of the final library. We use the libtool .la file to get |
54 | ## the correct name. | |
55 | @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ | |
56 | $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ | |
9f7bc160 JW |
57 | if [ -z "$$libname" ]; then \ |
58 | libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ | |
59 | $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ | |
60 | fi; \ | |
41850419 | 61 | echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ |
db853ff7 JW |
62 | $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \ |
63 | if [ -n "$(debug_gdb_py)" ]; then \ | |
64 | sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \ | |
2b85d759 | 65 | $(mkdir_p) $(DESTDIR)$(toolexeclibdir)/debug ; \ |
db853ff7 JW |
66 | $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \ |
67 | fi |