Add ability to specify a series of patches per module

If a file $module_$version.series exists, it will be used to
specify a list of patch files to apply to the module.
This is becoming necessary for coreboot which has an increasing
amount of patches required and which makes it hard to maintain
all in one file.
This commit is contained in:
Youness Alaoui 2018-03-08 15:37:17 -05:00
parent 21a3059c5f
commit e7d4b88d39
No known key found for this signature in database
GPG Key ID: AAFC4B34BBEBB31C

View File

@ -190,6 +190,14 @@ define define_module =
( cd $(build)/$($1_dir) ; patch -p1 ) \
< patches/$1.patch; \
fi
if [ -d patches/$1 ] && \
[ -r patches/$1 ] ; then \
for patch in patches/$1/*.patch ; do \
echo "Applying patch file : $$$$patch " ; \
( cd $(build)/$($1_dir) ; patch -p1 ) \
< $$$$patch ; \
done ; \
fi
@touch "$$@"
else
# Fetch and verify the source tar file
@ -207,6 +215,14 @@ define define_module =
( cd $(build)/$($1_dir) ; patch -p1 ) \
< patches/$1-$($1_version).patch; \
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_dir) ; patch -p1 ) \
< $$$$patch ; \
done ; \
fi
@touch "$$@"
endif