Skip to content

Commit bf13f66

Browse files
committed
Move declaration of the version...
... to update it when Alire is used.
1 parent a30c0db commit bf13f66

File tree

4 files changed

+24
-27
lines changed

4 files changed

+24
-27
lines changed

config/gnatdoc_config.ads

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--
2+
-- Copyright (C) 2025, AdaCore
3+
--
4+
-- SPDX-License-Identifier: GPL-3.0
5+
--
6+
7+
-- This file is stub to build GNATdoc outside of the Alire environment. Alire
8+
-- will overwrite it during builds.
9+
10+
pragma Restrictions (No_Elaboration_Code);
11+
pragma Style_Checks (Off);
12+
13+
package Gnatdoc_Config is
14+
pragma Pure;
15+
16+
Crate_Version : constant String := "%VERSION% (%DATE%)";
17+
18+
end Gnatdoc_Config;

gnat/gnatdoc.gpr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- GNAT Documentation Generation Tool --
33
-- --
4-
-- Copyright (C) 2022-2024, AdaCore --
4+
-- Copyright (C) 2022-2025, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -25,7 +25,8 @@ project GNATdoc is
2525

2626
for Object_Dir use "../.objs";
2727
for Source_Dirs use
28-
("../source/backend",
28+
("../config",
29+
"../source/backend",
2930
"../source/backend/rst",
3031
"../source/frontend",
3132
"../source/gnatdoc");

source/gnatdoc/gnatdoc-command_line.adb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ with VSS.Strings.Conversions;
2121

2222
with GNATdoc.Comments.Options;
2323
with GNATdoc.Options;
24-
with GNATdoc.Version;
24+
with Gnatdoc_Config;
2525

2626
with GPR2.Options;
2727
with GPR2.Project.Registry.Exchange;
@@ -209,7 +209,8 @@ package body GNATdoc.Command_Line is
209209
VSS.Command_Line.Report_Error
210210
(Template.Format
211211
(VSS.Strings.Formatters.Strings.Image
212-
(GNATdoc.Version.Version_String)));
212+
(VSS.Strings.Conversions.To_Virtual_String
213+
(Gnatdoc_Config.Crate_Version))));
213214
end;
214215
end if;
215216

source/gnatdoc/gnatdoc-version.ads

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)