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

codegen/valagirwriter.vala
tests/girwriter/GirTest-1.0.gir-expected

index 4373ec8bbf4fd5cb4273c96f97ad4d5362b691f0..c5bec0fce9d9a592a1131c85e601bf09882ca9c3 100644 (file)
@@ -171,6 +171,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 (), Vala.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\"");
index 052868bb629ce568c4409d3d1deea99c290547ec..1bad12723454688bfd6c0938c81024e5e167594d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0"?>
+<!-- GirTest-1.0.gir generated by valac, do not modify. -->
 <repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
 <include name="GObject" version="2.0"/>
 <include name="GLib" version="2.0"/>