function git_install_manpages() {
  for FF in man*; do
    cp -ra $FF $INSTALL_ROOT/usr/share/man
  done
}

function git_install_htmldocs() {
  local GIT_HTML                                &&
  GIT_HTML=$INSTALL_ROOT/usr/share/doc/git/html &&
  mkdir -p $GIT_HTML                            &&
  cp -a *.html howto $GIT_HTML
}

make  HOME="$INSTALL_ROOT/usr"  install  &&

case $GIT_DOC in
  manpages)
    git_install_manpages
  ;;
  htmldocs)
    git_install_htmldocs
  ;;
  both)
    git_install_manpages &&
    git_install_htmldocs
  ;;
esac
