Fix clean target, correct build docs, add overview and docs guide

clean was deleting the generated build system along with the artifacts —
CMakeCache.txt, the makefiles, CMakeFiles/, the CMake file API directory,
and the CTest configuration. That left the build directory unconfigured
after every clean, so an IDE reading its target list from the file API
lost every target until the project was reloaded. clean now removes only
what the build produced.

Also writes CTest's scratch directory into DartConfiguration.tcl so a bare
ctest and IDE test discovery use it too, not just build-driven runs.

BUILD.md no longer lists libdl as a dependency; glibc 2.34 merged it into
libc, so nothing links against it. The code-reference section moves to its
own DOCUMENTATION.md.

The fixture config logged at ERROR while the info module emits its output
at INFO, so the CLI invocation BUILD.md documents exited 0 and printed
nothing. The fixture now logs at INFO and the documented command works as
written.

OVERVIEW.md describes what DPM is, how core routes and validates modules,
and why the architecture takes the shape it does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-09 23:57:38 -04:00
parent 19cf285cb7
commit da35fe4758
5 changed files with 175 additions and 45 deletions

View File

@@ -86,6 +86,13 @@ add_dependencies(dpm info)
# ---------------------------------------------------------------------
enable_testing()
# CTest's scratch area is named by its BuildDirectory configuration option.
# Writing it into DartConfiguration.tcl puts it where ctest reads it on every
# invocation — the test target, a bare ctest, and the IDE's test discovery
# alike — rather than only the ones the build drives.
file(WRITE ${CMAKE_BINARY_DIR}/DartConfiguration.tcl
"BuildDirectory: ${CMAKE_BINARY_DIR}/test-results\n")
set(FIXTURE_MODULE_DIR ${CMAKE_BINARY_DIR}/tests/fixtures)
foreach(fixture good missing_symbols bad_magic lying_manifest core_too_new bad_version)
@@ -201,35 +208,23 @@ endif()
# ---------------------------------------------------------------------
# Clean
# ---------------------------------------------------------------------
# clean empties the build directory: every artifact, every generated tree,
# and the generated build system itself, so that building again requires
# regenerating the directory first.
# clean removes what the build produced: the artifact directories, the
# generated documentation, and the test scratch areas.
#
# Order is load-bearing. This list becomes one script run by cmake -P: it is
# parsed whole before it executes, but a removal that fails aborts the rest,
# so anything named after that point survives. Leaves that nothing depends
# on come first, and the entries most likely to be held by an outside
# process — the IDE's file-API directory — come last, where a failure
# costs nothing. The build system make is running from is named late for
# the same reason, since by then the script is already in memory.
# The generated build system stays. CMakeCache.txt, the makefiles,
# CMakeFiles/, and the CMake file API directory under .cmake/ are what an
# IDE reads to know the project's targets exist; deleting them leaves the
# directory unconfigured, so every target in the IDE stops resolving until
# the project is reloaded. Removing the build system is what configuring a
# fresh directory is for.
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES
${CMAKE_BINARY_DIR}/test-results
${CMAKE_BINARY_DIR}/Testing
${CMAKE_BINARY_DIR}/bin
${CMAKE_BINARY_DIR}/lib
${CMAKE_BINARY_DIR}/modules
${CMAKE_BINARY_DIR}/tests
${CMAKE_BINARY_DIR}/docs
${CMAKE_BINARY_DIR}/CMakeDoxyfile.in
${CMAKE_BINARY_DIR}/CMakeDoxyfile.tpl
${CMAKE_BINARY_DIR}/CMakeDoxygenDefaults.cmake
${CMAKE_BINARY_DIR}/Doxyfile.docs
${CMAKE_BINARY_DIR}/compile_commands.json
${CMAKE_BINARY_DIR}/cmake_install.cmake
${CMAKE_BINARY_DIR}/CTestTestfile.cmake
${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/Makefile
${CMAKE_BINARY_DIR}/CMakeFiles
${CMAKE_BINARY_DIR}/.cmake
)
# ---------------------------------------------------------------------