== Understanding the Makefile in the Documentation Tree
-There is only one [.filename]#Makefile# in the [.filename]#documentation# and other in the [.filename]#website#. Both are pretty similar.
+There are three [.filename]#Makefile# files for building some or all of the documentation project.
+
+* The [.filename]#Makefile# in the [.filename]#documentation# directory will build only the documentation.
+* The [.filename]#Makefile# in the [.filename]#website# directory will build only the website.
+* The [.filename]#Makefile# at the top of the tree will build both the documentation and the website.
+
+The [.filename]#Makefile# appearing in subdirectories also support `make run` to serve built content with Hugo's internal webserver. This webserver runs on port 1313 by default.
[[documentation-makefile]]
=== Documentation Makefile
-This [.filename]#Makefile# take the form of:
+This [.filename]#Makefile# takes the following form:
[source,bash]
....
# Generate the FreeBSD documentation
#
-# Copyright (c) 2020-2021 The FreeBSD Documentation Project
+# Copyright (c) 2020-2021, The FreeBSD Documentation Project
<.> `PYTHON_CMD` flag specifies the location of the Python binary.
<.> `HUGO_CMD` flag specifies the location of the Hugo binary.
<.> `LANGUAGES` flag specifies in which languages the table of contents has to be generated.
-<.> `all` target generate the books TOCs and run the documentation in the Hugo local webserver.
-<.> `generate` target generate the books TOCs and build the documentation in the [.filename]#~/doc/documentation/public# folder. The content of this folder should be placed in a HTTP server like nginx.
+<.> `.ORDER` directives are used to ensure multiple make jobs may run without problem.
+<.> `all` target generate the books TOCs, builds the documentation and puts the result in [.filename]#~/doc/documentation/public#.
<.> `starting-message` shows a message in the CLI to show the user that the process is running.
<.> `generate-books-toc` calls the scripts to generate the books TOCs.
<.> `run` runs hugo webserver in a random free port.
@@ -153,43 +180,53 @@
....
# Generate the FreeBSD website
#
-# Copyright (c) 2020-2021 The FreeBSD Documentation Project
+# Copyright (c) 2020-2021, The FreeBSD Documentation Project
<.> The `MAINTAINER` flag specifies who is the maintainer of this Makefile.
<.> `PYTHON_CMD` flag specifies the location of the Python binary.
<.> `HUGO_CMD` flag specifies the location of the Hugo binary.
-<.> `all` target generate the books TOCs and run the website in the Hugo local webserver.
-<.> `generate` target generate the books TOCs and build the website in the [.filename]#~/doc/website/public# folder. The content of this folder should be placed in a HTTP server like nginx.
+<.> `.ORDER` directives are used to ensure multiple make jobs may run without problem.
+<.> `all` target generate the books TOCs, builds the documentation and puts the result in [.filename]#~/doc/website/public#.
<.> `starting-message` shows a message in the CLI to show the user that the process is running.
<.> `generate-releases` calls the script used to convert from AsciiDoc variables to TOML variables. With this conversion, the releases variables can be used in AsciiDoc and in the Hugo custom templates.
-<.> `run` runs hugo webserver in a random free port.
+<.> `run` runs hugo webserver on a random free port.
<.> `build` builds the website and puts the result in the [.filename]#~/doc/website/public#.