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

Support translation of executable names #536

Open
gildor478 opened this issue Oct 24, 2020 · 0 comments
Open

Support translation of executable names #536

gildor478 opened this issue Oct 24, 2020 · 0 comments

Comments

@gildor478
Copy link
Member

This feature request has been migrated from artifact #1393 on forge.ocamlcore.org. It was assigned to user102.

user111 posted on 2014-05-17 12:34:51:

Some programs receive different names on different systems. This is the case of the GNU Make program and of the BSD Make program which are used by many build systems.

GNU Make is called make on GNU/Linux and Mac OS X, it is called gmake on FreeBSD.

BSD Make is called make on FreeBSD, bsdmake on Mac OS X, bmake on NetBSD, pmake on Debian GNU/Linux.

At the time of writing (0.4.4) maintainers of software packages based on OASIS need to patch the generated setup.ml file to edit the name of make which is used.

Instead of this, the generated setup.ml file should be able to use the appropriate program on each of the aforementioned systems.

A possible solution could implement “virtual tools” identified as ${GNUMAKE} (or $(GNUMAKE) or @gnumake@ or a similar pattern) and ${BSDMAKE} in the _oasis file which are bound to the appropriate name dynamically, when the setup.ml script is run.

user102 replied on 2014-05-19 12:33:31:

The default toolchain of OASIS don't use make at all, except if the use want to use make.

In this case you can do:
ocaml setup.ml -configure --override make /usr/bin/gmake
or
./configure --override make /usr/bin/gmake

And if it doesn't work, you still have the possiblity to run sed on setup.data to replace the command.

In any case, if someone use directly "make" in command invocation this is not good. One must use the following consstruct:

XCustomBuild: $make foobar
BuildTools: make

This will trigger detecting make in configure steps rather than using it directly. This will also allow the above override to work flawlessly.

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