Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mirage/mirage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f80008bf2f45
Choose a base ref
...
head repository: mirage/mirage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50cf03a2fc9c
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 15, 2018

  1. avoid opam pin during installation of dependencies in generated makefile

    unfortunately, opam depext AFAICT doesn't support a local opam file, it needs
     to get the opam file pinned
    
    addresses #852
    hannesm committed Nov 15, 2018
    Copy the full SHA
    624c689 View commit details
  2. Copy the full SHA
    4d190b4 View commit details
  3. Copy the full SHA
    94f3a6e View commit details

Commits on Nov 17, 2018

  1. Merge pull request #948 from hannesm/opam

    avoid opam pin during installation of dependencies in generated makefile
    hannesm authored Nov 17, 2018
    Copy the full SHA
    50cf03a View commit details
Showing with 22 additions and 11 deletions.
  1. +11 −9 lib/mirage.ml
  2. +7 −1 lib/mirage_key.ml
  3. +4 −1 lib/mirage_key.mli
20 changes: 11 additions & 9 deletions lib/mirage.ml
Original file line number Diff line number Diff line change
@@ -483,7 +483,7 @@ let configure_main_xe ~root ~name =

let clean_main_xe ~name = Bos.OS.File.delete Fpath.(v name + "xe")

let configure_makefile ~opam_name =
let configure_makefile ~no_depext ~opam_name =
let open Codegen in
let file = Fpath.(v "Makefile") in
with_output file (fun oc () ->
@@ -492,24 +492,24 @@ let configure_makefile ~opam_name =
newline fmt;
append fmt "-include Makefile.user";
newline fmt;
let depext = if no_depext then "" else "\n\t$(DEPEXT)" in
append fmt "OPAM = opam\n\
DEPEXT ?= opam depext --yes --update %s\n\
DEPEXT ?= $(OPAM) pin add -k path --no-action --yes %s . &&\\\n\
\t$(OPAM) depext --yes --update %s ;\\\n\
\t$(OPAM) pin remove --no-action %s\n\
\n\
.PHONY: all depend depends clean build\n\
all:: build\n\
\n\
depend depends::\n\
\t$(OPAM) pin add -k path --no-action --yes %s .\n\
\t$(DEPEXT)\n\
\t$(OPAM) install --yes --deps-only %s\n\
\t$(OPAM) pin remove --no-action %s\n\
depend depends::%s\n\
\t$(OPAM) install --deps-only .\n\
\n\
build::\n\
\tmirage build\n\
\n\
clean::\n\
\tmirage clean\n"
opam_name opam_name opam_name opam_name;
opam_name opam_name opam_name depext;
R.ok ())
"Makefile"

@@ -570,7 +570,8 @@ let configure i =
Log.warn (fun m -> m "-g not supported for target: %a" Key.pp_target target);
configure_myocamlbuild () >>= fun () ->
configure_opam ~name:opam_name i >>= fun () ->
configure_makefile ~opam_name >>= fun () ->
let no_depext = Key.(get ctx no_depext) in
configure_makefile ~no_depext ~opam_name >>= fun () ->
match target with
| `Xen ->
configure_main_xl "xl" i >>= fun () ->
@@ -862,6 +863,7 @@ module Project = struct
Key.(abstract target);
Key.(abstract warn_error);
Key.(abstract target_debug);
Key.(abstract no_depext);
]
method! packages =
let common = [
8 changes: 7 additions & 1 deletion lib/mirage_key.ml
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ let is_unix =
let warn_error =
let doc = "Enable -warn-error when compiling OCaml sources." in
let doc = Arg.info ~docs:mirage_section ~docv:"BOOL" ~doc ["warn-error"] in
let key = Arg.(opt ~stage:`Configure bool false doc) in
let key = Arg.flag ~stage:`Configure doc in
Key.create "warn_error" key

let target_debug =
@@ -176,6 +176,12 @@ let target_debug =
let key = Arg.flag ~stage:`Configure doc in
Key.create "target_debug" key

let no_depext =
let doc = "Disable call to depext when generating Makefile." in
let doc = Arg.info ~docs:mirage_section ~docv:"BOOL" ~doc ["no-depext"] in
let key = Arg.flag ~stage:`Configure doc in
Key.create "no_depext" key

(** {3 Tracing} *)

let tracing_size default =
5 changes: 4 additions & 1 deletion lib/mirage_key.mli
Original file line number Diff line number Diff line change
@@ -52,7 +52,10 @@ val warn_error: bool key
default, but might might enabled by default in later releases. *)

val target_debug: bool key
(** Enables target-specific support for debugging. *)
(** [-g]. Enables target-specific support for debugging. *)

val no_depext: bool key
(** [--no-depext]. Disables opam depext in depend target of generated Makefile. *)

val tracing_size: int -> int key
(** [--tracing-size]: Key setting the tracing ring buffer size. *)