kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled

$tmpdir/lib is created by "make modules_install". It does not exist
if CONFIG_MODULES is disabled, then tar reports the following messages:

tar: lib: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

+3 -2
+3 -2
scripts/package/buildtar
··· 51 51 # 52 52 rm -rf -- "${tmpdir}" 53 53 mkdir -p -- "${tmpdir}/boot" 54 - 54 + dirs=boot 55 55 56 56 # 57 57 # Try to install modules 58 58 # 59 59 if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then 60 60 make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install 61 + dirs="$dirs lib" 61 62 fi 62 63 63 64 ··· 130 129 if tar --owner=root --group=root --help >/dev/null 2>&1; then 131 130 opts="--owner=root --group=root" 132 131 fi 133 - tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}" 132 + tar cf - -C "$tmpdir" $dirs $opts | ${compress} > "${tarball}${file_ext}" 134 133 ) 135 134 136 135 echo "Tarball successfully created in ${tarball}${file_ext}"