From 586ab2f54767ffc750bcad1e3f3fba5cbb409de2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 11 Jul 2014 06:48:49 +0000 Subject: [PATCH] scripts/generate-kernel-patch: Also generate scst-itf-ver.h git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5673 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/generate-kernel-patch | 36 ++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index cc95d7a67..741ec4855 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -373,18 +373,32 @@ rm -rf "${tmpdir}" for s in ${separate_patches} do - fileset=$s - for f in $(set | grep "^$s=" | sed -e "s/^$s='\(.*\)'\$/\1/" -e "s/^$s=\(.*\)\$/\1/") - do - if [ "${f#scst/include}" != "${f}" ]; then - add_file "${f}" "include/scst/${f#scst/include/}" - elif [ "${f#doc}" != "${f}" ]; then - add_file "${f}" "Documentation/scst/${f#doc/}" - else - add_file "${f}" "drivers/scst/${f#scst/src/}" + { + fileset=$s + for f in $(set | grep "^$s=" | sed -e "s/^$s='\(.*\)'\$/\1/" -e "s/^$s=\(.*\)\$/\1/") + do + if [ "${f#scst/include}" != "${f}" ]; then + add_file "${f}" "include/scst/${f#scst/include/}" + elif [ "${f#doc}" != "${f}" ]; then + add_file "${f}" "Documentation/scst/${f#doc/}" + else + add_file "${f}" "drivers/scst/${f#scst/src/}" + fi + done + if [ "$s" = "scst_03_public_headers" ]; then + tmp_itf_ver="$(mktemp /tmp/scst-itf-ver.h.XXXXXXXXXX)" + cat <<"EOF" >$tmp_itf_ver +/* Autogenerated, don't edit */ + +#define SCST_INTF_VER "SCST_INTF_VER" +#define SCST_CONST_INTF_VER "SCST_CONST_INTF_VER" +#define DEV_USER_INTF_VER "DEV_USER_INTF_VER" +EOF + add_file "$tmp_itf_ver" "include/scst/scst_itf_ver.h" + rm -f "$tmp_itf_ver" fi - done \ - | process_patch "${s}.diff" + } | + process_patch "${s}.diff" done {