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

Ocamlbuild always rebuilds myocamlbuild.ml on Windows #4710

Closed
vicuna opened this issue Feb 5, 2009 · 2 comments
Closed

Ocamlbuild always rebuilds myocamlbuild.ml on Windows #4710

vicuna opened this issue Feb 5, 2009 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Feb 5, 2009

Original bug ID: 4710
Reporter: mwipliez
Assigned to: ertai
Status: closed (set by @xavierleroy on 2011-05-29T10:20:03Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.0
Fixed in version: 3.11.2+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @ygrek mwipliez

Bug description

If you have a plug-in for Ocamlbuild on Windows, Ocamlbuild will re-build the plug-in every time you invoke it. This does not happen on Linux. It seems to me that this is due to the way Ocamlbuild evaluates the need to recompile the plugin.

In file plugin.ml, line 33, the value "we_have_a_plugin" is defined as follows:
let we_have_a_plugin = sys_file_exists (!Options.build_dir/plugin)

This is used line 55 to check whether the plugin should be rebuilt:
if a && b && c && we_have_a_plugin then
() (* Up to date *)
else...

But on Windows executables have the ".exe" extension, therefore I believe that "we_have_a_plugin" should be defined this way:
let we_have_a_plugin = sys_file_exists (!Options.build_dir/plugin) || sys_file_exists (!Options.build_dir/plugin ^ ".exe")

@vicuna
Copy link
Author

vicuna commented Feb 5, 2009

Comment author: mwipliez

I just tested the above proposed solution, and it works perfectly :)

@vicuna
Copy link
Author

vicuna commented Jun 25, 2009

Comment author: mwipliez

Hi,

could you tell me if this issue has been looked into?
It appears to be present in OCaml 3.11.1 too.

Cheers,
Matthieu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant