]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Mention that this file is generated and not meant to be modified
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Apr 2019 08:25:32 +0000 (10:25 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 6 Aug 2019 11:31:30 +0000 (13:31 +0200)
Same as already done for generated vapi files.

codegen/Makefile.am
codegen/valagirwriter.vala

index a20e24f36a134142958d8cda1612d2c3e8f44184..decf9d254d8f2a76ee23d3df71affd1ddbeed0f2 100644 (file)
@@ -67,6 +67,7 @@ codegen.vapi codegen.vala.stamp: $(libvala_la_VALASOURCES)
                --vapidir $(top_srcdir)/gee --pkg gee \
                --vapidir $(top_srcdir)/ccode --pkg ccode \
                --vapidir $(top_srcdir)/vala --pkg vala \
+               --pkg config \
                -H valacodegen.h \
                --library codegen \
                $^
index fb39686eb53a2b7609a4fc409282fcc5713a2c22..e3745b09a8822792864babd9af17cbabd14b4e26 100644 (file)
@@ -170,6 +170,11 @@ public class Vala.GIRWriter : CodeVisitor {
 
                stream.printf ("<?xml version=\"1.0\"?>\n");
 
+               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, do not modify. -->".printf (Path.get_basename (filename), Environment.get_prgname ());
+               stream.printf ("%s\n", header);
+
                stream.printf ("<repository version=\"1.2\"");
                stream.printf (" xmlns=\"http://www.gtk.org/introspection/core/1.0\"");
                stream.printf (" xmlns:c=\"http://www.gtk.org/introspection/c/1.0\"");