From 54b0fcf6dc33dd2924fa03bf7119e7a2fef5a844 Mon Sep 17 00:00:00 2001 From: Cyprian Klimaszewski Date: Mon, 12 Jan 2026 15:17:56 +0100 Subject: [PATCH] Doc: Add @file annotation to generated squirrel files. --- src/script/api/CMakeLists.txt | 1 + src/script/api/script_includes.hpp.in | 5 ++++- src/script/api/squirrel_export.sq.hpp.in | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt index 28fd71128a..98e2659b2b 100644 --- a/src/script/api/CMakeLists.txt +++ b/src/script/api/CMakeLists.txt @@ -52,6 +52,7 @@ foreach(API "ai;AI" "game;GS" "template;Template") -DSCRIPT_API_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/squirrel_export.sq.hpp.in -DSCRIPT_API_BINARY_FILE=${SCRIPT_API_BINARY_FILE} -DSCRIPT_API_FILE=${SCRIPT_API_FILE} + -DSQUIRREL_EXPORT_SQQ_HPP=${SCRIPT_API_FILE_NAME}.sq.hpp -DAPIUC=${APIUC} -DAPILC=${APILC} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelExport.cmake diff --git a/src/script/api/script_includes.hpp.in b/src/script/api/script_includes.hpp.in index 8e1adfcd7e..4fe783da86 100644 --- a/src/script/api/script_includes.hpp.in +++ b/src/script/api/script_includes.hpp.in @@ -5,7 +5,10 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ +/** + * @file ${APILC}_includes.hpp Registers OTTD API in squirrel engine. + * @attention THIS FILE IS AUTO-GENERATED. PLEASE DO NOT ALTER MANUALLY. + */ #include "../script_fatalerror.hpp" diff --git a/src/script/api/squirrel_export.sq.hpp.in b/src/script/api/squirrel_export.sq.hpp.in index 47d0328391..65b677dceb 100644 --- a/src/script/api/squirrel_export.sq.hpp.in +++ b/src/script/api/squirrel_export.sq.hpp.in @@ -5,5 +5,9 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ +/** + * @file ${SQUIRREL_EXPORT_SQQ_HPP} Exposes ottd c++ api to squirrel. + * @attention THIS FILE IS AUTO-GENERATED. PLEASE DO NOT ALTER MANUALLY. + */ + ${SQUIRREL_EXPORT}