[Pkg-ocaml-maint-commits] [menhir] 01/06: New upstream version 20171013

Ralf Treinen treinen at moszumanska.debian.org
Thu Nov 23 20:32:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

treinen pushed a commit to branch master
in repository menhir.

commit efdf87d096e09ad0fa5e63f9b4c4675c3c22d297
Author: Ralf Treinen <treinen at free.fr>
Date:   Thu Nov 23 08:05:19 2017 +0100

    New upstream version 20171013
---
 CHANGES.md               |  13 +++++
 Makefile                 |  14 ++++--
 doc/version.tex          |   2 +-
 manual.pdf               | Bin 433418 -> 433419 bytes
 menhir.1                 |   2 +-
 src/META                 |   2 +-
 src/Makefile             |  23 ++-------
 src/StaticVersion.ml     |   2 +-
 src/StaticVersion.mli    |   2 +-
 src/_tags                |   4 --
 src/checkOCamlVersion.ml | 123 -----------------------------------------------
 src/version.ml           |   2 +-
 12 files changed, 34 insertions(+), 155 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 5b92d1c..b7183be 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,18 @@
 # Changes
 
+## 2017/10/13
+
+* Remove the OCaml version check at installation time, for greater simplicity,
+  and because for some reason it did not work properly under Cygwin.
+  (Reported by Andrew Appel.)
+
+## 2017/09/26
+
+* `Makefile` fix: when determining whether the suffix `.exe` should be used,
+  one should test whether the OS is Windows,
+  not whether the compiler is MSVC.
+  (Suggested by Jonathan Protzenko.)
+
 ## 2017/07/12
 
 * Include the LaTeX sources of the manual in the official `.tar.gz` archive.
diff --git a/Makefile b/Makefile
index 5ebdbc6..088a014 100644
--- a/Makefile
+++ b/Makefile
@@ -57,19 +57,25 @@ MLYLIB          := src/standard.mly
 
 # A few settings differ on Windows versus Unix.
 
-# If the compiler is MSVC, then the name of the executable file ends in .exe,
-# and object file names end in .obj instead of .o.
+# If the compiler is MSVC, then object file names end in .obj instead of .o.
 
 ifneq (,$(shell ocamlc -config | grep -E "ccomp_type: msvc"))
-  MENHIREXE    := menhir.exe
   OBJ          := obj
 # LIBSUFFIX    := lib
 else
-  MENHIREXE    := menhir
   OBJ          := o
 # LIBSUFFIX    := a
 endif
 
+# If we are under Windows (regardless of whether we are using MSVC or mingw)
+# then the name of the executable file ends in .exe.
+
+ifeq ($(OS),Windows_NT)
+  MENHIREXE    := menhir.exe
+else
+  MENHIREXE    := menhir
+endif
+
 # The path $(installation_libdir), which is recorded in src/installation.ml (see
 # below), must sometimes be translated using cygpath.
 
diff --git a/doc/version.tex b/doc/version.tex
index 003034e..f4e0958 100644
--- a/doc/version.tex
+++ b/doc/version.tex
@@ -1 +1 @@
-\gdef\menhirversion{20170712}
+\gdef\menhirversion{20171013}
diff --git a/manual.pdf b/manual.pdf
index c4a96f5..53a92fd 100644
Binary files a/manual.pdf and b/manual.pdf differ
diff --git a/menhir.1 b/menhir.1
index e241b91..ac2940c 100644
--- a/menhir.1
+++ b/menhir.1
@@ -134,7 +134,7 @@ Synonymous with
 
 .SH AUTHOR
 .B menhir
-was written by Fran�ois Pottier and Yann R�gis-Gianas.
+was written by Fran\(,cois Pottier and Yann R\('egis-Gianas.
 .PP
 This manual page was written by Samuel Mimram <smimram at debian.org>,
 for the Debian project (but may be used by others).
diff --git a/src/META b/src/META
index 1dec03d..2f570ce 100644
--- a/src/META
+++ b/src/META
@@ -1 +1 @@
-version = "20170712"
+version = "20171013"
diff --git a/src/Makefile b/src/Makefile
index 73ebc4c..9b42b41 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -11,6 +11,9 @@ endif
 # Ocamlbuild tool and settings.
 
 OCAMLBUILD := ocamlbuild -classic-display -j 0
+ifeq ($(TARGET),byte)
+  OCAMLBUILD := $(OCAMLBUILD) -byte-plugin
+endif
 
 # ----------------------------------------------------------------------------
 # For everyday development.
@@ -22,28 +25,12 @@ everyday: installation.ml stage1
 # ----------------------------------------------------------------------------
 # Building Menhir from scratch (a.k.a. bootstrapping).
 
-bootstrap: .versioncheck
+bootstrap:
 	@ $(MAKE) stage1
 	@ $(MAKE) stage2
 	@ $(MAKE) stage3
 
 # ----------------------------------------------------------------------------
-# Checking the version of the OCaml compiler.
-
-# We explicitly build checkOCamlVersion as an OCaml binary program,
-# instead of running it as a script, because that would require
-# #loading str.cma, which is not supported on (some versions of?)
-# Windows.
-
-.versioncheck:
-	@ echo Checking that OCaml is recent enough...
-	@ rm -rf _versioncheck
-	@ $(OCAMLBUILD) -build-dir _versioncheck checkOCamlVersion.byte
-	@ _versioncheck/checkOCamlVersion.byte --verbose --gt "4.02"
-	@ rm -rf _versioncheck
-	@ touch $@
-
-# ----------------------------------------------------------------------------
 # Stage 1.
 # Build Menhir using ocamlyacc.
 
@@ -106,4 +93,4 @@ sdk:
 # Cleaning up.
 
 clean::
-	rm -rf .versioncheck _stage1 _stage2 _stage3 _sdk
+	rm -rf _stage1 _stage2 _stage3 _sdk
diff --git a/src/StaticVersion.ml b/src/StaticVersion.ml
index 007a9ba..43b32b2 100644
--- a/src/StaticVersion.ml
+++ b/src/StaticVersion.ml
@@ -1 +1 @@
-let require_20170712 = ()
+let require_20171013 = ()
diff --git a/src/StaticVersion.mli b/src/StaticVersion.mli
index 0a39d0b..776d2fb 100644
--- a/src/StaticVersion.mli
+++ b/src/StaticVersion.mli
@@ -1 +1 @@
-val require_20170712 : unit
+val require_20171013 : unit
diff --git a/src/_tags b/src/_tags
index cb9dbdf..075cffb 100644
--- a/src/_tags
+++ b/src/_tags
@@ -8,9 +8,6 @@ true: \
 # Menhir needs the Unix library.
 <menhir.{byte,native}>: use_unix
 
-# checkOCamlVersion needs the Str library.
-<checkOCamlVersion.byte>: use_str
-
 # Turn off assertions in some modules, where they are useful when debugging, but costly.
 <LRijkstra.*>: noassert
 
@@ -19,4 +16,3 @@ true: \
 # these build directories violate its hygiene rules.
 <_sdk>: -traverse
 <_stage*>: -traverse
-<_versioncheck>: -traverse
diff --git a/src/checkOCamlVersion.ml b/src/checkOCamlVersion.ml
deleted file mode 100644
index fdcf406..0000000
--- a/src/checkOCamlVersion.ml
+++ /dev/null
@@ -1,123 +0,0 @@
-(******************************************************************************)
-(*                                                                            *)
-(*                                   Menhir                                   *)
-(*                                                                            *)
-(*                       François Pottier, Inria Paris                        *)
-(*              Yann Régis-Gianas, PPS, Université Paris Diderot              *)
-(*                                                                            *)
-(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
-(*  terms of the GNU General Public License version 2, as described in the    *)
-(*  file LICENSE.                                                             *)
-(*                                                                            *)
-(******************************************************************************)
-
-(* This module parses ocaml version and confronts it with a user-provided
-   version. *)
-
-(* According to OCaml's manual, the Sys.ocaml_version value follows the
-   regexp [version_regexp].
-*)
-let mnum = "\\([0-9]+\\)"
-
-(* version = major.minor[.patchlevel][+additional-info]. *)
-let version_regexp =
-  Str.regexp
-    (Printf.sprintf "%s\\.%s\\(\\.%s\\)?\\(\\+\\(.+\\)\\)?" mnum mnum mnum)
-
-let must field = function
-  | None -> failwith (Printf.sprintf "\"%s\" field is undefined." field)
-  | Some s -> s
-
-let as_int s =
-  try
-    int_of_string s
-  with Failure _ ->
-    Printf.eprintf "Invalid number '%s'\n" s;
-    exit 1
-
-let parse_version version =
-  let get i =
-    try
-      Some (Str.matched_group i version)
-    with Not_found ->
-      None
-  in
-    if Str.string_match version_regexp version 0 then (
-      as_int (must "major" (get 1)),
-      as_int (must "minor" (get 2)),
-      get 4, get 6
-    ) else
-      begin
-        Printf.eprintf "Failed to retrieve ocaml version.\n";
-        exit 1
-      end
-
-(* The user can compare its version with three different orderings:
-   - eq means major and minor numbers are equal ;
-   - eq-strict means that even the patchlevel and the additional information
-     are equal ;
-   - lt means that ocaml version is older that the user-provided version ;
-   - gt means that ocaml version is newer that the user-provided version. *)
-let eq, eq_strict, gt, lt = ref false, ref false, ref false, ref false
-
-let verbose = ref false
-
-let options = Arg.align
-  [
-    "--eq", Arg.Set eq, " Is the version equal to <version> ?";
-    "--eq-strict", Arg.Set eq_strict,
-    " Is the version strictly equal to <version> ? \
-      (taking into account patchlevel and additional information)";
-    "--gt", Arg.Set gt, " Is the version newer than <version> ? (default)";
-    "--lt", Arg.Set lt, " Is the version older than <version> ?";
-    "--verbose", Arg.Set verbose, " Show version."
-  ]
-
-let usage = "check-ocaml-version [options] <version>\n"
-
-let version = ref None
-
-let set_version s =
-  version := Some s
-
-let _ =
-  Arg.parse options set_version usage
-
-let compare, compare_str, strict =
-  match !eq, !gt, !lt with
-    | true, false, false -> ( = ) , "", !eq_strict
-    | false, true, false -> ( >= ), "or greater ", false
-    | false, false, true -> ( <= ), "or lesser ", false
-    | false, false, false -> (Printf.printf "%s\n%!" Sys.ocaml_version; exit 1)
-    | _ -> failwith "(eq|gt|lt) flags must be used independently"
-
-let compare_version (major, minor, p, a) (major', minor', p', a') =
-  if major = major' then
-    if minor = minor' then
-      if strict then
-        (p = p') && (a = a')
-      else true
-    else compare minor minor'
-  else
-    compare major major'
-
-let _ =
-
-  match !version with
-    | None ->
-        Printf.printf "%s\n%!" Sys.ocaml_version
-
-    | Some version ->
-        let ov = parse_version Sys.ocaml_version
-        and uv = parse_version version in
-        if compare_version ov uv then begin
-          if !verbose then
-            Printf.printf "Version %s is OK.\n%!" Sys.ocaml_version;
-          exit 0
-        end
-        else begin
-          if !verbose then
-            Printf.printf "%s is NOT OK: version %s %swas required.%!\n" Sys.ocaml_version version compare_str;
-          exit 1
-        end
-
diff --git a/src/version.ml b/src/version.ml
index 4f02fe5..c382095 100644
--- a/src/version.ml
+++ b/src/version.ml
@@ -1 +1 @@
-let version = "20170712"
+let version = "20171013"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/menhir.git



More information about the Pkg-ocaml-maint-commits mailing list