File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ ROOTDIR=$(shell pwd)
3
3
4
4
# ALS version
5
5
VERSION ?=
6
+
7
+ # ALS build date
8
+ BUILD_DATE ?=
9
+
6
10
# Location of home dir for tests
7
11
export ALS_HOME =$(ROOTDIR ) /testsuite
8
12
@@ -91,7 +95,7 @@ all: coverage-instrument
91
95
$(GPRBUILD ) -P gnat/tester.gpr -p $(BUILD_FLAGS )
92
96
$(GPRBUILD ) -d -ws -c -u -P gnat/lsp_server.gpr -p $(BUILD_FLAGS ) s-memory.adb
93
97
$(GPRBUILD ) -P gnat/lsp_server.gpr -p $(COVERAGE_BUILD_FLAGS ) \
94
- -XVERSION=$(VERSION )
98
+ -XVERSION=$(VERSION ) -XBUILD_DATE= $( BUILD_DATE )
95
99
$(GPRBUILD ) -P gnat/codec_test.gpr -p $(COVERAGE_BUILD_FLAGS )
96
100
$(GPRBUILD ) -P gnat/lsp_client.gpr -p $(COVERAGE_BUILD_FLAGS ) \
97
101
-XVERSION=$(VERSION )
@@ -111,7 +115,7 @@ ifneq ($(COVERAGE),)
111
115
# Remove artifacts from previous instrumentations, so that stale units that
112
116
# are not overriden by new ones don't get in our way.
113
117
rm -rf .obj/*/gnatcov-instr
114
- $(COVERAGE_INSTR) -XVERSION=$(VERSION) \
118
+ $(COVERAGE_INSTR) -XVERSION=$(VERSION) XBUILD_DATE=$(BUILD_DATE) \
115
119
-Pgnat/lsp_server.gpr --projects lsp_server --projects lsp
116
120
$(COVERAGE_INSTR) -Pgnat/tester.gpr --projects lsp
117
121
$(COVERAGE_INSTR) -Pgnat/codec_test.gpr --projects lsp
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ project LSP_Server is
29
29
30
30
VERSION := external ("VERSION", "latest");
31
31
32
+ BUILD_DATE := external ("BUILD_DATE", "unknown");
33
+
32
34
type Library_Kind is ("static", "static-pic", "relocatable");
33
35
Library_Type : Library_Kind := external("ALS_LIBRARY_TYPE",
34
36
external("LIBRARY_TYPE", "relocatable"));
@@ -50,7 +52,8 @@ project LSP_Server is
50
52
package Compiler is
51
53
for Default_Switches ("Ada") use LSP.Compiler'Default_Switches ("Ada");
52
54
for Switches ("lsp-ada_driver.adb") use
53
- LSP.Compiler'Default_Switches ("Ada") & ("-gnateDVERSION=""" & VERSION & """");
55
+ LSP.Compiler'Default_Switches ("Ada") &
56
+ ("-gnateDVERSION=""" & VERSION & """", "-gnateDBUILD_DATE=""" & BUILD_DATE & """");
54
57
for Switches ("s-memory.adb") use ("-g", "-O2", "-gnatpg");
55
58
for Local_Configuration_Pragmas use "gnat.adc";
56
59
end Compiler;
Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ begin
243
243
VSS.Command_Line.Process; -- Will exit if errors or help requested.
244
244
245
245
if VSS.Command_Line.Is_Specified (Version_Option) then
246
- Ada.Text_IO.Put_Line (" ALS version: " & $VERSION);
246
+ Ada.Text_IO.Put_Line
247
+ (" ALS version: " & $VERSION & " (" & $BUILD_DATE & " )" );
247
248
GNAT.OS_Lib.OS_Exit (0 );
248
249
end if ;
249
250
@@ -316,7 +317,7 @@ begin
316
317
end ;
317
318
end if ;
318
319
319
- Server_Trace.Trace (" ALS version: " & $VERSION);
320
+ Server_Trace.Trace (" ALS version: " & $VERSION & " ( " & $BUILD_DATE & " ) " );
320
321
321
322
Server_Trace.Trace (" Initializing server ..." );
322
323
You can’t perform that action at this time.
0 commit comments