[Crash-utility] [PATCH v2 3/4] make: use -C instead of (cd x; make)

Sven Schnelle svens at linux.ibm.com
Mon Dec 20 13:16:50 UTC 2021


Signed-off-by: Sven Schnelle <svens at linux.ibm.com>
---
 Makefile       | 8 ++++----
 gdb-10.2.patch | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index fafdcde58ade..5a33e70b8b83 100644
--- a/Makefile
+++ b/Makefile
@@ -291,8 +291,8 @@ clean: make_configure
 
 do_clean:
 	rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES}
-	@(cd extensions; make -i clean)
-	@(cd memory_driver; make -i clean)
+	@make -C extensions -i clean
+	@make -C memory_driver -i clean
 
 make_build_data: force
 	${CC} -c ${CRASH_CFLAGS} build_data.c ${WARNING_OPTIONS} ${WARNING_ERROR}
@@ -661,7 +661,7 @@ extensions: make_configure
 	@make do_extensions
 
 do_extensions:
-	@(cd extensions; make -i TARGET=$(TARGET) TARGET_CFLAGS="$(TARGET_CFLAGS)" GDB=$(GDB) GDB_FLAGS=$(GDB_FLAGS))
+	@make -C extensions -i TARGET=$(TARGET) TARGET_CFLAGS="$(TARGET_CFLAGS)" GDB=$(GDB) GDB_FLAGS=$(GDB_FLAGS)
 
 memory_driver: make_configure 
-	@(cd memory_driver; make -i)
+	@make -C memory_driver -i
diff --git a/gdb-10.2.patch b/gdb-10.2.patch
index 8607e42c6807..1280d0688e83 100644
--- a/gdb-10.2.patch
+++ b/gdb-10.2.patch
@@ -73,7 +73,7 @@
  # Removing the old gdb first works better if it is running, at least on SunOS.
  gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS)
  	$(SILENCE) rm -f gdb$(EXEEXT)
-+	@(cd ../..; make GDB_FLAGS=-DGDB_10_2 library)
++	@make -C ../.. GDB_FLAGS=-DGDB_10_2 library
  	$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
 -		-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
 -		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
-- 
2.32.0




More information about the Crash-utility mailing list