Commits

Anonymous committed 0cde946

Fixed the --make flag with xhtml.

Comments (0)

Files changed (2)

modules/App-XML-DocBook-Docmake/Changes

+        - Fixed --make with xhtml - previously it didn't build the
+        xhtml at all.
+
 0.0200  Sun Jun 28 09:46:15 IDT 2009
         - Removed the "all rights reserved" copyright language - it's not
         compatible with the MIT/X11 License anyway.

modules/App-XML-DocBook-Docmake/lib/App/XML/DocBook/Docmake.pm

     return $output_path;
 }
 
+sub _calc_make_output_param_for_xslt
+{
+    my $self = shift;
+    my $args = shift;
+
+    my $output_path = $self->_calc_output_param_for_xslt($args);
+
+    # If it's XHTML, then we need to compare against the index.html
+    # because the directory is freshly made.
+    if ($self->_mode() eq "xhtml")
+    {
+        $output_path .= "index.html";
+    }
+
+    return $output_path;
+}
+
 sub _pre_proc_command
 {
     my ($self, $args) = @_;
 
     my $input_file = $args->{input};
     my $output_file = $args->{output};
+    my $make_output_file = $args->{make_output};
+
+    if (!defined($make_output_file))
+    {
+        $make_output_file = $output_file;
+    }
 
     if (
         (!$self->_make_like())
         $self->_should_update_output(
             {
                 input => $input_file,
-                output => $output_file
+                output => $make_output_file,
             }
         )
     )
         {
             input => $self->_input_path(),
             output => $self->_calc_output_param_for_xslt($args),
+            make_output => $self->_calc_make_output_param_for_xslt($args),
             template =>
             [
                 "xsltproc",