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