[gtk-doc] mkdb: update comments and use UpdateFileIfChanged



commit ba128b7bf2622ea07461dc094c6846f7fc7140f0
Author: Stefan Kost <ensonic users sf net>
Date:   Fri Jan 1 23:59:08 2010 +0200

    mkdb: update comments and use UpdateFileIfChanged

 gtkdoc-mkdb.in |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index d08b5b6..0aeb8ef 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4033,14 +4033,18 @@ sub OutputMissingDocumentation {
 
 #############################################################################
 # Function    : OutputUndeclaredSymbols
-# Description : Outputs symbols that are undeclared yet documented to a file
+# Description : Outputs symbols that are listed in the section file, but not
+#               declaration is found in the sources
 #
 # Arguments   : none
 #############################################################################
 
 sub OutputUndeclaredSymbols {
-    open(UNDECLARED, ">$ROOT_DIR/$MODULE-undeclared.txt")
-	|| die "Can't create $ROOT_DIR/$MODULE-undeclared.txt";
+    my $old_undeclared_file = "$ROOT_DIR/$MODULE-undeclared.txt";
+    my $new_undeclared_file = "$ROOT_DIR/$MODULE-undeclared.new";
+
+    open(UNDECLARED, ">$new_undeclared_file")
+	|| die "Can't create $new_undeclared_file";
 
     if (%UndeclaredSymbols) {
 	print UNDECLARED (join("\n", sort keys %UndeclaredSymbols));
@@ -4048,6 +4052,8 @@ sub OutputUndeclaredSymbols {
 	print "See $MODULE-undeclared.txt for the list of undeclared symbols.\n"
     }
     close(UNDECLARED);
+
+    return &UpdateFileIfChanged ($old_undeclared_file, $new_undeclared_file, 0);
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]