* [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform
@ 2013-05-11 17:54 Andrey Borzenkov
2013-05-14 6:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2013-05-11 17:54 UTC (permalink / raw)
To: grub-devel
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.
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):
--
tg: (936f633..) u/extra_dist (depends on: master)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform
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
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-05-14 6:20 UTC (permalink / raw)
To: The development of GNU GRUB
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-14 6:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).