All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/pkg-golang: default to rawname to install binaries
@ 2022-03-08 20:11 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2022-03-08 20:11 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=8539378771f7201bf29f207b3d4d6c9e943f3952
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The default currently is to rely on the package name to decide what to
build and install if not specified by the caller. This works nice for
target packages, where a 'foo' package will by default build and
install a 'foo' executable.

However, for host packages, that will build and install a 'host-foo'
exzcutable, which is not really, even really not, what would be
expected.

We fix that by using the package raw name, i.e. the package name with
the host- prefix yanked away.

It is very improbable that there already are many host-golang packages in
the wild (in br2-external trees), but if there are, they would forcibly
define those variables to a sane value.  This change is not incompatible, as
the values provided by packages take precedence; it's just that those
packages now carry superfluous, if innocuous, variable assignments.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-golang.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index 0cb2ed73cc..0b3dc3d32f 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -59,10 +59,10 @@ $(2)_BUILD_TARGETS ?= .
 # been specified, we assume that the binaries to be produced are named
 # after each build target building them (below in <pkg>_BUILD_CMDS).
 ifeq ($$($(2)_BUILD_TARGETS),.)
-$(2)_BIN_NAME ?= $(1)
+$(2)_BIN_NAME ?= $$($(2)_RAWNAME)
 endif
 
-$(2)_INSTALL_BINS ?= $(1)
+$(2)_INSTALL_BINS ?= $$($(2)_RAWNAME)
 
 # Source files in Go usually use an import path resolved around
 # domain/vendor/software. We infer domain/vendor/software from the upstream URL
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-08 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 20:11 [Buildroot] [git commit] package/pkg-golang: default to rawname to install binaries Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.