14fee23f9Smrg## Makefile for the python subdirectory of the GNU C++ Standard library. 24fee23f9Smrg## 3*b1e83836Smrg## Copyright (C) 2009-2022 Free Software Foundation, Inc. 44fee23f9Smrg## 54fee23f9Smrg## This file is part of the libstdc++ version 3 distribution. 64fee23f9Smrg## Process this file with automake to produce Makefile.in. 74fee23f9Smrg 84fee23f9Smrg## This file is part of the GNU ISO C++ Library. This library is free 94fee23f9Smrg## software; you can redistribute it and/or modify it under the 104fee23f9Smrg## terms of the GNU General Public License as published by the 1148fb7bfaSmrg## Free Software Foundation; either version 3, or (at your option) 124fee23f9Smrg## any later version. 1348fb7bfaSmrg## 144fee23f9Smrg## This library is distributed in the hope that it will be useful, 154fee23f9Smrg## but WITHOUT ANY WARRANTY; without even the implied warranty of 164fee23f9Smrg## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 174fee23f9Smrg## GNU General Public License for more details. 1848fb7bfaSmrg## 194fee23f9Smrg## You should have received a copy of the GNU General Public License along 2048fb7bfaSmrg## with this library; see the file COPYING3. If not see 2148fb7bfaSmrg## <http://www.gnu.org/licenses/>. 224fee23f9Smrg 234fee23f9Smrginclude $(top_srcdir)/fragment.am 244fee23f9Smrg 254fee23f9Smrg## Where to install the module code. 2648fb7bfaSmrgif ENABLE_PYTHONDIR 2748fb7bfaSmrgpythondir = $(prefix)/$(python_mod_dir) 2848fb7bfaSmrgelse 294fee23f9Smrgpythondir = $(datadir)/gcc-$(gcc_version)/python 3048fb7bfaSmrgendif 314fee23f9Smrg 32a448f87cSmrgif GLIBCXX_BUILD_DEBUG 33a448f87cSmrgdebug_gdb_py = YES 34a448f87cSmrgelse 35a448f87cSmrgdebug_gdb_py = 36a448f87cSmrgendif 37a448f87cSmrg 384fee23f9Smrgall-local: gdb.py 394fee23f9Smrg 404fee23f9Smrgnobase_python_DATA = \ 414fee23f9Smrg libstdcxx/v6/printers.py \ 424d5abbe8Smrg libstdcxx/v6/xmethods.py \ 434fee23f9Smrg libstdcxx/v6/__init__.py \ 444fee23f9Smrg libstdcxx/__init__.py 454fee23f9Smrg 464fee23f9Smrggdb.py: hook.in Makefile 474fee23f9Smrg sed -e 's,@pythondir@,$(pythondir),' \ 484fee23f9Smrg -e 's,@toolexeclibdir@,$(toolexeclibdir),' < $(srcdir)/hook.in > $@ 494fee23f9Smrg 504fee23f9Smrginstall-data-local: gdb.py 514fee23f9Smrg @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) 524fee23f9Smrg## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the 53a448f87cSmrg## full name of the final library. We use the libtool .la file to get 54a448f87cSmrg## the correct name. 55a448f87cSmrg @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ 56a448f87cSmrg $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ 57a448f87cSmrg if [ -z "$$libname" ]; then \ 58a448f87cSmrg libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ 59a448f87cSmrg $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ 604fee23f9Smrg fi; \ 614fee23f9Smrg echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ 62a448f87cSmrg $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \ 63a448f87cSmrg if [ -n "$(debug_gdb_py)" ]; then \ 64a448f87cSmrg sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \ 65a448f87cSmrg $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \ 66a448f87cSmrg fi 67