From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: Samuel Martin <s.martin49@gmail.com>,
Thomas Devoogdt <thomas.devoogdt@barco.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1, next] pkg-cmake: fix typo for the make backend
Date: Mon, 7 Aug 2023 19:37:00 +0200 [thread overview]
Message-ID: <20230807173700.GY421096@scaer> (raw)
In-Reply-To: <20230807134219.1598626-1-thomas.devoogdt@barco.com>
Thomas, All,
On 2023-08-07 15:42 +0200, Thomas Devoogdt spake thusly:
> A small typo in commit 4cf79d9b71ff5cf2aede3f21e09ade7c7ac59606
> causes the wrong path to be selected.
>
> Cmake breaks on the first compiler check because it isn't
> able to call the make program with the -jxx added.
>
> $(firstword $$(MAKE)) --> -DCMAKE_MAKE_PROGRAM="/usr/bin/make -j13"
> $(firstword $(MAKE)) --> -DCMAKE_MAKE_PROGRAM="/usr/bin/make"
>
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---
> package/pkg-cmake.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index e085fb2b5d..3483b50d46 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -65,7 +65,7 @@ endif
> ifeq ($$($(3)_CMAKE_BACKEND),make)
> $(2)_GENERATOR = "Unix Makefiles"
> # $$(MAKE) can be 'make -jN', we just want 'make' (possibly with a full path)
> -$(2)_GENERATOR_PROGRAM = $(firstword $$(MAKE))
> +$(2)_GENERATOR_PROGRAM = $(firstword $(MAKE))
Actually, it is the $(firstword that must be double-dolared, because we
want the expansion to happen when the macro is evaluated (i.e. at the
time a package uses $(eval $(cmake-package)) ), not at the time it is
parsed (i.e. when make reads the Makefile).
That's because values, esp. paths, may differ. For example, if you
enable BR2_PER_PACKAGE_DIRECTORIES, and you have a package that needs
the Buildroot-built make, then a single dollar will evaluate to (e.g.)
blabla/buildroot/output/host/bin/make
But that does not exist until the end of the build, and we want the
package to use its per-package directory, e.g.
blabla/buildroot/output/per-package/MY_PACKAGE/host/bin/make
I've already fixed that localy, plus another similar issue on line 77,
where we want to use $$(HOST_DIR)/bin/ninja
I'll soon push the fix (I noticed yesterday while doing this big test
build, but forgot to push before hitting my bed...)
Regards,
Yann E. MORIN.
> # Generator specific code (make) should be avoided,
> # but for now, copy them to the new variables.
> $(2)_BUILD_ENV ?= $$($(2)_MAKE_ENV)
> --
> 2.41.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-08-07 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 13:42 [Buildroot] [PATCH v1, next] pkg-cmake: fix typo for the make backend Thomas Devoogdt
2023-08-07 17:37 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230807173700.GY421096@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=s.martin49@gmail.com \
--cc=thomas.devoogdt@barco.com \
--cc=thomas@devoogdt.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.