diff makeref.py @ 1849:301bc61643a9 math_module

merged changes from trunk
author lorenz
date Mon, 16 Nov 2009 18:31:40 +0000
parents fdf70a7fb220
children c777771e11f1
line wrap: on
line diff
--- a/makeref.py	Mon Nov 16 18:05:30 2009 +0000
+++ b/makeref.py	Mon Nov 16 18:31:40 2009 +0000
@@ -87,20 +87,14 @@
         HtmlOut(doc, index, outFile)
         outFile.write(HTMLFinish)
         outFile.close()
- 
-    outFile = open(os.path.join("src", "pygamedocs.h"), "w")
-    outFile.write("/* Auto generated file: with makeref.py .  Docs go in src/ *.doc . */\n")
-    for doc in justDocs:
+
+    for name, doc in docs:
+        outFile = open(os.path.join("src", "doc", "%s_doc.h") % name, "w")
+        outFile.write("/* Auto generated file: with makeref.py .  Docs go in src/ *.doc . */\n")
         WriteDocHeader(outFile, doc, options.have_code_docs)
-
-
-    outFile.write("\n\n/* Docs in a comments... slightly easier to read. */\n\n\n/*")
-    # add the docs as comments to the header file.
-    for doc in justDocs:
+        outFile.write("\n\n/* Docs in a comments... slightly easier to read. */\n\n\n/*")
         WriteDocHeaderComments(outFile, doc)
-
-    outFile.write("\n\n*/\n\n")
-
+        outFile.write("\n\n*/\n\n")
 
     topDoc = LayoutDocs(justDocs)
 
@@ -119,7 +113,7 @@
     f.write('\n\n<a name="%s">\n' % doc.fullname)
     f.write("<big><b>%s</big></b><br><ul>\n" % doc.fullname)
     if doc.descr:
-        f.write("  <i>%s</i><br>\n" % doc.descr) 
+        f.write("  <i>%s</i><br>\n" % doc.descr)
     if doc.protos:
         for p in doc.protos:
             f.write("  <tt>%s</tt><br>\n" % p)