[PATCH v2 1/4] make: set --no-print-directory once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add --no-print-directory to MAKEFLAGS right in the beginning
to avoid repeating it in all make calls.

Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
---
 Makefile            | 57 +++++++++++++++++++++++----------------------
 extensions/Makefile |  2 +-
 gdb-10.2.patch      |  2 +-
 3 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/Makefile b/Makefile
index 4fd8b7818664..fafdcde58ade 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@
 # GNU General Public License for more details.
 #
 
+MAKEFLAGS += --no-print-directory
 PROGRAM=crash
 
 #
@@ -227,20 +228,20 @@ endif
 
 all: make_configure
 	@./configure ${CONF_TARGET_FLAG} -p "RPMPKG=${RPMPKG}" -b
-	@make --no-print-directory gdb_merge
-#	@make --no-print-directory extensions
+	@make gdb_merge
+#	@make extensions
 
 gdb_merge: force
 	@if [ ! -f ${GDB}/README ]; then \
-	  make --no-print-directory gdb_unzip; fi
+	  make gdb_unzip; fi
 	@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
 	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
 	@rm -f ${PROGRAM}
 	@if [ ! -f ${GDB}/config.status ]; then \
 	  (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
 	    --with-bugurl="" --with-expat=no --with-python=no --disable-sim; \
-	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
-	else make --no-print-directory rebuild; fi
+	  make CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
+	else make rebuild; fi
 	@if [ ! -f ${PROGRAM} ]; then \
 	  echo; echo "${PROGRAM} build failed"; \
 	  echo; exit 1; fi
@@ -251,8 +252,8 @@ rebuild:
 	@if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ] && \
 	  [ "`sum ${GDB}.patch`" != "`sum ${GDB}/${GDB}.patch`" ]; then \
 	  (sh -x ${GDB}.patch ${TARGET}; patch -N -p0 -r- --fuzz=0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; cd ${GDB}; \
-	  make --no-print-directory CRASH_TARGET=${TARGET}) \
-	else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET}); fi
+	  make CRASH_TARGET=${TARGET}) \
+	else (cd ${GDB}/gdb; make CRASH_TARGET=${TARGET}); fi
 
 gdb_unzip:
 	@rm -f gdb.files
@@ -264,7 +265,7 @@ gdb_unzip:
 	  [ ! -t 2 ] && WGET_OPTS="--progress=dot:mega"; \
 	  wget $$WGET_OPTS http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi
 	@tar --exclude-from gdb.files -xzmf ${GDB}.tar.gz
-	@make --no-print-directory gdb_patch
+	@make gdb_patch
 
 gdb_patch:
 	if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
@@ -275,7 +276,7 @@ library: make_build_data ${OBJECT_FILES}
 
 gdb: force
 	rm -f ${GDB_OFILES}
-	@make --no-print-directory all
+	@make all
 
 force:
 	
@@ -286,12 +287,12 @@ make_configure: force
 
 clean: make_configure
 	@./configure ${CONF_TARGET_FLAG} -q -b
-	@make --no-print-directory do_clean
+	@make do_clean
 
 do_clean:
 	rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES}
-	@(cd extensions; make --no-print-directory -i clean)
-	@(cd memory_driver; make --no-print-directory -i clean)
+	@(cd extensions; make -i clean)
+	@(cd memory_driver; make -i clean)
 
 make_build_data: force
 	${CC} -c ${CRASH_CFLAGS} build_data.c ${WARNING_OPTIONS} ${WARNING_ERROR}
@@ -306,31 +307,31 @@ unconfig: make_configure
 
 warn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -w -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 Warn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -W -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 nowarn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -n -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 lzo: make_configure
 	@./configure -x lzo ${CONF_TARGET_FLAG} -w -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 snappy: make_configure
 	@./configure -x snappy ${CONF_TARGET_FLAG} -w -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 zstd: make_configure
 	@./configure -x zstd ${CONF_TARGET_FLAG} -w -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 valgrind: make_configure
 	@./configure -x valgrind ${CONF_TARGET_FLAG} -w -b
-	@make --no-print-directory gdb_merge
+	@make gdb_merge
 
 main.o: ${GENERIC_HFILES} main.c
 	${CC} -c ${CRASH_CFLAGS} main.c ${WARNING_OPTIONS} ${WARNING_ERROR} 
@@ -536,7 +537,7 @@ bpf.o: ${GENERIC_HFILES} bpf.c
 	${CC} -c ${CRASH_CFLAGS} bpf.c ${WARNING_OPTIONS} ${WARNING_ERROR}
 
 ${PROGRAM}: force
-	@make --no-print-directory all
+	@make all
 
 # Remote daemon functionality has been deprecated.
 daemon_deprecated: force
@@ -545,15 +546,15 @@ daemon_deprecated: force
 
 ${PROGRAM}d: daemon_deprecated make_configure
 	@./configure -d
-	@make --no-print-directory make_build_data
-	@make --no-print-directory daemon 
+	@make make_build_data
+	@make daemon 
 
 daemon: ${DAEMON_OBJECT_FILES}
 	${CC} ${LDFLAGS} -o ${PROGRAM}d ${DAEMON_OBJECT_FILES} build_data.o -lz 
 
 files: make_configure
 	@./configure -q -b
-	@make --no-print-directory show_files
+	@make show_files
 
 gdb_files: make_configure
 	@./configure -q -b
@@ -570,7 +571,7 @@ ctags:
 
 tar: make_configure
 	@./configure -q -b
-	@make --no-print-directory do_tar
+	@make do_tar
 
 do_tar:
 	@if [ -f ${PROGRAM}  ]; then \
@@ -585,7 +586,7 @@ release: make_configure
 	@if [ "`id --user`" != "0" ]; then \
 		echo "make release: must be super-user"; exit 1; fi
 	@./configure -P "RPMPKG=${RPMPKG}" -u -g
-	@make --no-print-directory release_configure
+	@make release_configure
 	@echo 
 	@echo "cvs tag this release if necessary"
 
@@ -593,7 +594,7 @@ release_configure: make_configure
 	@if [ "${GDB}" = "" ] ; then \
 		echo "make release: GDB not defined: append GDB=gdb-x.x to make command line"; echo; exit 1; fi 
 	@./configure -r ${GDB}
-	@make --no-print-directory do_release
+	@make do_release
 
 do_release:
 	@echo "CRASH VERSION: ${VERSION}  GDB VERSION: ${GDB}"
@@ -657,10 +658,10 @@ dis:
 
 extensions: make_configure
 	@./configure ${CONF_TARGET_FLAG} -q -b
-	@make --no-print-directory do_extensions
+	@make do_extensions
 
 do_extensions:
 	@(cd extensions; make -i TARGET=$(TARGET) TARGET_CFLAGS="$(TARGET_CFLAGS)" GDB=$(GDB) GDB_FLAGS=$(GDB_FLAGS))
 
 memory_driver: make_configure 
-	@(cd memory_driver; make --no-print-directory -i)
+	@(cd memory_driver; make -i)
diff --git a/extensions/Makefile b/extensions/Makefile
index 7aa019e1cc93..0ad625af37ce 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -51,5 +51,5 @@ $(CONTRIB_SO): %.so: %.c defs.h
 clean:
 	rm -f $(CONTRIB_SO)
 	@for MAKEFILE in `grep -sl "^clean:" *.mk`; \
-	  do make --no-print-directory -f $$MAKEFILE clean; \
+	  do make -f $$MAKEFILE clean; \
 	done
diff --git a/gdb-10.2.patch b/gdb-10.2.patch
index 1332b6638028..8607e42c6807 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 --no-print-directory GDB_FLAGS=-DGDB_10_2 library)
++	@(cd ../..; make 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

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux