Tidy up generation of java/Makefile.inc.
authorRichard Jones <rjones@trick.home.annexia.org>
Fri, 7 Aug 2009 16:38:44 +0000 (17:38 +0100)
committerRichard Jones <rjones@trick.home.annexia.org>
Fri, 7 Aug 2009 16:38:44 +0000 (17:38 +0100)
(Just whitespace and comment changes, and small restructuring
of the code).

java/Makefile.inc
src/generator.ml

index e9d30f1..03b6049 100644 (file)
@@ -1 +1,32 @@
-java_built_sources = com/redhat/et/libguestfs/IntBool.java com/redhat/et/libguestfs/PV.java com/redhat/et/libguestfs/VG.java com/redhat/et/libguestfs/LV.java com/redhat/et/libguestfs/Stat.java com/redhat/et/libguestfs/StatVFS.java com/redhat/et/libguestfs/Dirent.java com/redhat/et/libguestfs/Version.java com/redhat/et/libguestfs/XAttr.java com/redhat/et/libguestfs/INotifyEvent.java com/redhat/et/libguestfs/GuestFS.java
+# libguestfs generated file
+# WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
+# ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
+#
+# Copyright (C) 2009 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+java_built_sources = \
+       com/redhat/et/libguestfs/IntBool.java \
+       com/redhat/et/libguestfs/PV.java \
+       com/redhat/et/libguestfs/VG.java \
+       com/redhat/et/libguestfs/LV.java \
+       com/redhat/et/libguestfs/Stat.java \
+       com/redhat/et/libguestfs/StatVFS.java \
+       com/redhat/et/libguestfs/Dirent.java \
+       com/redhat/et/libguestfs/Version.java \
+       com/redhat/et/libguestfs/XAttr.java \
+       com/redhat/et/libguestfs/INotifyEvent.java \
+       com/redhat/et/libguestfs/GuestFS.java
index fdf8f09..8d16945 100755 (executable)
@@ -8504,6 +8504,16 @@ and generate_java_struct_list_return typ jtyp cols =
   pr "  guestfs_free_%s_list (r);\n" typ;
   pr "  return jr;\n"
 
+and generate_java_makefile_inc () =
+  generate_header HashStyle GPLv2;
+
+  pr "java_built_sources = \\\n";
+  List.iter (
+    fun (typ, jtyp) ->
+        pr "\tcom/redhat/et/libguestfs/%s.java \\\n" jtyp;
+  ) java_structs;
+  pr "\tcom/redhat/et/libguestfs/GuestFS.java\n"
+
 and generate_haskell_hs () =
   generate_header HaskellStyle LGPLv2;
 
@@ -9261,12 +9271,7 @@ Run it from the top source directory using the command
   ) java_structs;
 
   let close = output_to "java/Makefile.inc" in
-  pr "java_built_sources =";
-  List.iter (
-    fun (typ, jtyp) ->
-        pr " com/redhat/et/libguestfs/%s.java" jtyp;
-  ) java_structs;
-  pr " com/redhat/et/libguestfs/GuestFS.java\n";
+  generate_java_makefile_inc ();
   close ();
 
   let close = output_to "java/com_redhat_et_libguestfs_GuestFS.c" in