Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: add camlp4 -version flag. #8405

Closed
vicuna opened this issue Dec 8, 2003 · 2 comments
Closed

RFE: add camlp4 -version flag. #8405

vicuna opened this issue Dec 8, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 8, 2003

Original bug ID: 1969
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Aleksey Nogin
Version: 3.07+2
OS: Red Hat Linux
Submission from: wasco.cs.caltech.edu (131.215.44.173)

Most of the OCaml tools (ocamlc, ocamlmktop, etc) support the -version flag that
causes them to print the "bare" version string without any extra text (which
makes it very useful in Makefiles and other build scripts). It would be nice if
camlp4 recognized the -version flag too.

@vicuna
Copy link
Author

vicuna commented Dec 18, 2003

Comment author: administrator

Here is a simple patch (against the current CVS):

Index: camlp4/camlp4/argl.ml

RCS file: /caml/ocaml/camlp4/camlp4/argl.ml,v
retrieving revision 1.12
diff -u -u -r1.12 argl.ml
--- camlp4/camlp4/argl.ml 2003/07/10 12:28:14 1.12
+++ camlp4/camlp4/argl.ml 2003/12/18 21:22:43
@@ -216,6 +216,12 @@
else raise (Arg.Bad ("don't know what to do with " ^ name))
;

+value print_version_string () =

  • do {
  • print_string Pcaml.version; print_newline(); exit 0
  • }
    +;
  • value print_version () =
    do {
    eprintf "Camlp4 version %s\n" Pcaml.version; flush stderr; exit 0
    @@ -343,7 +349,9 @@
    ("-o", Arg.String (fun x -> Pcaml.output_file.val := Some x),
    " Output on instead of standard output.");
    ("-v", Arg.Unit print_version,
  • "Print Camlp4 version and exit.")]
  • "Print Camlp4 version and exit.");
  • ("-version", Arg.Unit print_version_string,
  • "Print Camlp4 version string and exit.")]
    ;

value anon_fun x =

--
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907

@vicuna
Copy link
Author

vicuna commented May 12, 2004

Comment author: administrator

Assigned to MM or DD.
Fixed by MM on 2004-05-12

@vicuna vicuna closed this as completed May 12, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant