summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnermolaev <[email protected]>2025-08-13 07:08:43 +0300
committersnermolaev <[email protected]>2025-08-13 07:36:14 +0300
commita9be187231537fb0f1cc67e835de40511cd8b50c (patch)
treee2eab5aae7f439a54c0ab106e268511136945f0e
parent85d2a6436b2fd8b78a62594f9437338203902c2f (diff)
HTML_ARCHIVE module
commit_hash:205e72e87af9866f2da3af23a9b03fd21c04c33d
-rw-r--r--build/conf/docs.conf40
1 files changed, 40 insertions, 0 deletions
diff --git a/build/conf/docs.conf b/build/conf/docs.conf
index dea640d1ac6..bdc777e9379 100644
--- a/build/conf/docs.conf
+++ b/build/conf/docs.conf
@@ -164,6 +164,8 @@ multimodule DOCS {
SET(MODULE_TAG DOCSBOOK)
SET(PEERDIR_TAGS DOCSLIB DOCS_PROTO)
+ REALPRJNAME=html
+
_DOCS_YFM_OUTPUT_FORMAT=$_DOCS_YFM_BOOK_OUTPUT_FORMAT
PROCESS_DOCS()
@@ -223,6 +225,44 @@ multimodule DOCS {
}
}
+# tag:docs
+### @usage: HTML_ARCHIVE()
+###
+### This module extracts an archive of preprocessed .md files (as preprocessed.tar.gz) from the DOCS
+### module and makes it its own output. You have to call HTML_ARCHIVE_FROM macro to specify the path
+### to the DOCS module at least once. If there are several calls to HTML_ARCHIVE_FROM macro the last one
+### wins (that is the last call to HTML_ARCHIVE_FROM is considered and all others are ignored).
+###
+### @see: [HTML_ARCHIVE_FROM()](#macro_HTML_ARCHIVE_FROM), [DOCS()](#module_DOCSS).
+module HTML_ARCHIVE: _DOCS_BARE_UNIT {
+ .ALLOWED=HTML_ARCHIVE_FROM
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $COPY_CMD ${suf=/html.tar.gz:_HTML_ARCHIVE_FROM_VALUE} $TARGET ${hide:DOCS_FAKEID} $_DOCS_KV
+ .EPILOGUE=_HTML_ARCHIVE_EPILOGUE
+ .FINAL_TARGET=yes
+ .PEERDIR_POLICY=as_build_from
+ .STRUCT_CMD=yes
+
+ DISABLE(_HTML_ARCHIVE_FROM_CALLED)
+ SET(_HTML_ARCHIVE_FROM_VALUE __unset_docslib_from__)
+ SET(PEERDIR_TAGS DOCSBOOK)
+}
+
+# tag:docs
+### @usage: HTML_ARCHIVE_FROM(Dir)
+###
+### `Dir` - the path to DOCS module
+macro HTML_ARCHIVE_FROM(FROM) {
+ ENABLE(_HTML_ARCHIVE_FROM_CALLED)
+ SET(_HTML_ARCHIVE_FROM_VALUE $FROM)
+}
+
+# tag:docs tag:internal
+### @usage: N/A (this macro is called automatically)
+macro _HTML_ARCHIVE_EPILOGUE() {
+ ASSERT(_HTML_ARCHIVE_FROM_CALLED HTML_ARCHIVE_FROM macro was not called)
+ PEERDIR($_HTML_ARCHIVE_FROM_VALUE)
+}
+
# tag:docs tag:internal
_DOCS_YFM_DEFAULT_CONFIG=$MODDIR/.yfm