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
This commit is contained in:
Bart Van Assche
2009-10-15 07:14:54 +00:00
parent c031d72333
commit b9528d1407

View File

@@ -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()