* [PATCH 0/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
@ 2025-05-21 8:50 liezhi.yang
2025-05-21 8:50 ` [PATCH 1/1] " liezhi.yang
0 siblings, 1 reply; 7+ messages in thread
From: liezhi.yang @ 2025-05-21 8:50 UTC (permalink / raw)
To: openembedded-core; +Cc: liezhi.yang
From: Robert Yang <liezhi.yang@windriver.com>
The following changes since commit c7faf141592d1e2a5cab32a83f7e1498ee498d65:
kernel-module-split: Allow for external conf files (2025-05-20 14:47:47 +0100)
are available in the Git repository at:
https://github.com/robertlinux/yocto rbt/autotools
https://github.com/robertlinux/yocto/tree/rbt/autotools
Robert Yang (1):
autotools.bbclass: Copy gettext/po/Makefile.in.in to all
po/Makefile.in.in
meta/classes-recipe/autotools.bbclass | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
--
2.49.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 8:50 [PATCH 0/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in liezhi.yang
@ 2025-05-21 8:50 ` liezhi.yang
2025-05-21 8:55 ` [OE-core] " Gyorgy Sarvari
2025-05-21 10:21 ` Ross Burton
0 siblings, 2 replies; 7+ messages in thread
From: liezhi.yang @ 2025-05-21 8:50 UTC (permalink / raw)
To: openembedded-core; +Cc: liezhi.yang
From: Robert Yang <liezhi.yang@windriver.com>
The previous code only copied to ${S}/po/Makefile.in.in, but there might be
other po/Makefile.in.in in ${S}, for example:
* bison:
runtime-po/Makefile.in.in
gnulib-po/Makefile.in.in
* gawk:
extension/po/Makefile.in.in
* fontconfig
po-conf/Makefile.in.in
* There might be more recipes in oe-core, and more recipes from other layers.
The build would be failed after upgrade gettext to 0.24.1 since gettext changed
the way to include Makevars, so we have to fix the recipes one by one, such as:
do_configure:prepend() {
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/gnulib-po/
}
Even if we don't upgrade gettext to 0.24.1, have different po/Makefile.in.in in
the same ${S} is a kind of bug, this patch can fix the issues.
The fix way is:
Find all possible po/Makefile.in.in, if it is the same as ${S}/po/Makefile.in.in,
then override it with ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes-recipe/autotools.bbclass | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass
index 948f8c183a..d4138bfc57 100644
--- a/meta/classes-recipe/autotools.bbclass
+++ b/meta/classes-recipe/autotools.bbclass
@@ -188,8 +188,28 @@ autotools_do_configure() {
elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
# We'd call gettextize here if it wasn't so broken...
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
+ # Find all possible po/Makefile.in.in, if it is the same as
+ # po/Makefile.in.in, then override it with
+ # ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
if [ -d ${S}/po/ ]; then
- cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
+ makefile_in_in_top=${S}/po/Makefile.in.in
+ need_copy=$makefile_in_in_top
+ if [ -f $makefile_in_in_top ]; then
+ makefile_in_ins="$(find ${S} -name Makefile.in.in)"
+ for makefile_in_in in $makefile_in_ins; do
+ if [ $makefile_in_in != $makefile_in_in_top ]; then
+ diff="$(diff ${S}/po/Makefile.in.in $makefile_in_in)"
+ if [ -z $difff ]; then
+ need_copy="$need_copy $makefile_in_in"
+ fi
+ fi
+ done
+ fi
+ for makefile in $need_copy; do
+ cmd="cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in $makefile"
+ bbnote "Running $cmd"
+ $cmd
+ done
if [ ! -e ${S}/po/remove-potcdate.sed ]; then
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${S}/po/
fi
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 8:50 ` [PATCH 1/1] " liezhi.yang
@ 2025-05-21 8:55 ` Gyorgy Sarvari
2025-05-21 9:26 ` Robert Yang
2025-05-21 10:21 ` Ross Burton
1 sibling, 1 reply; 7+ messages in thread
From: Gyorgy Sarvari @ 2025-05-21 8:55 UTC (permalink / raw)
To: liezhi.yang, openembedded-core
On 5/21/25 10:50, Robert Yang via lists.openembedded.org wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
>
> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
> other po/Makefile.in.in in ${S}, for example:
> * bison:
> runtime-po/Makefile.in.in
> gnulib-po/Makefile.in.in
>
> * gawk:
> extension/po/Makefile.in.in
>
> * fontconfig
> po-conf/Makefile.in.in
>
> * There might be more recipes in oe-core, and more recipes from other layers.
>
> The build would be failed after upgrade gettext to 0.24.1 since gettext changed
> the way to include Makevars, so we have to fix the recipes one by one, such as:
> do_configure:prepend() {
> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/gnulib-po/
> }
>
> Even if we don't upgrade gettext to 0.24.1, have different po/Makefile.in.in in
> the same ${S} is a kind of bug, this patch can fix the issues.
>
> The fix way is:
> Find all possible po/Makefile.in.in, if it is the same as ${S}/po/Makefile.in.in,
> then override it with ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes-recipe/autotools.bbclass | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass
> index 948f8c183a..d4138bfc57 100644
> --- a/meta/classes-recipe/autotools.bbclass
> +++ b/meta/classes-recipe/autotools.bbclass
> @@ -188,8 +188,28 @@ autotools_do_configure() {
> elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
> # We'd call gettextize here if it wasn't so broken...
> cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
> + # Find all possible po/Makefile.in.in, if it is the same as
> + # po/Makefile.in.in, then override it with
> + # ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
> if [ -d ${S}/po/ ]; then
> - cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
> + makefile_in_in_top=${S}/po/Makefile.in.in
> + need_copy=$makefile_in_in_top
> + if [ -f $makefile_in_in_top ]; then
> + makefile_in_ins="$(find ${S} -name Makefile.in.in)"
> + for makefile_in_in in $makefile_in_ins; do
> + if [ $makefile_in_in != $makefile_in_in_top ]; then
> + diff="$(diff ${S}/po/Makefile.in.in $makefile_in_in)"
> + if [ -z $difff ]; then
There seems to be an extra f (difff vs diff)
> + need_copy="$need_copy $makefile_in_in"
> + fi
> + fi
> + done
> + fi
> + for makefile in $need_copy; do
> + cmd="cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in $makefile"
> + bbnote "Running $cmd"
> + $cmd
> + done
> if [ ! -e ${S}/po/remove-potcdate.sed ]; then
> cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${S}/po/
> fi
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#217006): https://lists.openembedded.org/g/openembedded-core/message/217006
> Mute This Topic: https://lists.openembedded.org/mt/113225997/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 8:55 ` [OE-core] " Gyorgy Sarvari
@ 2025-05-21 9:26 ` Robert Yang
0 siblings, 0 replies; 7+ messages in thread
From: Robert Yang @ 2025-05-21 9:26 UTC (permalink / raw)
To: Gyorgy Sarvari, openembedded-core
On 5/21/25 16:55, Gyorgy Sarvari wrote:
>
>
> On 5/21/25 10:50, Robert Yang via lists.openembedded.org wrote:
>> From: Robert Yang <liezhi.yang@windriver.com>
>>
>> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
>> other po/Makefile.in.in in ${S}, for example:
>> * bison:
>> runtime-po/Makefile.in.in
>> gnulib-po/Makefile.in.in
>>
>> * gawk:
>> extension/po/Makefile.in.in
>>
>> * fontconfig
>> po-conf/Makefile.in.in
>>
>> * There might be more recipes in oe-core, and more recipes from other layers.
>>
>> The build would be failed after upgrade gettext to 0.24.1 since gettext changed
>> the way to include Makevars, so we have to fix the recipes one by one, such as:
>> do_configure:prepend() {
>> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
>> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/gnulib-po/
>> }
>>
>> Even if we don't upgrade gettext to 0.24.1, have different po/Makefile.in.in in
>> the same ${S} is a kind of bug, this patch can fix the issues.
>>
>> The fix way is:
>> Find all possible po/Makefile.in.in, if it is the same as ${S}/po/Makefile.in.in,
>> then override it with ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>> meta/classes-recipe/autotools.bbclass | 22 +++++++++++++++++++++-
>> 1 file changed, 21 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass
>> index 948f8c183a..d4138bfc57 100644
>> --- a/meta/classes-recipe/autotools.bbclass
>> +++ b/meta/classes-recipe/autotools.bbclass
>> @@ -188,8 +188,28 @@ autotools_do_configure() {
>> elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
>> # We'd call gettextize here if it wasn't so broken...
>> cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
>> + # Find all possible po/Makefile.in.in, if it is the same as
>> + # po/Makefile.in.in, then override it with
>> + # ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
>> if [ -d ${S}/po/ ]; then
>> - cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
>> + makefile_in_in_top=${S}/po/Makefile.in.in
>> + need_copy=$makefile_in_in_top
>> + if [ -f $makefile_in_in_top ]; then
>> + makefile_in_ins="$(find ${S} -name Makefile.in.in)"
>> + for makefile_in_in in $makefile_in_ins; do
>> + if [ $makefile_in_in != $makefile_in_in_top ]; then
>> + diff="$(diff ${S}/po/Makefile.in.in $makefile_in_in)"
>> + if [ -z $difff ]; then
> There seems to be an extra f (difff vs diff)
Yes, you're right! It's strange that my world built well with this typo. I've
fixed it locally and re-do the world build. Will update the patch if the build
works well.
// Robert
>> + need_copy="$need_copy $makefile_in_in"
>> + fi
>> + fi
>> + done
>> + fi
>> + for makefile in $need_copy; do
>> + cmd="cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in $makefile"
>> + bbnote "Running $cmd"
>> + $cmd
>> + done
>> if [ ! -e ${S}/po/remove-potcdate.sed ]; then
>> cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${S}/po/
>> fi
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#217006): https://lists.openembedded.org/g/openembedded-core/message/217006
>> Mute This Topic: https://lists.openembedded.org/mt/113225997/6084445
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 8:50 ` [PATCH 1/1] " liezhi.yang
2025-05-21 8:55 ` [OE-core] " Gyorgy Sarvari
@ 2025-05-21 10:21 ` Ross Burton
2025-05-21 11:56 ` Robert Yang
2025-06-05 5:40 ` Robert Yang
1 sibling, 2 replies; 7+ messages in thread
From: Ross Burton @ 2025-05-21 10:21 UTC (permalink / raw)
To: liezhi.yang@windriver.com; +Cc: openembedded-core@lists.openembedded.org
On 21 May 2025, at 09:50, Robert Yang via lists.openembedded.org <liezhi.yang=windriver.com@lists.openembedded.org> wrote:
> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
> other po/Makefile.in.in in ${S}, for example:
I’ve made it my life’s work over the last few years to slowly remove all the crazy from autotools.bbclass so I have a counter-proposal: what if gettextize works now?
If there’s a new gettext release we need to integrate, then it’s absolutely worth investigating to see if the tooling now works out of the box. Unfortunately what the breakage actually is has been lost beyond a comment saying that it’s “broken”.
Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 10:21 ` Ross Burton
@ 2025-05-21 11:56 ` Robert Yang
2025-06-05 5:40 ` Robert Yang
1 sibling, 0 replies; 7+ messages in thread
From: Robert Yang @ 2025-05-21 11:56 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org
On 5/21/25 18:21, Ross Burton wrote:
> On 21 May 2025, at 09:50, Robert Yang via lists.openembedded.org <liezhi.yang=windriver.com@lists.openembedded.org> wrote:
>> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
>> other po/Makefile.in.in in ${S}, for example:
>
> I’ve made it my life’s work over the last few years to slowly remove all the crazy from autotools.bbclass so I have a counter-proposal: what if gettextize works now?
I will try gettextize.
>
> If there’s a new gettext release we need to integrate, then it’s absolutely worth investigating to see if the tooling now works out of the box. Unfortunately what the breakage actually is has been lost beyond a comment saying that it’s “broken”.
Before 0.24.1, they way to include Makevars is the following line in
po/Makefile.in.in:
# Makevars gets inserted here. (Don't remove this line!)
After 0.24.1, the above line doesn't work, and the new way is:
# Include the customization of this po/ directory.
include $(srcdir)/Makevars
So po/Makefile.in.in from older gettext doesn't work any more, and will get the
errors like:
make[2]: *** No rule to make target '/config.status', needed by 'Makefile'. Stop.
This is because it doesn't include Makevars which makes it misses var
definitions such as top_builddir.
// Robert
>
> Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
2025-05-21 10:21 ` Ross Burton
2025-05-21 11:56 ` Robert Yang
@ 2025-06-05 5:40 ` Robert Yang
1 sibling, 0 replies; 7+ messages in thread
From: Robert Yang @ 2025-06-05 5:40 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org
Hi Ross,
On 5/21/25 18:21, Ross Burton wrote:
> On 21 May 2025, at 09:50, Robert Yang via lists.openembedded.org <liezhi.yang=windriver.com@lists.openembedded.org> wrote:
>> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
>> other po/Makefile.in.in in ${S}, for example:
>
> I’ve made it my life’s work over the last few years to slowly remove all the crazy from autotools.bbclass so I have a counter-proposal: what if gettextize works now?
>
> If there’s a new gettext release we need to integrate, then it’s absolutely worth investigating to see if the tooling now works out of the box. Unfortunately what the breakage actually is has been lost beyond a comment saying that it’s “broken”.
Sorry for the late reply, I did try gettextize, but things will be worse:
1) gettextize doesn't work for sub-po directories such as runtime-po, we sitll
need find and sub-po/Makefile.in.in and run getextize there
2) The recipe gettext-minimal-native doesn't provide gettextize, so we need
check whether gettextize is present before run it, we need copy the
Makefile.in.in manually if it is not present, that will increase the
code complexity.
So it seems that my current patch is the best choice we have.
// Robert
>
> Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-05 5:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 8:50 [PATCH 0/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in liezhi.yang
2025-05-21 8:50 ` [PATCH 1/1] " liezhi.yang
2025-05-21 8:55 ` [OE-core] " Gyorgy Sarvari
2025-05-21 9:26 ` Robert Yang
2025-05-21 10:21 ` Ross Burton
2025-05-21 11:56 ` Robert Yang
2025-06-05 5:40 ` Robert Yang
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.