Skip to content
Browse files

[fix] manpages: finish integration with the build system, avoid calli…

…ng ocamlbuild twice (very costly)
  • Loading branch information...
1 parent 3b7eb76 commit 06c703390ed89042202372840040b5eb28e19824 @OpaOnWindowsNow OpaOnWindowsNow committed Mar 27, 2012
Showing with 10 additions and 4 deletions.
  1. +6 −0 build_tools
  2. +4 −4 manpages/genman.ml
View
6 build_tools
@@ -89,3 +89,9 @@ internal mimetype_database.xml libbase/mimetype_database.xml share/opa
# dissemination
internal opa-cloud dissemination/spawn.sh
+
+#manpages
+internal gen_opa_manpage opa/gen_opa_manpage.native
+internal gen_opatop_manpage opatop/gen_opatop_manpage.native
+internal genman.native manpages/genman.native
+
View
8 manpages/genman.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -37,7 +37,7 @@ let help_summary, help_synopsis, help_description, help_options =
None -> "","","",""
| Some help ->
let reg0 = (* one line summary ? *)
- Str.regexp ("^.*"^ (Str.quote cmdname) ^"[ \t]*:[ \t]*\(.*\)$")
+ Str.regexp ("^.*"^ (Str.quote cmdname) ^"[ \t]*:[ \t]*\\(.*\\)$")
in
let is_blank x =
BaseString.contains " \n\t" x
@@ -53,7 +53,7 @@ let help_summary, help_synopsis, help_description, help_options =
Not_found -> "", 0
in
let reg1 = (* one line synopsis ? *)
- Str.regexp ("^[ \t]*[Uu]sage[ \t]*:.*\("^ (Str.quote cmdname) ^".*\)$")
+ Str.regexp ("^[ \t]*[Uu]sage[ \t]*:.*\\("^ (Str.quote cmdname) ^".*\\)$")
in
let synopsis, pos1 =
try
@@ -66,7 +66,7 @@ let help_summary, help_synopsis, help_description, help_options =
Not_found -> "", pos0
in
let reg2 = (* beginning of the list of options after the description ? *)
- Str.regexp "^\(.*[Oo]ptions.*\):[ \t]*\n\([ \t]*--?[a-zA-Z0-0]+\)"
+ Str.regexp "^\\(.*[Oo]ptions.*\\):[ \t]*\n\\([ \t]*--?[a-zA-Z0-0]+\\)"
in
let description, options =
try

0 comments on commit 06c7033

Please sign in to comment.
Something went wrong with that request. Please try again.