diff trunk/src/cmd/DDoc.d @ 740:f3dead0310ce

Added '-v' (verbose) option to command 'ddoc'.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 09 Feb 2008 15:10:13 +0100
parents 49fe21aa387c
children 35184354a502
line wrap: on
line diff
--- a/trunk/src/cmd/DDoc.d	Sat Feb 09 14:24:35 2008 +0100
+++ b/trunk/src/cmd/DDoc.d	Sat Feb 09 15:10:13 2008 +0100
@@ -31,7 +31,7 @@
 import tango.io.FilePath;
 
 void execute(string[] filePaths, string destDir, string[] macroPaths,
-             bool incUndoc, InfoManager infoMan)
+             bool incUndoc, bool verbose, InfoManager infoMan)
 {
   // Parse macro files.
   MacroTable mtable;
@@ -60,11 +60,12 @@
 
     // Generate documentation.
     auto dest = new FilePath(destDir);
-    generateDocumentation(dest, mod, mtable, incUndoc);
+    generateDocumentation(dest, mod, mtable, incUndoc, verbose);
   }
 }
 
-void generateDocumentation(FilePath dest, Module mod, MacroTable mtable, bool incUndoc)
+void generateDocumentation(FilePath dest, Module mod, MacroTable mtable,
+                           bool incUndoc, bool verbose)
 {
   // Create a macro environment for this module.
   mtable = new MacroTable(mtable);
@@ -87,6 +88,8 @@
   auto fileText = expandMacros(mtable, "$(DDOC)");
   // Finally write the file out to the harddisk.
   dest.append(mod.getFQN() ~ ".html");
+  if (verbose)
+    Stdout.formatln("{} > {}", mod.filePath, dest);
   auto file = new File(dest);
   file.write(fileText);
 }