grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform
Date: Sat, 11 May 2013 21:54:14 +0400	[thread overview]
Message-ID: <1368294854-14729-1-git-send-email-arvidjaar@gmail.com> (raw)

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)


             reply	other threads:[~2013-05-11 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11 17:54 Andrey Borzenkov [this message]
2013-05-14  6:20 ` [PATCH] emit EXTRA_DIST unconditionally so tarball does not depend on configured platform Vladimir 'φ-coder/phcoder' Serbinenko

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=1368294854-14729-1-git-send-email-arvidjaar@gmail.com \
    --to=arvidjaar@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).