public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix python/ not making install directories
@ 2022-11-13 18:05 Arsen Arsenović
  2022-11-13 19:42 ` Jonathan Wakely
  2022-11-14 10:29 ` Jonathan Wakely
  0 siblings, 2 replies; 11+ messages in thread
From: Arsen Arsenović @ 2022-11-13 18:05 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: Arsen Arsenović

I'm unsure why this issue only started manifesting now with how old this
code is, but this should fix it.

libstdc++-v3/ChangeLog:

	* python/Makefile.am: Call mkinstalldirs before INSTALL_DATA
	when installing gdb scripts.
	* python/Makefile.in: Regenerate.
---
Hi,

Someone spotted on IRC spotted an error: if trying to install to a fresh
prefix/sysroot with --enable-libstdcxx-debug, the install fails since it's
intended target directories don't exist.  I could replicate this on
r13-3944-g43435c7eb0ff60 using

$ ../gcc/configure --disable-bootstrap \
	--enable-libstdcxx-debug \
	--enable-languages=c,c++ \
	--prefix=$(pwd)/pfx

Install tested on x86_64-pc-linux-gnu with and without
--enable-libstdcxx-debug.

 libstdc++-v3/python/Makefile.am | 4 ++++
 libstdc++-v3/python/Makefile.in | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
index f523d3a44dc..7987d33e6d9 100644
--- a/libstdc++-v3/python/Makefile.am
+++ b/libstdc++-v3/python/Makefile.am
@@ -58,9 +58,13 @@ install-data-local: gdb.py
 	  libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
 		  $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
 	fi; \
+	echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)"; \
+	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir); \
 	echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
 	$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \
 	if [ -n "$(debug_gdb_py)" ]; then \
 	  sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \
+	  echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug"; \
+	  $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug; \
 	  $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \
 	fi
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index 05e79b5ac1e..a68c1836481 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -623,10 +623,14 @@ install-data-local: gdb.py
 	  libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
 		  $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
 	fi; \
+	echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)"; \
+	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir); \
 	echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
 	$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \
 	if [ -n "$(debug_gdb_py)" ]; then \
 	  sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \
+	  echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug"; \
+	  $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug; \
 	  $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \
 	fi
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-14 16:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 18:05 [PATCH] libstdc++: Fix python/ not making install directories Arsen Arsenović
2022-11-13 19:42 ` Jonathan Wakely
2022-11-13 20:29   ` Bernhard Reutner-Fischer
2022-11-14 10:16     ` Jonathan Wakely
2022-11-14 10:29 ` Jonathan Wakely
2022-11-14 10:39   ` Jonathan Wakely
2022-11-14 13:15     ` Arsen Arsenović
2022-11-14 14:13       ` Jonathan Wakely
2022-11-14 14:19         ` Jonathan Wakely
2022-11-14 15:56           ` Arsen Arsenović
2022-11-14 16:00             ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).