[PATCH 4/4] make: replace make by $(MAKE)

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

 



This way we can use multiple jobs to build crash.

Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
---
 Makefile | 60 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/Makefile b/Makefile
index 38065ff9a697..1d878b801660 100644
--- a/Makefile
+++ b/Makefile
@@ -228,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) --no-print-directory gdb_merge
+#	@$(MAKE) --no-print-directory extensions
 
 gdb_merge: force
 	@if [ ! -f ${GDB}/README ]; then \
-	  make 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 CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
-	else make 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
@@ -252,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 CRASH_TARGET=${TARGET}) \
-	else (cd ${GDB}/gdb; make CRASH_TARGET=${TARGET}); fi
+	  $(MAKE) CRASH_TARGET=${TARGET}) \
+	else (cd ${GDB}/gdb; $(MAKE) CRASH_TARGET=${TARGET}); fi
 
 gdb_unzip:
 	@rm -f gdb.files
@@ -265,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 gdb_patch
+	@$(MAKE) gdb_patch
 
 gdb_patch:
 	if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
@@ -276,7 +276,7 @@ library: make_build_data ${OBJECT_FILES}
 
 gdb: force
 	rm -f ${GDB_OFILES}
-	@make all
+	@$(MAKE) all
 
 force:
 	
@@ -287,12 +287,12 @@ make_configure: force
 
 clean: make_configure
 	@./configure ${CONF_TARGET_FLAG} -q -b
-	@make do_clean
+	@$(MAKE) do_clean
 
 do_clean:
 	rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES}
-	@make -C extensions -i clean
-	@make -C memory_driver -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}
@@ -307,31 +307,31 @@ unconfig: make_configure
 
 warn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -w -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 Warn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -W -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 nowarn: make_configure
 	@./configure ${CONF_TARGET_FLAG} -n -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 lzo: make_configure
 	@./configure -x lzo ${CONF_TARGET_FLAG} -w -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 snappy: make_configure
 	@./configure -x snappy ${CONF_TARGET_FLAG} -w -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 zstd: make_configure
 	@./configure -x zstd ${CONF_TARGET_FLAG} -w -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 valgrind: make_configure
 	@./configure -x valgrind ${CONF_TARGET_FLAG} -w -b
-	@make gdb_merge
+	@$(MAKE) gdb_merge
 
 main.o: ${GENERIC_HFILES} main.c
 	${CC} -c ${CRASH_CFLAGS} main.c ${WARNING_OPTIONS} ${WARNING_ERROR} 
@@ -537,7 +537,7 @@ bpf.o: ${GENERIC_HFILES} bpf.c
 	${CC} -c ${CRASH_CFLAGS} bpf.c ${WARNING_OPTIONS} ${WARNING_ERROR}
 
 ${PROGRAM}: force
-	@make all
+	@$(MAKE) all
 
 # Remote daemon functionality has been deprecated.
 daemon_deprecated: force
@@ -546,15 +546,15 @@ daemon_deprecated: force
 
 ${PROGRAM}d: daemon_deprecated make_configure
 	@./configure -d
-	@make make_build_data
-	@make 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 show_files
+	@$(MAKE) show_files
 
 gdb_files: make_configure
 	@./configure -q -b
@@ -571,7 +571,7 @@ ctags:
 
 tar: make_configure
 	@./configure -q -b
-	@make do_tar
+	@$(MAKE) do_tar
 
 do_tar:
 	@if [ -f ${PROGRAM}  ]; then \
@@ -586,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 release_configure
+	@$(MAKE) release_configure
 	@echo 
 	@echo "cvs tag this release if necessary"
 
@@ -594,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 do_release
+	@$(MAKE) do_release
 
 do_release:
 	@echo "CRASH VERSION: ${VERSION}  GDB VERSION: ${GDB}"
@@ -636,7 +636,7 @@ do_release:
 	fi
 
 ref:
-	make ctags cscope
+	$(MAKE) ctags cscope
 
 cscope:
 	rm -f cscope.files cscope_out
@@ -658,10 +658,10 @@ dis:
 
 extensions: make_configure
 	@./configure ${CONF_TARGET_FLAG} -q -b
-	@make do_extensions
+	@$(MAKE) do_extensions
 
 do_extensions:
-	@make -C extensions -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 
-	@make -C memory_driver -i
+	@$(MAKE) -C memory_driver -i
-- 
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