grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend o


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform
Date: Tue, 14 May 2013 08:20:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

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 <address@hidden>
> 
> ---
>  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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]