summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-05-13 08:35:49 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-08-09 20:25:00 +0200
commita17ee486729aa20e515635b3f62fb11bd87ddea6 (patch)
treebbdeb9b0efc874109b7c479e11f87a929527c2bc
parent99d1fd0a4846e755fae011822e2ced29630df997 (diff)
downloadvala-a17ee486729aa20e515635b3f62fb11bd87ddea6.tar.gz
Use dedicated version api of libvala internally as well
-rw-r--r--Makefile.am7
-rw-r--r--ccode/valaccodewriter.vala2
-rw-r--r--compiler/valacompiler.vala8
-rw-r--r--vala/valacodewriter.vala2
-rw-r--r--valadoc/valadoc.vala2
-rw-r--r--vapi/config.vapi3
-rw-r--r--vapigen/valavapigen.vala2
7 files changed, 8 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index e5dc0cc97..508c6618f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,11 +52,6 @@ coverage-report: coverage
genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
#endif
-all: version.h
-
-version.h: $(top_srcdir)/.version
- echo '#define BUILD_VERSION "'`cat $(top_srcdir)/.version`'"' > $@-t && mv $@-t $@
-
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version: gen-version
@true
@@ -94,5 +89,3 @@ EXTRA_DIST = \
build-aux/git-version-gen \
build-aux/gitlog-to-changelog \
$(NULL)
-
-DISTCLEANFILES = version.h
diff --git a/ccode/valaccodewriter.vala b/ccode/valaccodewriter.vala
index 26b284c4c..a71e16c89 100644
--- a/ccode/valaccodewriter.vala
+++ b/ccode/valaccodewriter.vala
@@ -93,7 +93,7 @@ public class Vala.CCodeWriter {
}
var opening = write_version ?
- "/* %s generated by valac %s, the Vala compiler".printf (Path.get_basename (filename), Config.BUILD_VERSION) :
+ "/* %s generated by valac %s, the Vala compiler".printf (Path.get_basename (filename), Vala.BUILD_VERSION) :
"/* %s generated by valac, the Vala compiler".printf (Path.get_basename (filename));
write_string (opening);
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index c2f73c17e..b6a21e537 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -552,10 +552,10 @@ class Vala.Compiler {
}
if (version) {
- stdout.printf ("Vala %s\n", Config.BUILD_VERSION);
+ stdout.printf ("Vala %s\n", Vala.BUILD_VERSION);
return 0;
} else if (api_version) {
- stdout.printf ("%s\n", Config.API_VERSION);
+ stdout.printf ("%s\n", Vala.API_VERSION);
return 0;
}
@@ -640,10 +640,10 @@ class Vala.Compiler {
}
if (version) {
- stdout.printf ("Vala %s\n", Config.BUILD_VERSION);
+ stdout.printf ("Vala %s\n", Vala.BUILD_VERSION);
return 0;
} else if (api_version) {
- stdout.printf ("%s\n", Config.API_VERSION);
+ stdout.printf ("%s\n", Vala.API_VERSION);
return 0;
}
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index 985a23182..a65956133 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -84,7 +84,7 @@ public class Vala.CodeWriter : CodeVisitor {
}
var header = context.version_header ?
- "/* %s generated by %s %s, do not modify. */".printf (Path.get_basename (filename), Environment.get_prgname (), Config.BUILD_VERSION) :
+ "/* %s generated by %s %s, do not modify. */".printf (Path.get_basename (filename), Environment.get_prgname (), Vala.BUILD_VERSION) :
"/* %s generated by %s, do not modify. */".printf (Path.get_basename (filename), Environment.get_prgname ());
write_string (header);
write_newline ();
diff --git a/valadoc/valadoc.vala b/valadoc/valadoc.vala
index 11263a0f7..7e74a187b 100644
--- a/valadoc/valadoc.vala
+++ b/valadoc/valadoc.vala
@@ -317,7 +317,7 @@ public class ValaDoc : Object {
}
if (version) {
- stdout.printf ("Valadoc %s\n", Config.BUILD_VERSION);
+ stdout.printf ("Valadoc %s\n", Vala.BUILD_VERSION);
return 0;
}
diff --git a/vapi/config.vapi b/vapi/config.vapi
index 49797b829..543a92fa8 100644
--- a/vapi/config.vapi
+++ b/vapi/config.vapi
@@ -22,9 +22,6 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Config {
- public const string API_VERSION;
- [CCode (cheader_filename = "version.h")]
- public const string BUILD_VERSION;
public const string PACKAGE_DATADIR;
public const string PACKAGE_SUFFIX;
}
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 616efdf29..9fe8ea6f0 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -218,7 +218,7 @@ class Vala.VAPIGen {
}
if (version) {
- stdout.printf ("Vala API Generator %s\n", Config.BUILD_VERSION);
+ stdout.printf ("Vala API Generator %s\n", Vala.BUILD_VERSION);
return 0;
}