Skip to content

Commit a441af7

Browse files
committed
Merge branch 'maint'
2 parents 291b055 + d33e1a5 commit a441af7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

system/doc/top/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ man_index.md: src/otp_man_index.beam $(wildcard $(ERL_TOP)/erts/ebin/*.beam) $(w
8181

8282
core/erts.md: Makefile | core
8383
$(gen_verbose)echo "# erts" > $@
84+
85+
MISSING_APP_DISCLAIMER="The documentation for this application was not generated because the application was skipped during the source build."
8486
%.md: Makefile | core database oam interfaces tools testing documentation
8587
$(gen_verbose)APP=$(basename $(notdir $@)) && \
86-
echo "# $${APP}" > $@
88+
echo "# $${APP}\n\n$(MISSING_APP_DISCLAIMER)\n" > $@
8789

8890
HTML_DEPS=README.md man_index.md ../guides $(REDIRECTS)
8991
EPUB=false

system/doc/top/docs.exs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,26 @@ system_guides =
2525
line |> String.split(":") |> Enum.at(0)
2626
end)
2727

28+
# Root /configure creates artifact /lib/SKIP-APPLICATIONS containing all apps
29+
# not built for various reasons. We can't build documentation for them either.
30+
skipped_apps_from_file =
31+
with erl_top when is_binary(erl_top) <- System.get_env("ERL_TOP"),
32+
skip_path <- Path.join([erl_top, "lib", "SKIP-APPLICATIONS"]),
33+
true <- File.exists?(skip_path),
34+
{:ok, content} <- File.read(skip_path) do
35+
content
36+
|> String.split(~r/\s+/, trim: true)
37+
|> Enum.map(&String.downcase/1)
38+
|> MapSet.new()
39+
else
40+
_ -> MapSet.new()
41+
end
42+
2843
apps =
2944
Path.wildcard("{core,database,oam,interfaces,tools,testing,documentation}/*.md")
3045
|> Enum.map(&Path.basename/1)
3146
|> Enum.map(&Path.rootname/1)
47+
|> Enum.reject(fn app -> skipped_apps_from_file |> MapSet.member?(app) end)
3248

3349
redirects =
3450
Enum.map(apps, fn

0 commit comments

Comments
 (0)