• Jessica Yu's avatar
    scripts/nsdeps: use alternative sed delimiter · 09684950
    Jessica Yu authored
    When doing an out of tree build with O=, the nsdeps script constructs
    the absolute pathname of the module source file so that it can insert
    MODULE_IMPORT_NS statements in the right place. However, ${srctree}
    contains an unescaped path to the source tree, which, when used in a sed
    substitution, makes sed complain:
    
    ++ sed 's/[^ ]* *//home/jeyu/jeyu-linux\/&/g'
    sed: -e expression #1, char 12: unknown option to `s'
    
    The sed substitution command 's' ends prematurely with the forward
    slashes in the pathname, and sed errors out when it encounters the 'h',
    which is an invalid sed substitution option. To avoid escaping forward
    slashes ${srctree}, we can use '|' as an alternative delimiter for
    sed instead to avoid this error.
    Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    Reviewed-by: default avatarMatthias Maennich <maennich@google.com>
    Tested-by: default avatarMatthias Maennich <maennich@google.com>
    Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
    09684950
nsdeps 1.93 KB