[Crash-utility] [PATCH v2 4/4] make: replace make by $(MAKE)
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Thu Dec 23 00:33:16 UTC 2021
Hi Sven,
thank you for the update.
-----Original Message-----
> 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)
When detecting any change of the gdb patch, it tries to re-apply the new one
using "patch -N --fuzz=0" in order to update the gdb. Please refer to
Makefile::rebuild and the head of the gdb-10.2.patch.
So I think that, to make a change to the gdb sources,
1. we have to "add" patches to the end of the gdb patch, and
2. if there are multiple patches for a gdb file, the "patch -N" doesn't work,
so we have to revert the gdb file to the original one.
(I will add this custom to crash guidelines later..)
In your patches, there are multiple patches for gdb-10.2/gdb/Makefile.in
so I would suggest that:
1. pack the 1/4, 3/4 and 4/4 patches into a patch, do the three things together.
2. add a hunk for the gdb-10.2/gdb/Makefile.in to the end of the gdb-10.2.patch.
3. add the following change to the head the gdb-10.2.patch.
--- a/gdb-10.2.patch
+++ b/gdb-10.2.patch
@@ -8,6 +8,11 @@
# shell script that can restore any gdb file to its original state prior
# to all subsequent patch applications.
+tar xvzmf gdb-10.2.tar.gz \
+ gdb-10.2/gdb/Makefile.in
+
+exit 0
+
(yeah, we forgot the "exit 0" here when moving to gdb-10.2..)
Thanks,
Kazu
More information about the Crash-utility
mailing list