From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform
Date: Tue, 14 May 2013 08:20:02 +0200 [thread overview]
Message-ID: <5191D792.6030000@gmail.com> (raw)
In-Reply-To: <1368294854-14729-1-git-send-email-arvidjaar@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5130 bytes --]
On 11.05.2013 19:54, Andrey Borzenkov wrote:
> Currently extra_dist sources are emitted under enabled platform conditions.
> So if module/image/... is not enabled for every platform, extra_dist files
> will not be included in tarball during "make dist" if module is not enabled
> for currently configured platform. As example, attempt to build i386-pc from
> tarball created under x86_64-efi fails with:
>
> make[3]: Entering directory `/home/bor/build/grub/grub-2.00/grub-core'
> gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.7/include -DGRUB_FILE=\"efiemu/loadcore32.c\" ... -c -o efiemu/efiemu_module-loadcore32.o `test -f 'efiemu/loadcore32.c' || echo './'`efiemu/loadcore32.c
> efiemu/loadcore32.c:22:22: fatal error: loadcore.c: No such file or directory
> compilation terminated.
>
> Change gentpl.py to emit dist_noinst_DATA instead. Automake collects them
> even when assignment is under false condition, so it ensures tarball always
> includes the same files on every platform.
>
Go ahead.
> It also changes data to emit dist_<directory>_DATA instead of using EXTRA_DIST.
>
> Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
>
> ---
> conf/Makefile.common | 2 +-
> gentpl.py | 15 +++++++--------
> 2 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/conf/Makefile.common b/conf/Makefile.common
> index ca1cb17..70bbf8b 100644
> --- a/conf/Makefile.common
> +++ b/conf/Makefile.common
> @@ -151,7 +151,7 @@ bin_PROGRAMS =
> platform_DATA =
> sbin_PROGRAMS =
> check_SCRIPTS =
> -grubconf_DATA =
> +dist_grubconf_DATA =
> check_PROGRAMS =
> noinst_SCRIPTS =
> noinst_PROGRAMS =
> diff --git a/gentpl.py b/gentpl.py
> index 22a8b0e..cc56f7d 100644
> --- a/gentpl.py
> +++ b/gentpl.py
> @@ -382,7 +382,7 @@ def module(platform):
> r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_MODULE) " + platform_ccasflags(platform))
> # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
> r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
>
> @@ -410,7 +410,7 @@ def kernel(platform):
> r += var_set(cname() + "_STRIPFLAGS", "$(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) " + platform_stripflags(platform))
> # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
> r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
>
> @@ -443,7 +443,7 @@ def image(platform):
> r += var_set(cname() + "_OBJCOPYFLAGS", "$(OBJCOPYFLAGS_IMAGE) " + platform_objcopyflags(platform))
> # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
> r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
>
> @@ -476,7 +476,7 @@ def library(platform):
> r += var_add(cname() + "_CCASFLAGS", first_time("$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) ") + platform_ccasflags(platform))
> # r += var_add(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> r += first_time(gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)"))
> r += first_time(gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)"))
> return r
> @@ -515,15 +515,14 @@ def program(platform, test=False):
> r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM) " + platform_ccasflags(platform))
> # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
> r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
> return r
>
> def data(platform):
> - r = gvar_add("EXTRA_DIST", platform_sources(platform))
> - r += gvar_add("EXTRA_DIST", extra_dist())
> - r += var_add(installdir() + "_DATA", platform_sources(platform))
> + r = var_add("dist_" + installdir() + "_DATA", platform_sources(platform))
> + r += gvar_add("dist_noinst_DATA", extra_dist())
> return r
>
> def script(platform):
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
prev parent reply other threads:[~2013-05-14 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-11 17:54 [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform Andrey Borzenkov
2013-05-14 6:20 ` Vladimir 'φ-coder/phcoder' Serbinenko [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=5191D792.6030000@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).