[Pkg-ocaml-maint-commits] [approx] 02/08: simplify build using findlib

Eric Cooper ecc at cmu.edu
Sat Jun 20 17:51:26 UTC 2015


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

ecc-guest pushed a commit to branch upstream
in repository approx.

commit a1b2ac947d26927ca368a5780233970c66c0dc2f
Author: Eric Cooper <ecc at cmu.edu>
Date:   Sat Sep 27 21:12:19 2014 -0400

    simplify build using findlib
---
 Makefile        |  8 ++------
 _tags           | 21 ++++++++++-----------
 myocamlbuild.ml | 28 ----------------------------
 tests/_tags     | 13 ++-----------
 4 files changed, 14 insertions(+), 56 deletions(-)

diff --git a/Makefile b/Makefile
index 015a2f5..2aa1454 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,12 @@
 # approx: proxy server for Debian archive files
-# Copyright (C) 2013  Eric C. Cooper <ecc at cmu.edu>
+# Copyright (C) 2014  Eric C. Cooper <ecc at cmu.edu>
 # Released under the GNU General Public License
 
 OCAMLBUILD := ocamlbuild
-OCAMLBUILD_OPTS := -classic-display
+OCAMLBUILD_OPTS := -classic-display -use-ocamlfind
 
 TARGET := native
 
-ifeq ($(TARGET),byte)
-    OCAMLBUILD_OPTS += -byte-plugin
-endif
-
 programs = approx approx-gc approx-import
 
 all: $(programs)
diff --git a/_tags b/_tags
index 6ff61e3..1402352 100644
--- a/_tags
+++ b/_tags
@@ -1,16 +1,15 @@
 # approx: proxy server for Debian archive files
-# Copyright (C) 2013  Eric C. Cooper <ecc at cmu.edu>
+# Copyright (C) 2014  Eric C. Cooper <ecc at cmu.edu>
 # Released under the GNU General Public License
 
-<**/*.{mli,ml}>: warn_error_A
+<**/*>: warn_error_A
 
-<approx.ml>: use_pcre, use_netstring, use_netcgi, use_nethttpd
-<config_file.ml>: use_pcre
-<import.ml>: use_pcre
-<log.ml>: use_netsys
-<url.ml>: use_netstring
-<util.ml>: use_pcre, use_sha
+<approx.ml>: package(nethttpd), package(pcre)
+<config_file.ml>: package(pcre)
+<log.ml>: package(netsys)
+<url.ml>: package(netstring)
+<util.ml>: package(sha)
+<import.ml>: package(pcre)
 
-<**/*.{byte,native}>: use_unix, use_pcre, use_sha
-<*.{byte,native}>: use_bigarray, use_netsys_oothr, use_netsys, use_str, use_netstring
-<approx.{byte,native}>: use_equeue, use_netcgi, use_nethttpd
+<**/*.{byte,native}>: package(netsys), package(pcre), package(sha)
+<approx.{byte,native}>: package(nethttpd)
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
deleted file mode 100644
index f646941..0000000
--- a/myocamlbuild.ml
+++ /dev/null
@@ -1,28 +0,0 @@
-(* approx: proxy server for Debian archive files
-   Copyright (C) 2013  Eric C. Cooper <ecc at cmu.edu>
-   Released under the GNU General Public License *)
-
-open Ocamlbuild_plugin
-open Command
-open Pathname
-
-let libraries =
-  ["pcre"; "sha";
-   "netsys_oothr"; "netsys"; "equeue";
-   "netstring"; "netcgi2:netcgi"; "nethttpd"]
-
-let split str =
-  let i = String.index str ':' in
-  String.sub str 0 i, String.sub str (i + 1) (String.length str - (i + 1))
-
-let add_library lib =
-  let inc, lib =
-    if String.contains lib ':' then split lib
-    else lib, lib
-  in
-  ocaml_lib ~extern: true ~dir: ("+" ^ inc) lib
-
-let custom_rules () =
-  List.iter add_library libraries
-
-let () = dispatch (function After_rules -> custom_rules () | _ -> ())
diff --git a/tests/_tags b/tests/_tags
index 6cac208..cd83ace 100644
--- a/tests/_tags
+++ b/tests/_tags
@@ -1,14 +1,5 @@
 # approx: proxy server for Debian archive files
-# Copyright (C) 2013  Eric C. Cooper <ecc at cmu.edu>
+# Copyright (C) 2014  Eric C. Cooper <ecc at cmu.edu>
 # Released under the GNU General Public License
 
-<sha1_test.ml>: use_sha
-
-# Note: parent _tags file specifies
-#   <**/*.{byte,native}>: use_unix, use_pcre, use_sha
-# so only additions and deletions to those are needed here
-
-<control_file_test.{byte,native}>: use_bigarray, use_netsys_oothr, use_netsys
-<metadata_test.{byte,native}>: use_bigarray, use_netsys_oothr, use_netsys
-<patch_test.{byte,native}>: -use_pcre
-<sha1_test.{byte,native}>: -use_pcre
+<sha1_test.ml>: package(sha)

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



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