Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
629c22b
update docs for building-hacks
myk002 Jul 18, 2022
19a4acc
update docs for bulidingplan
myk002 Jul 18, 2022
66b7bca
update docs for burrows
myk002 Jul 19, 2022
e3588cf
return entire tag data structure for iterating
myk002 Jul 20, 2022
ddcb9b4
add missing 'man' builtin
myk002 Jul 20, 2022
954e246
reformat builtins and properly read tags
myk002 Jul 20, 2022
1cad776
update formatting for plugin docs
myk002 Jul 20, 2022
0dd153c
ensure we pick up the plugin help entry
myk002 Jul 20, 2022
0fe4bed
document both burrow command and burrows plugin
myk002 Jul 20, 2022
ddd2e50
update docs for changeitem
myk002 Jul 20, 2022
fae5f06
update docs for changelayer
myk002 Jul 20, 2022
d3dd12c
update docs for changevein
myk002 Jul 20, 2022
1f3c4cd
update docs for cleanconst
myk002 Jul 20, 2022
048b20a
no help entries for non-enableable plugins
myk002 Jul 20, 2022
e9e477c
update docs for clean and spotclean
myk002 Jul 20, 2022
d9a1104
update docs for cleanowned
myk002 Jul 20, 2022
9dcb63d
don't bork on no frame, set cursor to end of text
myk002 Jul 20, 2022
0b88922
Merge remote-tracking branch 'upstream/develop' into docs
myk002 Jul 20, 2022
0a44ef7
Merge remote-tracking branch 'upstream/develop' into docs
myk002 Jul 20, 2022
68b8837
Replace docs/build*.sh with more flexible build.py
lethosor Jul 22, 2022
4b0b0e0
Update Documentation.rst for new workflow and output formats
lethosor Jul 22, 2022
5521a5a
Remove old build*.sh scripts
lethosor Jul 22, 2022
2ce7518
read plugin command docs from single plugin file
myk002 Jul 22, 2022
4b1696f
add '?' alias for help
myk002 Jul 22, 2022
b3679be
enable index building and update builtin docs
myk002 Jul 22, 2022
6b9803d
update docs up to the end of the b's
myk002 Jul 22, 2022
53cdf57
add missing digv label
myk002 Jul 22, 2022
3522b89
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2022
9c7731f
remove reference to dfhack.init-example
myk002 Jul 22, 2022
bd58158
get rid of tool TOC, use genindex
myk002 Jul 22, 2022
3175e8b
update tags and text for builtins
myk002 Jul 22, 2022
d637c87
ensure all plugins are indexed
myk002 Jul 22, 2022
b38ccfe
fix typo in automaterial docs
myk002 Jul 22, 2022
6a31b31
add structure for category indices
myk002 Jul 22, 2022
2fd6d52
move support docs to the intro page
myk002 Jul 22, 2022
6752025
fix up some index links
myk002 Jul 22, 2022
e8ffa55
use a label instead of a custom role
myk002 Jul 22, 2022
f9c8d36
mark the generated index as an orphan
myk002 Jul 22, 2022
47af2ef
exclude the generated included tags/ files
myk002 Jul 22, 2022
93923e1
no need to mark the included file as an orphan
myk002 Jul 22, 2022
19a4905
update docs for "c" plugins
myk002 Jul 22, 2022
65b3ce6
remove unattached docs and plugins
myk002 Jul 23, 2022
0858b95
print help from helpdb on CR_WRONG_USAGE
myk002 Jul 23, 2022
0f3811b
update debugfilter docs
myk002 Jul 23, 2022
675f2ed
update deramp docs
myk002 Jul 23, 2022
4cb57d2
update dig-now docs
myk002 Jul 23, 2022
a7346dd
add missing labels
myk002 Jul 23, 2022
5dde613
fix formatting errors
myk002 Jul 23, 2022
cb3e537
fix help message when trying to run a plugin name
myk002 Jul 23, 2022
3141ecb
remove cromulate. it has outlived its purpose
myk002 Jul 23, 2022
9b7cc61
don't create entries for non-enableable plugins
myk002 Jul 23, 2022
62523bd
update documentation for the documentation
myk002 Jul 23, 2022
c1a694c
Improve syntax highlighting in Documentation.rst
lethosor Jul 23, 2022
a94f3c3
fix some formatting
myk002 Jul 23, 2022
e427358
one fewer char per line so no horiz scrolling
myk002 Jul 23, 2022
9478898
update all docs I've done so far to new standards
myk002 Jul 23, 2022
3c92d4f
Fix typo
myk002 Jul 23, 2022
2ed9341
separate base command cnts from user command cnts
myk002 Jul 24, 2022
5f56d79
move dfhack.history to dfhack-config/dfhack.history
myk002 Jul 24, 2022
f9d4781
use dfhack-config/lua.history instead of lua.history
myk002 Jul 24, 2022
d1f690b
move liquids.history to dfhack-config/liquids.history
myk002 Jul 24, 2022
932f1c2
move tiletypes.history to dfhack-config/tiletypes.history
myk002 Jul 24, 2022
9dd62f2
update docs for dig
myk002 Jul 24, 2022
a567665
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2022
ca06d1d
update docs for dig (again)
myk002 Jul 24, 2022
60b5998
update docs for digFlood
myk002 Jul 25, 2022
b2ca3cb
update docs for diggingInvaders
myk002 Jul 25, 2022
d624e91
Fix missing newline
myk002 Jul 25, 2022
ac11cde
update docs for dwarfmonitor
myk002 Jul 25, 2022
91e3f67
update dwarfmonitor short description
myk002 Jul 25, 2022
595fb22
code block is not valid json
myk002 Jul 25, 2022
32e2ac2
update docs for dwarfvet
myk002 Jul 25, 2022
d94fef3
update docs for embark-assistant
myk002 Jul 25, 2022
02cc085
update docs for embark-tools
myk002 Jul 25, 2022
98ad22d
align remaining plugin docs to plugin names
myk002 Jul 25, 2022
4132dbd
remove docs for no-command, un-enableable plugin
myk002 Jul 25, 2022
6b1c0b5
rename building-hacks section
myk002 Jul 25, 2022
38c17b5
update docs for RemoteFortressReader
myk002 Jul 25, 2022
886289d
update docs for fix-armory
myk002 Jul 25, 2022
a6cb79c
remove defunct tool fix-armory
myk002 Jul 25, 2022
989befa
update docs for fastdwarf
myk002 Jul 25, 2022
ab9c3a0
add missing 'enable' usage for dwarfmonitor
myk002 Jul 25, 2022
2654de5
update docs for filltraffic
myk002 Jul 25, 2022
9c0bd6b
update docs for fix-unit-occupancy
myk002 Jul 25, 2022
ea3dfe3
update docs for fixveins
myk002 Jul 25, 2022
e13aae2
update docs for flows
myk002 Jul 25, 2022
20ccd3a
update docs for follow
myk002 Jul 25, 2022
82953d8
fix doc build errors
myk002 Jul 25, 2022
eb0f016
update docs for forceequip
myk002 Jul 25, 2022
367ac00
update docs for generated-creature-renamer
myk002 Jul 25, 2022
094f8d7
fix typos in forceequip cpp/docs
myk002 Jul 25, 2022
8cf7f59
wrap ls and tags output
myk002 Jul 26, 2022
b93e336
update docs for get plants
myk002 Jul 26, 2022
69d88a6
update docs for hotkeys
myk002 Jul 26, 2022
06fc84f
update docs for infiniteSky
myk002 Jul 26, 2022
4438134
add missing keybinding for infiniteSky
myk002 Jul 26, 2022
c88423e
remove docs for non-enableable, command-less plugin
myk002 Jul 26, 2022
0fae25f
Only write (most) generated rst files if they actually changed
lethosor Jul 27, 2022
a8b40c5
Drop Python 2 compat
lethosor Jul 27, 2022
6293b71
Revert "remove docs for non-enableable, command-less plugin"
myk002 Jul 27, 2022
671f10e
Fix write_file_if_changed() if target file does not exist
lethosor Jul 27, 2022
10f8417
create helpdb entries for all plugins
myk002 Jul 27, 2022
e677e80
add docs for plugins that only provide Lua apis
myk002 Jul 27, 2022
117efaa
update short description for command-prompt
myk002 Jul 27, 2022
2008fd3
update docs for jobutils.
myk002 Jul 27, 2022
382ad84
add example for job item-type
myk002 Jul 27, 2022
ed11346
update docs for isoworldremote
myk002 Jul 27, 2022
a053cce
update the "requires interactive terminal" message
myk002 Jul 27, 2022
58c0f94
order autolabor docs similarly to labormanager
myk002 Jul 28, 2022
e94f189
update docs for labormanager
myk002 Jul 28, 2022
52a0b0f
update docs for lair
myk002 Jul 28, 2022
ddae1aa
update docs for liquids
myk002 Jul 28, 2022
a2bca50
docs/build.py: Add support for xml and pseudoxml output formats
lethosor Jul 28, 2022
6aabf5f
no commas in index params
myk002 Jul 28, 2022
7569003
update docs for misery
myk002 Jul 28, 2022
b6f20ee
update docs for manipulator
myk002 Jul 28, 2022
bcab483
update docs for mode
myk002 Jul 28, 2022
f68b58c
update docs for mousequery
myk002 Jul 28, 2022
8864828
update docs for nestboxes
myk002 Jul 28, 2022
5b8d8d7
update docs for orders
myk002 Jul 28, 2022
e8bc9d9
fix formatting in mousequery docs
myk002 Jul 28, 2022
a6fb509
convert table to list so it's readable in text rendering
myk002 Jul 28, 2022
5954d7a
make docs for plug match the implementation
myk002 Jul 28, 2022
ac2d943
remove commas from cleaners index entry
myk002 Jul 28, 2022
4dea700
Merge branch 'develop' into docs
myk002 Jul 28, 2022
380b003
fix list formatting for manipulator
myk002 Jul 28, 2022
a09b35c
ignore generated directories
myk002 Jul 28, 2022
2e2abbe
update docs for petcapRemover
myk002 Jul 28, 2022
2d400fb
update docs for plants
myk002 Jul 29, 2022
1bbe996
update docs for power-meter
myk002 Jul 29, 2022
cf69a1a
update docs for probe
myk002 Jul 29, 2022
1270cf3
update docs for prospector
myk002 Jul 29, 2022
e513253
update docs for regrass
myk002 Jul 29, 2022
7a4e8ea
some plugins can't be directly enabled by the user
myk002 Jul 29, 2022
eef7812
update docs for rename
myk002 Jul 29, 2022
a701142
update docs for rendermax
myk002 Jul 29, 2022
c6d5fcb
update docs for resume
myk002 Jul 30, 2022
438293c
update docs for reveal
myk002 Jul 30, 2022
aa3a389
fix parsing bold text and indenting of ls output
myk002 Jul 30, 2022
f785a91
update docs for search
myk002 Jul 30, 2022
8cc0cee
Fix grammar in power meter docs
myk002 Jul 30, 2022
feda585
add example for ruby plugin
myk002 Jul 31, 2022
edb7bd3
update docs for seedwatch
myk002 Jul 31, 2022
8f7a23e
update docs for showmood
myk002 Jul 31, 2022
a1f937e
update docs for siege-engine
myk002 Jul 31, 2022
7261914
update docs for sort
myk002 Jul 31, 2022
af0631c
update docs for spectate
myk002 Jul 31, 2022
479494e
update docs for steam-engine
myk002 Jul 31, 2022
08d434d
update docs for stockflow
myk002 Jul 31, 2022
5621a19
update docs for stockpiles
myk002 Jul 31, 2022
e1e245b
update docs for stocks
myk002 Jul 31, 2022
464f566
update docs for stonesense
myk002 Jul 31, 2022
3d0eab1
update docs for strangemood
myk002 Jul 31, 2022
b240748
update docs for tailor
myk002 Jul 31, 2022
51f79f9
update docs for tiletypes
myk002 Jul 31, 2022
2362d60
update docs for title-folder and title-version
myk002 Jul 31, 2022
a6bdd9e
update docs for trackstop
myk002 Jul 31, 2022
a5a57a8
update docs for tubefill
myk002 Jul 31, 2022
e4c5b14
update docs for tweak
myk002 Jul 31, 2022
6686f70
update docs for workNow
myk002 Jul 31, 2022
d8f3e20
add image for stonesense
myk002 Jul 31, 2022
03027b5
Merge branch 'develop' into docs
myk002 Aug 4, 2022
3b17448
update docs for autobutcher
myk002 Aug 4, 2022
b2ab93b
update docs for autonestbox
myk002 Aug 4, 2022
5c9be94
update docs for workflow
myk002 Aug 4, 2022
26863fe
Update zone.rst
myk002 Aug 4, 2022
5e9dde8
Update autobutcher.rst
myk002 Aug 4, 2022
8f242ac
Update tweak.rst
myk002 Aug 4, 2022
feed91d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 4, 2022
46c3862
update docs for zone
myk002 Aug 5, 2022
6f48c1f
remove some cruft from autobutcher docs
myk002 Aug 5, 2022
ebfe00b
editing pass of short descriptions
myk002 Aug 5, 2022
f7acc5c
sync tags spreadsheet to git
myk002 Aug 6, 2022
b3a2a10
clean up generate doc dirs with ninja clean
myk002 Aug 6, 2022
1a77725
add get_entry_types API method to helpdb
myk002 Aug 6, 2022
3e30b43
clean up docs build deps
myk002 Aug 6, 2022
d04beb0
remove -E for sphinx-build. ninja clean can do it.
myk002 Aug 6, 2022
625b4d4
fix typo in API function name
myk002 Aug 6, 2022
6700a8d
add missing keybinds for filltraffic plugin
myk002 Aug 6, 2022
02a8f63
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 6, 2022
9098914
Add --offline option to docs/build.py to disable image downloads
lethosor Aug 7, 2022
153fef9
clean up Label tests
myk002 Aug 7, 2022
a8d0cc7
support scrolling by half pages in Label
myk002 Aug 7, 2022
f78e427
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 7, 2022
ef56add
prep for new format; accept pipe as tag separator
myk002 Aug 8, 2022
22de8f6
add secondary hotkey for gui/launcher
myk002 Aug 8, 2022
7274a8c
use docs/build.py to do the docs build
myk002 Aug 8, 2022
c0eb568
Merge branch 'develop' into docs
myk002 Aug 8, 2022
3e9a916
Merge branch 'develop' into docs
myk002 Aug 8, 2022
8f332c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 8, 2022
c44c872
Initial attempt at dfhack-tool directive
lethosor Jul 27, 2022
d962605
Make title visible by putting it in its own section
lethosor Jul 27, 2022
89a88e9
Allow empty :tags:, give section a name to prevent errors
lethosor Jul 28, 2022
e47c681
Use write_file_if_changed() in changelog.py
lethosor Aug 4, 2022
de5f4d3
Default to document basename in dfhack-tool directive
lethosor Aug 6, 2022
bb2ca0c
Render dfhack-tool as admonition
lethosor Aug 6, 2022
12b3363
Make dfhack-tool tags link to tag descriptions
lethosor Aug 6, 2022
d19ffa1
Add stub dfhack-command directive, refactor to support
lethosor Aug 7, 2022
b3d79f8
Fix optional name override
lethosor Aug 7, 2022
39e9288
Render commands as literals
lethosor Aug 7, 2022
5ef36d2
Render implicit dfhack-command alongside dfhack-tool unless :no-comma…
lethosor Aug 7, 2022
ed95db2
Move dfhack-keybind role to tool_docs.py and call from dfhack-command
lethosor Aug 7, 2022
5a14992
Use new directives for a few plugins
lethosor Aug 7, 2022
7651d30
Remove extra paragraph around keybindings
lethosor Aug 7, 2022
6b32e00
Attempt to port keybinding documentation verification to new extension
lethosor Aug 7, 2022
1e7ce26
Shrink tool/command boxes somewhat
lethosor Aug 7, 2022
6e29ddf
Move space out of <strong> node for better text rendering
lethosor Aug 8, 2022
daf3bc5
Switch to <topic> to fix line breaks in text output
lethosor Aug 8, 2022
e6b5d5b
Remove commas from tag lists
lethosor Aug 8, 2022
2d60c54
Remove "Tool:" line
lethosor Aug 9, 2022
4f799a1
Merge branch 'docs-sphinx-tool-directive' into docs
lethosor Aug 9, 2022
f9930b3
migrate all docs to the new directives
myk002 Aug 10, 2022
b21fc8a
remove extra space at bottom of tool summary
myk002 Aug 13, 2022
c5afca1
Merge branch 'develop' into docs
myk002 Aug 13, 2022
f6699c0
Sync tags descriptions from spreadsheet
myk002 Aug 13, 2022
eb91fef
revise tag list and assignments
myk002 Aug 12, 2022
2a3a812
update tag reference in Core.rst
myk002 Aug 14, 2022
47dc8c6
update scripts reference
myk002 Aug 14, 2022
f1f207b
don't include rst sources in html output
myk002 Aug 14, 2022
488fd67
output version of found sphinx and python
myk002 Aug 15, 2022
340b524
Invoke build.py with cmake-found python
lethosor Aug 15, 2022
df9c37a
Merge branch 'develop' into docs
myk002 Aug 16, 2022
b01ef4a
add todos about not using strong for text output
myk002 Aug 16, 2022
7acec13
organize tags by group, add more info about tools
myk002 Aug 16, 2022
60458ad
reorganize and alphabetize tags
myk002 Aug 16, 2022
524c49c
use easier to read underlining in text output
myk002 Aug 16, 2022
83e1fa7
add summary text in its own paragraph element
myk002 Aug 16, 2022
4373f86
make `dfhack` a "when" tag
myk002 Aug 16, 2022
22356e2
resort tags according to new spreadsheet order
myk002 Aug 16, 2022
fe7414b
Make .dfhack-tool-summary styles consistent with Sphinx 5+
lethosor Aug 18, 2022
7e05812
Refactor everything to use make_labeled_paragraph()
lethosor Aug 18, 2022
a4e70cf
Remove now-unused dfhack-keybind role
lethosor Aug 18, 2022
06c8269
Update Documentation.rst with examples of dfhack-tool and dfhack-command
lethosor Aug 18, 2022
fa8bceb
Make paragraph labels render as plain text (not bold) under the text …
lethosor Aug 18, 2022
72de187
Improve keybinding rendering under the text builder
lethosor Aug 18, 2022
eb73de4
make Usage a proper header
myk002 Aug 18, 2022
95cd8f9
Merge branch 'develop' into docs
myk002 Aug 19, 2022
751c2eb
fix detection of short description start
myk002 Aug 19, 2022
25c99b5
make summary text easier to read in text mode
myk002 Aug 26, 2022
0d3f5c2
get new script docs to compile
myk002 Aug 26, 2022
594dc9f
update to latest scripts head
myk002 Aug 26, 2022
0d3aa0f
Merge remote-tracking branch 'upstream/develop' into docs
myk002 Aug 26, 2022
a080872
include other doc build types in ninja clean
myk002 Aug 26, 2022
b0ae9ed
align quickfort guides with new defaults
myk002 Aug 26, 2022
65dd62a
remove unnecessary label for probe
myk002 Aug 26, 2022
4a1a322
adapt to the new summary layout
myk002 Aug 26, 2022
d2a9f0e
Merge branch 'develop' into docs
myk002 Aug 27, 2022
2146617
Merge branch 'develop' into docs
myk002 Aug 27, 2022
b1a8662
Merge branch 'develop' into docs
myk002 Sep 1, 2022
d258035
update changelog
myk002 Sep 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ jobs:
python-version: 3
- name: Install dependencies
run: |
pip install 'sphinx<4.4.0'
pip install 'sphinx'
- name: Clone DFHack
uses: actions/checkout@v1
with:
submodules: true
- name: Build docs
run: |
sphinx-build -W --keep-going -j3 --color . docs/html
sphinx-build -W --keep-going -j auto --color . docs/html
- name: Upload docs
uses: actions/upload-artifact@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ build/VC2010
!build/

# Sphinx generated documentation
docs/_*
docs/changelogs/
docs/html/
docs/pdf/
docs/pseudoxml/
docs/tags/
docs/text/
docs/tools/
docs/xml/

# in-place build
build/Makefile
Expand Down
76 changes: 52 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# main project file. use it from a build sub-folder, see COMPILE for details

## some generic CMake magic
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
cmake_policy(SET CMP0048 NEW)
project(dfhack)

Expand Down Expand Up @@ -442,43 +442,67 @@ endif()
add_subdirectory(data)
add_subdirectory(scripts)

find_package(Sphinx QUIET)
if(BUILD_DOCS)
find_package(Python3)
find_package(Sphinx)

if(NOT SPHINX_FOUND)
message(SEND_ERROR "Sphinx not found but BUILD_DOCS enabled")
endif()

file(GLOB SPHINX_DEPS
"${CMAKE_CURRENT_SOURCE_DIR}/docs/*.rst"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/guides/*.rst"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/changelog.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_changelog.py"
file(GLOB SPHINX_GLOB_DEPS
LIST_DIRECTORIES false
"${CMAKE_CURRENT_SOURCE_DIR}/docs/images/*.png"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/styles/*"
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/data/init/*init"
)
file(GLOB_RECURSE SPHINX_GLOB_RECURSE_DEPS
"${CMAKE_CURRENT_SOURCE_DIR}/*.rst"
"${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/*py"
)
list(FILTER SPHINX_GLOB_RECURSE_DEPS
EXCLUDE REGEX "docs/changelogs"
)
list(FILTER SPHINX_GLOB_RECURSE_DEPS
EXCLUDE REGEX "docs/html"
)
file(GLOB_RECURSE SPHINX_SCRIPT_DEPS
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.lua"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.rb"
list(FILTER SPHINX_GLOB_RECURSE_DEPS
EXCLUDE REGEX "docs/tags"
)
set(SPHINX_DEPS ${SPHINX_DEPS} ${SPHINX_SCRIPT_DEPS}
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rst"
list(FILTER SPHINX_GLOB_RECURSE_DEPS
EXCLUDE REGEX "docs/text"
)
list(FILTER SPHINX_GLOB_RECURSE_DEPS
EXCLUDE REGEX "docs/tools"
)
set(SPHINX_DEPS ${SPHINX_GLOB_DEPS} ${SPHINX_GLOB_RECURSE_DEPS} ${SPHINX_SCRIPT_DEPS}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py"
)

set(SPHINX_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/html/.buildinfo")
set_source_files_properties(${SPHINX_OUTPUT} PROPERTIES GENERATED TRUE)
set_property(
DIRECTORY PROPERTY ADDITIONAL_CLEAN_FILES TRUE
"${CMAKE_CURRENT_SOURCE_DIR}/docs/changelogs"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/html"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/pdf"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/pseudoxml"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/tags"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/text"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/tools"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/xml"
"${CMAKE_BINARY_DIR}/docs/html"
"${CMAKE_BINARY_DIR}/docs/pdf"
"${CMAKE_BINARY_DIR}/docs/pseudoxml"
"${CMAKE_BINARY_DIR}/docs/text"
"${CMAKE_BINARY_DIR}/docs/xml"
)
add_custom_command(OUTPUT ${SPHINX_OUTPUT}
COMMAND ${SPHINX_EXECUTABLE}
-a -E -q -b html
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/html"
-w "${CMAKE_CURRENT_SOURCE_DIR}/docs/_sphinx-warnings.txt"
-j 2
COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/docs/build.py"
html text --sphinx="${SPHINX_EXECUTABLE}" -- -q
DEPENDS ${SPHINX_DEPS}
COMMENT "Building HTML documentation with Sphinx"
COMMENT "Building documentation with Sphinx"
)

add_custom_target(dfhack_docs ALL
Expand All @@ -490,8 +514,12 @@ if(BUILD_DOCS)
COMMAND ${CMAKE_COMMAND} -E touch ${SPHINX_OUTPUT})

install(DIRECTORY ${dfhack_SOURCE_DIR}/docs/html/
DESTINATION ${DFHACK_USERDOC_DESTINATION}/docs
FILES_MATCHING PATTERN "*"
PATTERN html/_sources EXCLUDE)
install(DIRECTORY ${dfhack_SOURCE_DIR}/docs/text/
DESTINATION ${DFHACK_USERDOC_DESTINATION}/docs)
install(FILES docs/_auto/news.rst docs/_auto/news-dev.rst DESTINATION ${DFHACK_USERDOC_DESTINATION})
install(FILES docs/changelogs/news.rst docs/changelogs/news-dev.rst DESTINATION ${DFHACK_USERDOC_DESTINATION})
install(FILES "README.html" DESTINATION "${DFHACK_DATA_DESTINATION}")
endif()

Expand Down
Loading