|
Lines 18-37
Link Here
|
| 18 |
# will only appear in one of patch file. |
18 |
# will only appear in one of patch file. |
| 19 |
# 2) It's possible that trailing garbage at the end of a patch in a |
19 |
# 2) It's possible that trailing garbage at the end of a patch in a |
| 20 |
# multipatch file might corrupt the comment (or be interpreted as |
20 |
# multipatch file might corrupt the comment (or be interpreted as |
| 21 |
# a comment) of the following patch. (garbage in, garbage out) |
21 |
# a comment) of the following patch. (garbage in, garbage out) |
| 22 |
# |
22 |
# |
| 23 |
# Reminder |
23 |
# Reminder |
| 24 |
# Don't forget to disable post-patch targets before regenerating patches |
24 |
# Don't forget to disable post-patch targets before regenerating patches |
| 25 |
# if those targets modify source files (e.g. with sed). You may also |
25 |
# if those targets modify source files (e.g. with sed). You may also |
| 26 |
# want to disable EXTRA_PATCHES as well if that is being used. |
26 |
# want to disable EXTRA_PATCHES as well if that is being used. |
| 27 |
|
27 |
|
|
|
28 |
set pipefail |
| 29 |
|
| 28 |
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x |
30 |
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x |
| 29 |
|
31 |
|
| 30 |
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then |
32 |
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then |
| 31 |
echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2 |
33 |
echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2 |
| 32 |
exit 1 |
34 |
exit 1 |
| 33 |
fi |
35 |
fi |
| 34 |
|
36 |
|
| 35 |
WORKAREA=${WRKDIR}/.makepatch-tmp |
37 |
WORKAREA=${WRKDIR}/.makepatch-tmp |
| 36 |
PATCHMAP=${WORKAREA}/pregen.map |
38 |
PATCHMAP=${WORKAREA}/pregen.map |
| 37 |
COMMENTS=${WORKAREA}/comments |
39 |
COMMENTS=${WORKAREA}/comments |