tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

GNUmakefile: add install target for linux systems

Open leongross opened this issue 1 year ago • 5 comments
trafficstars

Small PR adding the option to quickly install custom build binaries to the system path, similar to the way the docs describe it. There are 2 options: local and system-wide installation. The default is system-wide installation.

# defaults to system installation
make install

# system installation, INSTALL_SYSTEM_DIR defaults to /usr/bin
INSTALL_SYSTEM_DIR=<customDir> make install

# user installation, INSTALL_LOCAL_DIR defaults to $HOME/go/bin
INSTALL_LOCAL=1 INSTALL_LOCAL_DIR=<customDir> make install

leongross avatar Jul 26 '24 12:07 leongross

Is there a reason you want to put it in a system path, and not effectively run go install (that puts it in $GOBIN)? Putting it in $GOBIN would make much more sense to me (and in fact, I'd use that a lot if it were available).

aykevl avatar Aug 02 '24 16:08 aykevl

On a multi-user system, it might be useful to install the binary on a system path. Especially when uninstalling the tinygo package from the system path via the systems package manager for development purposes. But the local installation should be replaced by a go install. I still think it is a good idea to wrap this into a make install, since all the rest of the build system is also wrapped into that so it would just make sense.

leongross avatar Aug 05 '24 10:08 leongross

@dkegel-fastly I saw you have been working on the GNUmakefile, thoughts on this PR?

leongross avatar Aug 12 '24 07:08 leongross

Hi @leongross are you still working on this PR?

deadprogram avatar Dec 07 '24 09:12 deadprogram

I stalled it due to other work, maybe someone else can pick this up.

leongross avatar Dec 09 '24 08:12 leongross