Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allows clean build on Windows without make #51

Merged
merged 1 commit into from

3 participants

@dch

Fixes #40, using patch based off @slowbro13's original patch. Adding .exe suffix ensures escript can be called successfully on Erlang < R15B02.

Windows by default does not have a working make. This patch ensures
pure Erlang apps can be built with PropEr support despite the lack
of a native make command.

NB rebar compile succeeds with some warnings below, using R15B02:

Z:\repos\proper>rebar compile
==> proper (compile)
Compiled src/strip_types.erl
Compiled src/vararg.erl
Compiled src/proper_transformer.erl
Compiled src/proper_prop_remover.erl
Compiled src/proper_fsm.erl
Compiled src/proper_statem.erl
Compiled src/proper_orddict.erl
Compiled src/proper_symb.erl
Compiled src/proper_sets.erl
Compiled src/proper_array.erl
Compiled src/proper_gb_sets.erl
Compiled src/proper_dict.erl
Compiled src/proper.erl
Compiled src/proper_gb_trees.erl
Compiled src/proper_gen.erl
Compiled src/proper_shrink.erl
Compiled src/proper_arith.erl
src/proper_types.erl:343: Warning: missing specification for function from_binary/1
src/proper_types.erl:460: Warning: missing specification for function unwrap/1
z:/repos/proper/src/proper_types.erl:343: Warning: missing specification for function from_binary/1
z:/repos/proper/src/proper_types.erl:460: Warning: missing specification for function unwrap/1
Compiled src/proper_types.erl
Compiled src/proper_ordsets.erl
Compiled src/proper_typeserver.erl
Compiled src/proper_queue.erl
Dave Cottlehuber Ensure compile_flags.hrl is built even without make
Windows by default does not have a working make. This patch ensures
pure Erlang apps can be built with PropEr support despite the lack
of a native make command.
7cf6267
@kostis
Collaborator

Pulled. Thanks to both @dch and @slowbro13 (what's your real name, by the way? -- I need this for the THANKS file) for this patch.

@kostis kostis merged commit 43a576f into manopapad:master
@dch
@tarekz

This commit has borken our build. It does not work on Linux anymore.

Collaborator

Well I am using Linux and it works for me... Can you be more specific on how/where it breaks?

I did some more digging and found out it was not the code that breaks the build, but the fact that it requires a new version of rebar.
Unfortunately, proper is a dependency in another project we depend on, and we have no control on the version of rebar they have, which is also different from the version of rebar we use on our project. I tried to use the latest rebar version, but then our main config stopped working.
Can you confirm what version of rebar you are using? and if your config works with the latest?

Collaborator

I am not sure I understand this either. For various reasons, PropEr comes with its own copy of rebar (which actually is probably ancient by now). So the problem cannot be in PropEr but it is due to the "other project" you are referring to does not use the rebar that comes with PropEr to build PropEr, but some other rebar else instead.

Exactly :). That is what I was trying to say. The fact that the project I am working on has lots of dependencies, and each has its own rebar.config that may or not be compatible with a particular version of rebar, makes this a nightmare. I think the best solution for now is adding PropEr in our repository and use the old rebar.config.

Collaborator

You have not understood my comment. Please read it again.

What I wrote is that PropEr comes with its own version of rebar (please check PropEr's codebase) and it's that rebar that needs to be used to compile PropEr.

What's your project by the way? I cannot seem to find it anywhere on github...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 29, 2012
  1. Ensure compile_flags.hrl is built even without make

    Dave Cottlehuber authored
    Windows by default does not have a working make. This patch ensures
    pure Erlang apps can be built with PropEr support despite the lack
    of a native make command.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  rebar.config
View
3  rebar.config
@@ -34,5 +34,6 @@
warn_missing_spec, warn_untyped_record]}.
{dialyzer_opts, [{warnings, [unmatched_returns]}]}.
-{pre_hooks, [{compile, "make include/compile_flags.hrl"}]}.
+{pre_hooks, [{"(linux|bsd|darwin|solaris)", compile, "make include/compile_flags.hrl"},
+ {"win32", compile, "escript.exe write_compile_flags include/compile_flags.hrl"}]}.
{post_hooks, [{clean, "./clean_doc.sh"}]}.
Something went wrong with that request. Please try again.