From d3ff5a05ebd200dad68632fbed0d408a8633335a Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Fri, 4 Jun 2010 16:48:42 +0530 Subject: [PATCH] fix for cygwin build --- configure.ac | 4 ++-- configure.common | 6 +++--- grub-core/Makefile.am | 1 + grub-core/configure.ac | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index dfbc6b8be..9ea1486b7 100644 --- a/configure.ac +++ b/configure.ac @@ -42,11 +42,11 @@ AC_PREREQ(2.60) AC_CONFIG_SRCDIR([grub-core/include/grub/dl.h]) AC_CONFIG_HEADER([config.h]) -m4_include([configure.common]) - grub_coredir='grub-core' AC_SUBST(grub_coredir) +m4_include([configure.common]) + # Output files. AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([po/Makefile]) diff --git a/configure.common b/configure.common index 815c76c53..ac3c4edd4 100644 --- a/configure.common +++ b/configure.common @@ -356,10 +356,10 @@ if test x$grub_cv_apple_target_cc = xyes ; then else TARGET_APPLE_CC=0 # Use linker script if present, otherwise use builtin -N script. -if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then - TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" +if test -f "${srcdir}/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then + TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext," - TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," + TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," else TARGET_IMG_LDSCRIPT= TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,' diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index 61a69fca6..85433431d 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = gentpl.py modules.def Makefile.tpl genmoddep.awk EXTRA_DIST += genmodsrc.sh gensymlist.sh genemuinit.sh genemuinitheader.sh EXTRA_DIST += genfslist.sh gencmdlist.sh genvideolist.sh genhandlerlist.sh EXTRA_DIST += genpartmaplist.sh genparttoollist.sh genterminallist.sh +EXTRA_DIST += conf/i386-pc-cygwin-img-ld.sc EXTRA_DIST += $(shell find $(top_srcdir) -name '*.h') include $(top_srcdir)/Makefile.vars diff --git a/grub-core/configure.ac b/grub-core/configure.ac index 6cac2e75c..8d7d760ac 100644 --- a/grub-core/configure.ac +++ b/grub-core/configure.ac @@ -42,15 +42,15 @@ AC_PREREQ(2.60) AC_CONFIG_SRCDIR([include/grub/dl.h]) AC_CONFIG_HEADER([config.h]) +grub_coredir='.' +AC_SUBST(grub_coredir) + m4_include([configure.common]) CC=$TARGET_CC CPP=$TARGET_CC CCAS=$TARGET_CC -grub_coredir='.' -AC_SUBST(grub_coredir) - # Output files. grub_CHECK_LINK_DIR if test x"$link_dir" = xyes ; then