All of lore.kernel.org
 help / color / mirror / Atom feed
* Makefile environment variables do not work on some host
@ 2021-05-18 20:49 Aymeric Dumaz
  0 siblings, 0 replies; only message in thread
From: Aymeric Dumaz @ 2021-05-18 20:49 UTC (permalink / raw)
  To: yocto

Hello,

I have created a recipe to call multiple makefile and set a variable
if it's not defined inside them, meaning I set it before "oe_runmake".
It works as expected on a Debian testing, but with a Ubuntu base
chroot it does not.

I have written a simple recipe and the steps I used to configure the
Ubuntu chroot; on Debian I can see "var -bar-" inside log.do_compile,
but on Ubuntu it will only be "var --".
I'm not sure where the bug is located; I'm using Dunfell but I always
thought the host running Yocto was not relevant during the
compilation.
Thanks.

### Ubuntu chroot: download the image [0], extract it and start the
chroot, update it [1], add the en_US.UTF-8 locale [2], install Yocto
dependencies [3], then add an user.

### testvar.bb
SRC_URI = "file://Makefile"
LICENSE = "CLOSED"
S = "${WORKDIR}"

do_compile() {
    FOO=bar oe_runmake
}

### Makefile
all:
    @echo "var -$(FOO)-"

clean:


[0] http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.2-base-amd64.tar.gz
[1] apt update && apt upgrade
[2] apt install locales && dpkg-reconfigure locales - select "159" then "3"
[3] apt install python3 python3-distutils binutils chrpath cpio cpp
diffstat g++ gawk gcc git make patch wget xxd

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

only message in thread, other threads:[~2021-05-18 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 20:49 Makefile environment variables do not work on some host Aymeric Dumaz

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.