Skip to content

Commit

Permalink
Exit if patch fails to apply (issue #429)
Browse files Browse the repository at this point in the history
  • Loading branch information
osresearch committed Jul 17, 2018
1 parent 584c070 commit 22b1241
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,16 @@ define define_module =
git clone $($1_repo) "$(build)/$($1_base_dir)"
if [ -r patches/$1.patch ]; then \
( cd $(build)/$($1_base_dir) ; patch -p1 ) \
< patches/$1.patch; \
< patches/$1.patch \
|| exit 1 ; \
fi
if [ -d patches/$1 ] && \
[ -r patches/$1 ] ; then \
for patch in patches/$1/*.patch ; do \
echo "Applying patch file : $$$$patch " ; \
( cd $(build)/$($1_base_dir) ; patch -p1 ) \
< $$$$patch ; \
< $$$$patch \
|| exit 1 ; \
done ; \
fi
@touch "$$@"
Expand All @@ -243,14 +245,16 @@ define define_module =
tar -xf "$(packages)/$($1_tar)" -C "$(build)"
if [ -r patches/$1-$($1_version).patch ]; then \
( cd $(build)/$($1_base_dir) ; patch -p1 ) \
< patches/$1-$($1_version).patch; \
< patches/$1-$($1_version).patch \
|| exit 1 ; \
fi
if [ -d patches/$1-$($1_version) ] && \
[ -r patches/$1-$($1_version) ] ; then \
for patch in patches/$1-$($1_version)/*.patch ; do \
echo "Applying patch file : $$$$patch " ; \
( cd $(build)/$($1_base_dir) ; patch -p1 ) \
< $$$$patch ; \
< $$$$patch \
|| exit 1 ; \
done ; \
fi
@touch "$$@"
Expand Down

0 comments on commit 22b1241

Please sign in to comment.