From 63798670e12fb9b2575f67e90d0a0c82b60becba Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <jwakely@redhat.com>
Date: Thu, 14 Nov 2024 18:25:50 +0000
Subject: [PATCH] libstdc++: Use -C option to run recursive make in
 sub-directories

libstdc++-v3/ChangeLog:

	* Makefile.am: Use $(MAKE) -C dir instead of cd dir && $(MAKE).
	* Makefile.in: Regenerate.
---
 libstdc++-v3/Makefile.am | 4 ++--
 libstdc++-v3/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am
index 823e43da9266..bb4027266aeb 100644
--- a/libstdc++-v3/Makefile.am
+++ b/libstdc++-v3/Makefile.am
@@ -34,11 +34,11 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../config
 
 # Testsuite/check forwarding targets.
 check-%:
-	cd testsuite && $(MAKE) $@
+	$(MAKE) -C testsuite $@
 
 # Documentation forwarding targets.
 doc-%:
-	cd doc && $(MAKE) $@
+	$(MAKE) -C doc $@
 
 # Documentation conditionals for output.
 if BUILD_XML
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index cf8dd8bca50f..5beb3146ee6a 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -778,11 +778,11 @@ uninstall-am:
 
 # Testsuite/check forwarding targets.
 check-%:
-	cd testsuite && $(MAKE) $@
+	$(MAKE) -C testsuite $@
 
 # Documentation forwarding targets.
 doc-%:
-	cd doc && $(MAKE) $@
+	$(MAKE) -C doc $@
 
 # Documentation primary rules.
 #
-- 
GitLab