anchor.diff:      lists:foldl(
         fun (File, Acc) ->
                 Basename = bname(File, ".erl"),
  -              log("Generating XML - ~s~n", [Basename]),
  +              DestFile = filename:join([Dest,Basename]) ++ ".xml",
  +              log("Generating XML - ~s ~p -> ~p\n", [Basename,File,DestFile]),
                 AbsInclude = filename:dirname(File) ++ "/../include",
  -              Options = [{includes,[AbsInclude|AppDirIncludes]} | Opts],
  +              Options = [ {includes, [AbsInclude | AppDirIncludes]}
  +                        , {dir, filename:dirname(DestFile)}
  +                        | Opts],
                 case (catch edoc:file(File, Options)) of
                     ok ->
  -                      [filename:join([Dest,Basename]) ++ ".xml" | Acc];
  +                      [DestFile | Acc];
                     Error ->
                         log("Error generating XML (~p): ~p~n", [File, Error]),
                         Acc
  
positive.code:      pmapreduce(Map, fun lists:append/2, [], Files) ++ Index].
  
  build_file_map (Conf, AppName, File) ->
      log("Generating HTML - ~s~n", [bname(File, ".xml")]),
      {Type, _Attr, Content} = read_xml(Conf, File),
  
      TypeSpecsFile = filename:join([dest(Conf), ".xml", "specs_" ++ bname(File)]),
  
negative.code:             _ ->                    "./priv/bin/specs_gen__R15_and_above.escript "
          end,
      [ begin
            log("Generating Type Specs - ~p\n", [File]),
            Args = "-I" ++ AppDir ++ "/include -o" ++ SpecsDest ++ " " ++ File,
            os:cmd(SpecsGenEscript ++ Args)
        end || File <- ErlFiles],
  