gtk-doc r546 - in trunk: . tests



Author: stefkost
Date: Mon Jan 28 16:07:37 2008
New Revision: 546
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=546&view=rev

Log:
	* gtkdoc-mkdb.in:
	  Condense all the multiple newlines in the generated xml.
	* tests/gtk-doc.make:
	  Make sure the testsuite call the uninstalled scripts.



Modified:
   trunk/ChangeLog
   trunk/gtkdoc-mkdb.in
   trunk/tests/gtk-doc.make

Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in	(original)
+++ trunk/gtkdoc-mkdb.in	Mon Jan 28 16:07:37 2008
@@ -458,15 +458,18 @@
 		    $section_includes = $includes;
 		}
 
+                 $signals_synop =~ s/^\n*//g;
+                 $signals_synop =~ s/\n+$/\n/g;
 		if ($signals_synop ne '') {
 		    $signals_synop = <<EOF;
 <refsect1 id="$section_id.signals" role="signal_proto">
 <title role="signal_proto.title">Signals</title>
 <synopsis>
-
 ${signals_synop}</synopsis>
 </refsect1>
 EOF
+                     $signals_desc =~ s/^\n*//g;
+                     $signals_desc =~ s/\n+$/\n/g;
 		    $signals_desc  = <<EOF;
 <refsect1 id="$section_id.signal-details" role="signals">
 <title role="signals.title">Signal Details</title>
@@ -475,15 +478,18 @@
 EOF
 		}
 
+                 $args_synop =~ s/^\n*//g;
+                 $args_synop =~ s/\n+$/\n/g;
 		if ($args_synop ne '') {
 		    $args_synop = <<EOF;
 <refsect1 id="$section_id.properties" role="properties">
 <title role="properties.title">Properties</title>
 <synopsis>
-
 ${args_synop}</synopsis>
 </refsect1>
 EOF
+                     $args_desc =~ s/^\n*//g;
+                     $args_desc =~ s/\n+$/\n/g;
 		    $args_desc  = <<EOF;
 <refsect1 id="$section_id.property-details" role="property_details">
 <title role="property_details.title">Property Details</title>
@@ -492,15 +498,18 @@
 EOF
 		}
 
+                 $child_args_synop =~ s/^\n*//g;
+                 $child_args_synop =~ s/\n+$/\n/g;
 		if ($child_args_synop ne '') {
 		    $args_synop .= <<EOF;
 <refsect1 id="$section_id.child-properties" role="child_properties">
 <title role="child_properties.title">Child Properties</title>
 <synopsis>
-
 ${child_args_synop}</synopsis>
 </refsect1>
 EOF
+                     $args_desc =~ s/^\n*//g;
+                     $args_desc =~ s/\n+$/\n/g;
 		    $args_desc .= <<EOF;
 <refsect1 id="$section_id.child-property-details" role="child_property_details">
 <title role="child_property_details.title">Child Property Details</title>
@@ -509,15 +518,18 @@
 EOF
 		}
 
+                 $style_args_synop =~ s/^\n*//g;
+                 $style_args_synop =~ s/\n+$/\n/g;
 		if ($style_args_synop ne '') {
 		    $args_synop .= <<EOF;
 <refsect1 id="$section_id.style-properties" role="style_properties">
 <title role="style_properties.title">Style Properties</title>
 <synopsis>
-
 ${style_args_synop}</synopsis>
 </refsect1>
 EOF
+                     $args_desc =~ s/^\n*//g;
+                     $args_desc =~ s/\n+$/\n/g;
 		    $args_desc .= <<EOF;
 <refsect1 id="$section_id.style-property-details" role="style_properties_details">
 <title role="style_properties_details.title">Style Property Details</title>
@@ -526,6 +538,8 @@
 EOF
 		}
 
+                 $hierarchy =~ s/^\n*//g;
+                 $hierarchy =~ s/\n+$/\n/g;
 		if ($hierarchy ne "") {
 		    $hierarchy = <<EOF;
 <refsect1 id="$section_id.object-hierarchy" role="object_hierarchy">
@@ -535,6 +549,8 @@
 EOF
 		}
 
+                 $interfaces =~ s/^\n*//g;
+                 $interfaces =~ s/\n+$/\n/g;
 		if ($interfaces ne "") {
 		    $interfaces = <<EOF;
 <refsect1 id="$section_id.implemented-interfaces" role="impl_interfaces">
@@ -544,6 +560,8 @@
 EOF
 		}
 
+                 $implementations =~ s/^\n*//g;
+                 $implementations =~ s/\n+$/\n/g;
 		if ($implementations ne "") {
 		    $implementations = <<EOF;
 <refsect1 id="$section_id.implementations" role="implementations">
@@ -553,6 +571,8 @@
 EOF
 		}
 
+                 $prerequisites =~ s/^\n*//g;
+                 $prerequisites =~ s/\n+$/\n/g;
 		if ($prerequisites ne "") {
 		    $prerequisites = <<EOF;
 <refsect1 id="$section_id.prerequisites" role="prerequisites">
@@ -562,6 +582,8 @@
 EOF
 		}
 
+                 $derived =~ s/^\n*//g;
+                 $derived =~ s/\n+$/\n/g;
 		if ($derived ne "") {
 		    $derived = <<EOF;
 <refsect1 id="$section_id.derived-interfaces" role="derived_interfaces">
@@ -571,6 +593,8 @@
 EOF
 		}
 
+                 $synopsis =~ s/^\n*//g;
+                 $synopsis =~ s/\n+$/\n/g;
 		my $file_changed = &OutputSGMLFile ($file, $title, $section_id,
 						    $section_includes,
 						    \$synopsis, \$details,
@@ -1594,6 +1618,9 @@
             $include_output .= "#include &lt;${include}&gt;\n";
         }
     }
+    if ($include_output ne '') {
+        $include_output = "\n$include_output\n";
+    }
 
     my $old_sgml_file = "$SGML_OUTPUT_DIR/$file.$OUTPUT_FORMAT";
     my $new_sgml_file = "$SGML_OUTPUT_DIR/$file.$OUTPUT_FORMAT.new";
@@ -1605,7 +1632,7 @@
     foreach my $object (@$file_objects) {
 	next if ($object eq $section_id);
 	my $id = CreateValidSGMLID($object);
-#	print "Debug: Adding anchor for $object\n";
+        #print "Debug: Adding anchor for $object\n";
 	$object_anchors .= "<anchor id=\"$id\"$empty_element_end";
     }
 
@@ -1635,10 +1662,7 @@
 <title role="synopsis.title">Synopsis</title>
 $object_anchors
 <synopsis>
-
-$include_output
-
-$${synopsis}</synopsis>
+$include_output$${synopsis}</synopsis>
 </refsynopsisdiv>
 
 $$hierarchy
@@ -2263,7 +2287,7 @@
     }
 
     # Output the ancestors list, indented and with links.
-    my $hierarchy = "<synopsis>\n\n";
+    my $hierarchy = "<synopsis>\n";
     $level = 0;
     for ($i = $#ancestors; $i >= 0; $i--) {
 	my $link_text;

Modified: trunk/tests/gtk-doc.make
==============================================================================
--- trunk/tests/gtk-doc.make	(original)
+++ trunk/tests/gtk-doc.make	Mon Jan 28 16:07:37 2008
@@ -62,7 +62,7 @@
                test -f $$i || touch $$i ; \
 	    done \
 	fi
-	@PATH=`pwd`:$(PATH) PERL5LIB=`pwd`:$(PERL5LIB) && cd $(srcdir) && \
+	@PATH=$(top_builddir):$(PATH) PERL5LIB=$(top_builddir):$(PERL5LIB) && cd $(srcdir) && \
 	gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(EXTRA_HFILES) $(SCAN_OPTIONS)
 	touch scan-build.stamp
 
@@ -74,7 +74,7 @@
 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
 	@echo 'gtk-doc: Rebuilding template files'
 	@-chmod -R u+w $(srcdir)
-	@PATH=`pwd`:$(PATH) PERL5LIB=`pwd`:$(PERL5LIB) && cd $(srcdir) && \
+	@PATH=$(top_builddir):$(PATH) PERL5LIB=$(top_builddir):$(PERL5LIB) && cd $(srcdir) && \
 	gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
 	touch tmpl-build.stamp
 
@@ -86,8 +86,8 @@
 sgml-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
 	@echo 'gtk-doc: Building XML'
 	@-chmod -R u+w $(srcdir)
-	@cd $(srcdir) && \
-	PATH=`pwd`:$(PATH) PERL5LIB=`pwd`:$(PERL5LIB) gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+	PATH=$(top_builddir):$(PATH) PERL5LIB=$(top_builddir):$(PERL5LIB) && cd $(srcdir) && \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
 	touch sgml-build.stamp
 
 sgml.stamp: sgml-build.stamp
@@ -100,19 +100,23 @@
 	@-chmod -R u+w $(srcdir)
 	rm -rf $(srcdir)/html
 	mkdir $(srcdir)/html
-	@PATH=`pwd`:$(PATH) PERL5LIB=`pwd`:$(PERL5LIB) && cd $(srcdir)/html && \
+	@PATH=$(top_builddir):$(PATH) PERL5LIB=$(top_builddir):$(PERL5LIB) && cd $(srcdir)/html && \
 	gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)  $(MKHTML_OPTIONS)
 	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
 	@echo 'gtk-doc: Fixing cross-references'
-	@PATH=`pwd`:$(PATH) PERL5LIB=`pwd`:$(PERL5LIB) && cd $(srcdir) && \
+	@PATH=$(top_builddir):$(PATH) PERL5LIB=$(top_builddir):$(PERL5LIB) && cd $(srcdir) && \
 	gtkdoc-fixxref --module-dir=html $(FIXXREF_OPTIONS)
 	touch html-build.stamp
 
 ##############
 
+# we need to enforce a rebuild for the tests
 clean-local:
 	rm -f *~ *.bak
 	rm -rf .libs
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
 
 distclean-local:
 	cd $(srcdir) && \



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