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