oasis icon indicating copy to clipboard operation
oasis copied to clipboard

Support translation of executable names

Open gildor478 opened this issue 4 years ago • 0 comments

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.

gildor478 avatar Oct 24 '20 16:10 gildor478