From b9528d14074f9b9808035e227d3dcb1d834e6edf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 15 Oct 2009 07:14:54 +0000 Subject: [PATCH] Added variable generating_upstream_patch_defined. When set to 1, this variable tells the script specialize-patch to treat the preprocessor symbol GENERATING_UPSTREAM_PATCH as defined. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1218 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 1f560ef55..cd9467b5b 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -105,6 +105,12 @@ function evaluate(stmnt) { gsub("defined *\\( *SCST_IO_CONTEXT *\\)", SCST_IO_CONTEXT, stmnt) } + if (generating_upstream_patch_defined) + { + gsub("defined *GENERATING_UPSTREAM_PATCH", 1, stmnt) + gsub("defined *\\( *GENERATING_UPSTREAM_PATCH *\\)", 1, stmnt) + } + do { last_stmnt = stmnt @@ -192,6 +198,7 @@ function handle_if() || $0 ~ "RHEL_MAJOR" \ || $0 ~ "RHEL_MINOR" \ || $0 ~ "RHEL_RELEASE_CODE" \ + || $0 ~ "GENERATING_UPSTREAM_PATCH" \ || $0 ~ "SCSI_EXEC_REQ_FIFO_DEFINED" \ || $0 ~ "SCST_IO_CONTEXT") { @@ -325,6 +332,8 @@ BEGIN { } if (delete_disabled_code != 0 && delete_disabled_code != 1) delete_disabled_code = 0 + if (generating_upstream_patch_defined != 0 && generating_upstream_patch_defined != 1) + generating_upstream_patch_defined = 0 # Variable initialization. reset_hunk_state_variables()