diff -ru gtk-doc-1.7/gtkdoc-scan.in gtk-doc-1.7.my/gtkdoc-scan.in
--- gtk-doc-1.7/gtkdoc-scan.in	2006-03-19 23:34:33.000000000 +0100
+++ gtk-doc-1.7.my/gtkdoc-scan.in	2006-09-30 22:10:11.000000000 +0200
@@ -51,6 +51,7 @@
 my $IGNORE_HEADERS = "";
 my $PRINT_VERSION;
 my $PRINT_HELP;
+my $REBUILD_SECTIONS;
 # regexp matching cpp symbols which surround deprecated stuff
 # e.g. 'GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED'
 # these are detected if they are used as #if FOO, #ifndef FOO, or #ifdef FOO
@@ -65,10 +66,11 @@
 	      'version' => \$PRINT_VERSION,
 	      'help' => \$PRINT_HELP,
               'deprecated-guards' => \$DEPRECATED_GUARDS,
-	      'ignore-decorators' => \$IGNORE_DECORATORS);
+	      'ignore-decorators' => \$IGNORE_DECORATORS,
+              'rebuild-sections' => \$REBUILD_SECTIONS);
 GetOptions(\%optctl, "module=s", "source-dir:s", "ignore-headers:s",
 	   "output-dir:s", "version", "help",
-           "deprecated-guards:s", "ignore-decorators:s");
+           "deprecated-guards:s", "ignore-decorators:s", "rebuild-sections");
 
 if ($PRINT_VERSION) {
     print "@VERSION@\n";
@@ -87,6 +89,7 @@
     print "\n--output-dir=DIRNAME       The directory where the results are stored";
     print "\n--deprecated-guards=GUARDS A |-separated list of symbols used as deprecation guards";
     print "\n--ignore-decorators=DECS   A |-separated list of addition decorators in declarations that should be ignored";
+    print "\n--rebuild-sections         Rebuild (overwrite) *-sections.txt file";
     print "\n--version                  Print the version of this program";
     print "\n--help                     Print this help\n";
     exit 0;
@@ -132,10 +135,11 @@
 &UpdateFileIfChanged ($old_decl_list, $new_decl_list, 1);
 &UpdateFileIfChanged ($old_decl, $new_decl, 1);
 
-# If there is no MODULE-sections.txt file yet, we copy the MODULE-decl-list.txt
-# file into its place. The user can tweak it later if they want.
+# If there is no MODULE-sections.txt file yet or we are asked to rebuild it,
+# we copy the MODULE-decl-list.txt file into its place. The user can tweak it
+# later if they want.
 my $sections_file = "${OUTPUT_DIR}/$MODULE-sections.txt";
-if (! -e $sections_file) {
+if ($REBUILD_SECTIONS || ! -e $sections_file) {
   `cp $old_decl_list $sections_file`;
 }
 
