Exclude fcst from the sparse test build if the fcst patch series file is missing.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1929 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-08-04 07:43:57 +00:00
parent 359cdf786a
commit a24bd6962a

View File

@@ -214,6 +214,13 @@ else
kernel_version="$1"
fi
for f in fcst/linux-patches/series-${kernel_version}*
do
if [ -e "$f" ]; then
fcst_patch_series="$f"
fi
done
# Hack: make sure that for kernel 2.6.33 and later the line
# "#define CONFIG_SCST_PROC" is removed from scst/include/scst.h.
# This is done because of the following change in r1609:
@@ -292,9 +299,28 @@ add_patch "scst/kernel/in-tree/Makefile.drivers.Linux-${kernel_version}.patch"\
# Directory drivers/scst/
(
add_file "scst/kernel/in-tree/Kconfig.scst" "drivers/scst/Kconfig"
tmpdir="/tmp/scst-$$"
mkdir -p "${tmpdir}"
add_file "scst/kernel/in-tree/Makefile.scst-${kernel_version}" "drivers/scst/Makefile"
tmp_Kconfig="${tmpdir}/Kconfig.scst-${kernel_version}"
cat "scst/kernel/in-tree/Kconfig.scst" | \
if [ -e "${fcst_patch_series}" ]; then
cat
else
grep -v '^source "drivers/scst/fcst/Kconfig"$'
fi >"${tmp_Kconfig}"
add_file "${tmp_Kconfig}" "drivers/scst/Kconfig"
tmp_Makefile="${tmpdir}/Makefile.scst-${kernel_version}"
cat "scst/kernel/in-tree/Makefile.scst-${kernel_version}" | \
if [ -e "${fcst_patch_series}" ]; then
cat
else
sed -e 's: fcst/* : :'
fi >"$tmp_Makefile"
add_file "$tmp_Makefile" "drivers/scst/Makefile"
rm -rf "${tmpdir}"
for f in $(ls scst/src/*.[ch] 2>/dev/null)
do
@@ -355,7 +381,7 @@ done
# Directory drivers/scst/fcst/
{
for f in $(grep -v '^#' fcst/linux-patches/series-${kernel_version}*)
for f in $(grep -v '^#' "${fcst_patch_series}")
do
cat "fcst/linux-patches/${f}"
done