1

Well, title says it all, I want to change the name of my executable because right now I have

Executable myexec
  Path:                 .
  BuildTools:           ocamlbuild
  MainIs:               main.ml
  CompiledObject:       best

And it produces a file main.native instead of myexec, for example.

What I tried to do is to write

PostBuildCommand: cp -L main.native myexec

But that's because I know it will produce a file main.native. What if on another computer it produces a main.byte executable. I can't write :

PostBuildCommand: cp -L main.* cubicle

I find it awful. I saw this post but, strangely, the Oasis part answers to the location question but not the executable name.

Community
  • 1
  • 1
Lhooq
  • 4,281
  • 1
  • 18
  • 37

1 Answers1

0

When you will do make install or, alternatively, ocaml setup.ml -install it will install main.native as myexec. If you really don't want to install into the system, then you can try to configure with prefix equal to $(pwd) and still install, in that case it will install it in your project folder, under a correct name, e.g.,

ocaml setup.ml -configure --prefix `pwd`
make
make reinstall
ivg
  • 34,431
  • 2
  • 35
  • 63
  • I don't want to install. I guess the best way to do it is to rename my `main.ml` file in `myexec.ml` and I'll get a `myexec.native|byte`. – Lhooq Feb 09 '17 at 09:21