This way we can use multiple jobs to build crash.
Signed-off-by: Sven Schnelle <svens(a)linux.ibm.com>
---
Makefile | 60 ++++++++++++++++++++++-----------------------
extensions/Makefile | 4 +--
gdb-10.2.patch | 2 +-
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/Makefile b/Makefile
index 5a33e70b8b83..adb9d558326d 100644
--- a/Makefile
+++ b/Makefile
@@ -228,20 +228,20 @@ endif
all: make_configure
@./configure ${CONF_TARGET_FLAG} -p "RPMPKG=${RPMPKG}" -b
- @make gdb_merge
-# @make extensions
+ @$(MAKE) gdb_merge
+# @$(MAKE) 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
diff --git a/extensions/Makefile b/extensions/Makefile
index 2894b9aa5a08..bd0fed762f9a 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -34,7 +34,7 @@ defs.h:
$(CONTRIB_SO): %.so: %.c defs.h
@if [ -f $*.mk ]; then \
- make -f $*.mk; \
+ $(MAKE) -f $*.mk; \
else \
grep '((constructor))' $*.c > .constructor; \
if [ -s .constructor ]; then \
@@ -51,5 +51,5 @@ $(CONTRIB_SO): %.so: %.c defs.h
clean:
rm -f $(CONTRIB_SO)
@for MAKEFILE in `grep -sl "^clean:" *.mk`; \
- do make -f $$MAKEFILE clean; \
+ do $(MAKE) -f $$MAKEFILE clean; \
done
diff --git a/gdb-10.2.patch b/gdb-10.2.patch
index 1280d0688e83..afdbe99eae0d 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)
-+ @make -C ../.. 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