From 99c6fe660ff528b1f7df5bd9d52ab9490bf02cdc Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Fri, 7 Feb 2014 21:16:15 -0700 Subject: [PATCH] Provide a Makefile option to change the patching tool. --- patches/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/Makefile b/patches/Makefile index 1c00af1d..ecda4db4 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -1,10 +1,12 @@ +PATCH:=patch -N -p0 --strip=1 + install: # Apply our patches to Wine for DIR in $$(find $(CURDIR) -type d | sort); do \ for FILE in $$(ls $$DIR | sort | grep '\.patch$$'); do \ SHORTNAME=$$(echo "$$DIR/$$FILE" | sed 's|$(CURDIR)|\.|g' ); \ printf "Applying patch '$$SHORTNAME'...\n"; \ - patch -d $(DESTDIR) -N -p0 --strip=1 < $$DIR/$$FILE || cat || exit 1; \ + cd $(DESTDIR); $(PATCH) < $$DIR/$$FILE || cat || exit 1; \ done \ done @@ -20,7 +22,7 @@ uninstall: for FILE in $$(ls $$DIR | sort -r | grep '\.patch$$'); do \ SHORTNAME=$$(echo "$$DIR/$$FILE" | sed 's|$(CURDIR)|\.|g' ); \ printf "Reversing patch '$$SHORTNAME'...\n"; \ - patch -d $(DESTDIR) -R -N -p0 --strip=1 < $$DIR/$$FILE || exit 1; \ + cd $(DESTDIR); $(PATCH) -R < $$DIR/$$FILE || exit 1; \ done \ done