Set the correct svn:eol-style=native property, please ignore.
[bertos.git] / doc / chm-builder.py
index e6900bd8dccb0534240a574f658f9d25098daa40..fb2cb7253369b6824e523d9018f07b14cb70cfed 100644 (file)
@@ -1,40 +1,40 @@
-"""\r
-To be used on windows platform only to generate BeRTOS .chm documentation.\r
-Requires doxygen.exe and hhc.exe to be in the system PATH.\r
-"""\r
-from __future__ import with_statement\r
-import os, sys\r
-\r
-def move(old_path, new_path):\r
-    if os.path.exists(new_path):\r
-        os.unlink(new_path)\r
-    os.rename(old_path, new_path)\r
-\r
-\r
-if sys.platform != 'win32':\r
-    print "This program can be run only on a Windows machine"\r
-    sys.exit(-1)\r
-\r
-if len(sys.argv) < 2:\r
-    print "Usage: " + sys.argv[0] + " [custom_doxyfile]"\r
-    sys.exit(-1)\r
-\r
-DOC_PATH = 'doc\\offline-reference\\html\\'\r
-toc_modifier = r"doc\chm-toc-modifier.py"\r
-toc_file = DOC_PATH + r"index.hhc"\r
-bertos_toc = r"bertos-toc.hhc"\r
-\r
-\r
-if os.system("doxygen " + sys.argv[1]):\r
-    print "doxygen error"\r
-if os.system(toc_modifier + " " + toc_file + " " + bertos_toc):\r
-    print "toc-modifier error"\r
-move(bertos_toc, toc_file)\r
-\r
-# compile CHM\r
-os.system(r"hhc " + DOC_PATH + "index.hhp")\r
-\r
-chm_target = r"bertos\bertos-doc.chm"\r
-move(DOC_PATH + r"bertos-doc.chm", chm_target)\r
-\r
-\r
+"""
+To be used on windows platform only to generate BeRTOS .chm documentation.
+Requires doxygen.exe and hhc.exe to be in the system PATH.
+"""
+from __future__ import with_statement
+import os, sys
+
+def move(old_path, new_path):
+    if os.path.exists(new_path):
+        os.unlink(new_path)
+    os.rename(old_path, new_path)
+
+
+if sys.platform != 'win32':
+    print "This program can be run only on a Windows machine"
+    sys.exit(-1)
+
+if len(sys.argv) < 2:
+    print "Usage: " + sys.argv[0] + " [custom_doxyfile]"
+    sys.exit(-1)
+
+DOC_PATH = 'doc\\offline-reference\\html\\'
+toc_modifier = r"doc\chm-toc-modifier.py"
+toc_file = DOC_PATH + r"index.hhc"
+bertos_toc = r"bertos-toc.hhc"
+
+
+if os.system("doxygen " + sys.argv[1]):
+    print "doxygen error"
+if os.system(toc_modifier + " " + toc_file + " " + bertos_toc):
+    print "toc-modifier error"
+move(bertos_toc, toc_file)
+
+# compile CHM
+os.system(r"hhc " + DOC_PATH + "index.hhp")
+
+chm_target = r"bertos\bertos-doc.chm"
+move(DOC_PATH + r"bertos-doc.chm", chm_target)
+
+