anchor.diff:                        Undefs),
       %% diameter_tcp does call ssl despite the latter not being listed
       %% as a dependency in the app file since ssl is only required for
  -    %% TLS security: it's up to a client who wants TLS it to start
  -    %% ssl.
  -
  -    %% Ensure that compiler modules don't call runtime modules.
  -    [] = lists:filter(fun nok_compiler_dependency/1, CTdeps),
  +    %% TLS security: it's up to a client who wants TLS to start ssl.
  +
  +    %% Ensure that only runtime or info modules call runtime modules.
  +    %% It's not strictly necessary that diameter compiler modules not
  +    %% depend on other diameter modules but it's a simple source of
  +    %% build errors if not properly encoded in the makefile so guard
  +    %% against it.
  +    [] = (RTmods -- Mods) -- ?INFO_MODULES,
  +
  +    %% Ensure that runtime modules don't call compiler modules.
  +    CTmods = CTmods -- Mods,
   
       %% Ensure that runtime modules only call other runtime modules, or
       %% applications declared as in runtime_dependencies in the app
       %% file. Note that the declared application versions are ignored
       %% since we only know what we can see now.
  -    [] = lists:filter(fun(M) -> not ok_runtime_dependency(M, Mods, Deps) end,
  -                      RTdeps).
  +    [] = lists:filter(fun(M) -> not lists:member(app(M), Deps) end,
  +                      RTdeps -- Mods).
   
   unversion(App) ->
       T = lists:dropwhile(fun is_vsn_ch/1, lists:reverse(App)),
  
positive.code: %% # modules/1
  %%
  %% Ensure that the app file modules and installed modules differ by
  %% compiler/help modules.
  %% ===========================================================================
  
  modules(Config) ->
      Mods = fetch(modules, fetch(app, Config)),
      Installed = code_mods(),
      Help = lists:sort(?HELP_MODULES ++ ?COMPILER_MODULES),
  
      {[], Help} = {Mods -- Installed, lists:sort(Installed -- Mods)}.
  
  
negative.code:                        [?APP, erts | fetch(applications, App)]),
  
      {ok, Undefs} = xref:analyze(XRef, undefined_function_calls),
      {ok, RTmods} = xref:analyze(XRef, {module_use, Mods}),
      {ok, CTmods} = xref:analyze(XRef, {module_use, ?COMPILER_MODULES}),
      {ok, RTdeps} = xref:analyze(XRef, {module_call, Mods}),
  
      xref:stop(XRef),
  