scripts: Merge r3737:4204 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4205 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2012-04-12 11:50:41 +00:00
parent b3d8507430
commit 3535eada10
5 changed files with 78 additions and 2480 deletions

View File

@@ -211,12 +211,21 @@ fi
# Strip patch level from the kernel version number.
kver="$(kernel_version "$1")"
# Include fcst in the patch for kernel versions 2.6.33 and later.
if [ "${kver}" ">" "2.6.32" ]; then
include_fcst="true"
else
include_fcst="false"
fi
# Make sure that for kernel 2.6.33 and later the line
# "#define CONFIG_SCST_PROC" is removed from scst/include/scst.h.
if grep -qw scst_sysfs scst/kernel/in-tree/Makefile.scst-${kver} \
|| [ "${generating_upstream_patch}" = "true" ];
then
specialize_patch_options="${specialize_patch_options} -v config_scst_proc_undefined=1"
else
include_proc_impl="true"
fi
if [ "${debug_specialize}" = "true" ]; then
specialize_patch_options="${specialize_patch_options} -v debug=1"
@@ -288,7 +297,7 @@ scst_13_vdisk="scst/src/dev_handlers/scst_vdisk.c"
scst_14_tg="scst/src/scst_tg.c"
separate_patches="scst_03_public_headers scst_04_main scst_05_targ scst_06_lib scst_07_pres scst_08_sysfs scst_09_debug scst_10_sgv scst_user scst_13_vdisk scst_14_tg"
if [ "${generating_upstream_patch}" = "false" ]; then
if [ "$include_proc_impl" = "true" ]; then
separate_patches+=" scst_proc"
fi
source_files_in_separate_patch=""
@@ -319,7 +328,7 @@ mkdir -p "${tmpdir}"
tmp_Kconfig="${tmpdir}/Kconfig.scst-${kver}"
cat "scst/kernel/in-tree/Kconfig.scst" | \
if [ -e "${fcst_patch_series}" ]; then
if [ "${include_fcst}" ]; then
cat
else
grep -v '^source "drivers/scst/fcst/Kconfig"$'
@@ -328,12 +337,12 @@ add_file "${tmp_Kconfig}" "drivers/scst/Kconfig"
tmp_Makefile="${tmpdir}/Makefile.scst-${kver}"
cat "scst/kernel/in-tree/Makefile.scst-${kver}" | \
if [ "${generating_upstream_patch}" = "true" ]; then
if [ "$include_proc_impl" != "true" ]; then
grep -v 'scst_proc'
else
cat
fi | \
if [ -e "${fcst_patch_series}" ]; then
if [ "${include_fcst}" -a "${kver}" != "2.6.37" -a "${kver}" != "2.6.38" ]; then
cat
else
sed -e 's: fcst/* : :'