libdir:=Directory("~/gap/HAPcryst/HAPcryst/lib");
docdir:=Directory("~/gap/HAPcryst/HAPcryst/doc");
docdir2libdir:="../lib/";
lscommand:=Filename(Directory("/bin/"),"ls");

main := "HAPcryst.xml";  #the main documentation file
bookname := "HAPcryst";  


files:=[];
stdout:=OutputTextString(files,false);
stdin:=InputTextNone();;
Process( libdir, lscommand , stdin, stdout, [] );
files:=Set(SplitString(files,"\n"));
SubtractSet(files,Filtered(files,f->'~' in f));
Apply(files,f->Concatenation([docdir2libdir,f]));

MakeGAPDocDoc(docdir,main,files,bookname);
QUIT;
