From patchwork Sun Oct 9 06:57:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16725 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id C1B9482438; Sun, 9 Oct 2016 08:57:50 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=OI976goH; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 3257E822B4 for ; Sun, 9 Oct 2016 08:57:44 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593CA60F90000000000002E17.dip0.t-ipconnect.de [IPv6:2003:c5:93ca:60f9::2e17]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id A626D1100A9 for ; Sun, 9 Oct 2016 08:57:43 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1475996263; bh=mC634sOFCNJsBa7M/UwCUyEYmbSJTa5NsIxP2bpA41M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OI976goHG+ZAxatoLRXnqtvGHBoNL2fFvY2iA1YFnuSglSkt2eEMp/pzr91JNMKyf Y18Jv65I143f9tUbZ+iNMIiu0OWI4A3PEB/k0YQDC2e3UZGYpF/9dl4KIYGGPrTysV 4AGNrENxzqNyPXH4/i8egYF2aAHU9+uvWGc/TBxc= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 9 Oct 2016 08:57:29 +0200 Message-Id: <20161009065738.8279-2-sven@narfation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <1647833.jYley1tZnH@sven-edge> References: <1647833.jYley1tZnH@sven-edge> Subject: [B.A.T.M.A.N.] [PATCH next v2 02/11] batman-adv: Use simple script to patch minor compat problems X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Unified diff base patches have the problem that they fix only a single line and depend on the surrounding. This approach can fail relative often when the surrounding code will be changed often. Thus semantic patches (like spatch from coccinelle) or simple find+replace scripts are better for this approach. Introduce a simple script file which will store these kind of find+replace instructions. Signed-off-by: Sven Eckelmann --- v2: - no change --- Makefile | 3 ++- compat-patches/replacements.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 compat-patches/replacements.sh diff --git a/Makefile b/Makefile index b105290..7ef2569 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ install: config $(SOURCE_STAMP) config: $(PWD)/gen-compat-autoconf.sh $(PWD)/compat-autoconf.h -$(SOURCE_STAMP): $(SOURCE) compat-patches/* +$(SOURCE_STAMP): $(SOURCE) compat-patches/* compat-patches/replacements.sh $(MKDIR) $(BUILD_DIR)/net/batman-adv/ @$(RM) $(SOURCE_BUILD) @$(CP) $(SOURCE) $(BUILD_DIR)/net/batman-adv/ @@ -111,6 +111,7 @@ $(SOURCE_STAMP): $(SOURCE) compat-patches/* $(PATCH) ../compat-patches/$${i}; \ cd - > /dev/null; \ done + compat-patches/replacements.sh touch $(SOURCE_STAMP) .PHONY: all clean install config diff --git a/compat-patches/replacements.sh b/compat-patches/replacements.sh new file mode 100755 index 0000000..c7875c0 --- /dev/null +++ b/compat-patches/replacements.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +set -e