Patch git checkouts, if a patch exists for a module. Add a per-module clean target.

This commit is contained in:
Trammell Hudson 2017-01-31 11:56:14 -05:00 committed by Trammell Hudson
parent 2f2d68755f
commit bac717407f
Failed to extract signature

View File

@ -71,6 +71,10 @@ define define_module =
# this case, since we don't have a stable version to compare against.
$(build)/$($1_dir)/.canary:
git clone "$($1_repo)" "$(build)/$($1_dir)"
if [ -r patches/$1.patch ]; then \
( cd $(build)/$($1_dir) ; patch -p1 ) \
< patches/$1.patch; \
fi
touch "$$@"
else
# Fetch and verify the source tar file
@ -122,6 +126,10 @@ define define_module =
$(build)/$($1_dir)/.configured
$(MAKE) -C "$(build)/$($1_dir)" $($1_target)
$1.clean:
-$(RM) "$(build)/$($1_dir)/.configured
-$(MAKE) -C "$(build)/$($1_dir)" clean
.INTERMEDIATE: $1.intermediate
endef