# problem to automatically generate a glossary by XeLaTeX

I want to generate a glossary at the end of a document automatically, but the following code did not work. In fact no glossary was created. I am using XeLaTeX to compile a tex file in Mac TexLive environment.

Here is the code:

\documentclass[oneside, a4paper,12pt]{book}

\usepackage[xindy]{glossaries}
\makeglossaries

\begin{document}
\include{glossary}

He has a \gls{computer}.

\appendix
\bibliographystyle{plainnat}
\bibliography{bibtex}
\printglossaries
\end{document}


The glossary.tex file contains:

\newglossaryentry{computer}
{
name=computer,
description={is a programmable machine that receives input, and provides output in a useful format}
}


-