When the gdb-<version>.patch file has changed and a rebuild is

done from within a previously-existing build tree, the "patch -N"
option is used to ignore patches that have been previously applied;
this patch also applies the "patch -r-" option to prevent unnecessary
.rej files from being created.
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2015-03-03 14:20:28 -05:00
parent 88cb8e194f
commit 6e74d3e24f

View File

@ -243,7 +243,7 @@ rebuild:
touch ${GDB}/${GDB}.patch; fi
@if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ] && \
[ "`sum ${GDB}.patch`" != "`sum ${GDB}/${GDB}.patch`" ]; then \
(patch -N -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; cd ${GDB}; \
(patch -N -p0 -r- < ${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