cleanup
This commit is contained in:
parent
bd7390ee84
commit
a60f6ee1ac
15 changed files with 131 additions and 343 deletions
27
Makefile.am
27
Makefile.am
|
@ -1,19 +1,6 @@
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEPDIR = .deps-util
|
||||
|
||||
EXTRA_DIST = autogen.sh gentpl.py Makefile.tpl modules.def \
|
||||
\
|
||||
geninit.sh \
|
||||
\
|
||||
gnulib/progname.h gnulib/fnmatch_loop.c gnulib/alloca.h \
|
||||
gnulib/error.h gnulib/fnmatch.h gnulib/getopt.h \
|
||||
gnulib/getopt_int.h gnulib/gettext.h gnulib/progname.h \
|
||||
\
|
||||
util/mkisofs/mkisofs.h util/mkisofs/iso9660.h \
|
||||
util/mkisofs/include/prototyp.h util/mkisofs/defaults.h \
|
||||
util/mkisofs/match.h util/mkisofs/exclude.h \
|
||||
util/mkisofs/msdos_partition.h util/mkisofs/include/fctldefs.h \
|
||||
util/mkisofs/include/mconfig.h util/mkisofs/include/statdefs.h
|
||||
EXTRA_DIST = autogen.sh gentpl.py Makefile.tpl modules.def geninit.sh
|
||||
|
||||
SUBDIRS = . grub-core po docs
|
||||
|
||||
|
@ -46,15 +33,17 @@ grub_script.yy.c grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l
|
|||
CLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||
|
||||
# For libutil.a
|
||||
libutil_a_init.lst: grub_script.tab.h grub_script.yy.h $(libutil_a_SOURCES)
|
||||
rm -f $@
|
||||
libutil.pp: grub_script.tab.h grub_script.yy.h $(libutil_a_SOURCES)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutil_a_CPPFLAGS) $(CPPFLAGS) \
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ \
|
||||
| grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libutil.pp
|
||||
|
||||
libutil_a_init.lst: libutil.pp
|
||||
cat $< | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libutil_a_init.lst
|
||||
|
||||
libutil_a_init.c: libutil_a_init.lst $(top_srcdir)/geninit.sh
|
||||
rm -f $@; sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
||||
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libutil_a_init.c
|
||||
|
||||
if COND_GRUB_MKFONT
|
||||
|
|
42
autogen.sh
42
autogen.sh
|
@ -2,33 +2,39 @@
|
|||
|
||||
set -e
|
||||
|
||||
ln -sf ../NEWS grub-core/
|
||||
ln -sf ../README grub-core/
|
||||
ln -sf ../INSTALL grub-core/
|
||||
ln -sf ../AUTHORS grub-core/
|
||||
ln -sf ../COPYING grub-core/
|
||||
ln -sf ../ABOUT-NLS grub-core/
|
||||
ln -sf ../ChangeLog grub-core/
|
||||
ln -sf ../aclocal.m4 grub-core/
|
||||
ln -sf ../acinclude.m4 grub-core/
|
||||
ln -sf ../config.rpath grub-core/
|
||||
ln -sf ../gentpl.py grub-core/
|
||||
ln -sf ../configure.common grub-core/
|
||||
|
||||
ln -sf grub-core/include .
|
||||
ln -sf grub-core/gnulib .
|
||||
ln -sf grub-core/lib .
|
||||
echo "Creating symlinks..."
|
||||
ln -svf ../NEWS grub-core/
|
||||
ln -svf ../TODO grub-core/
|
||||
ln -svf ../THANKS grub-core/
|
||||
ln -svf ../README grub-core/
|
||||
ln -svf ../INSTALL grub-core/
|
||||
ln -svf ../AUTHORS grub-core/
|
||||
ln -svf ../COPYING grub-core/
|
||||
ln -svf ../ABOUT-NLS grub-core/
|
||||
ln -svf ../ChangeLog grub-core/
|
||||
ln -svf ../aclocal.m4 grub-core/
|
||||
ln -svf ../acinclude.m4 grub-core/
|
||||
ln -svf ../config.rpath grub-core/
|
||||
ln -svf ../gentpl.py grub-core/
|
||||
ln -svf ../configure.common grub-core/
|
||||
|
||||
echo "Creating Makefile.tpl..."
|
||||
python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
|
||||
echo "Running autogen..."
|
||||
autogen -T Makefile.tpl modules.def | sed -e '/^$/{N;/^\n$/D;}' > modules.am
|
||||
|
||||
echo "Creating grub-core/Makefile.tpl..."
|
||||
(cd grub-core && python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl)
|
||||
echo "Running autogen..."
|
||||
(cd grub-core && autogen -T Makefile.tpl modules.def | sed -e '/^$/{N;/^\n$/D;}' > modules.am)
|
||||
|
||||
(cd grub-core && echo timestamp > stamp-h.in)
|
||||
echo "Importing libgcrypt..."
|
||||
(cd grub-core && python import_gcry.py lib/libgcrypt/ .)
|
||||
|
||||
echo "Saving timestamps..."
|
||||
echo timestamp > stamp-h.in
|
||||
autoreconf -vi
|
||||
(cd grub-core && echo timestamp > stamp-h.in)
|
||||
|
||||
echo "Running autoreconf..."
|
||||
autoreconf -vi
|
||||
exit 0
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -44,23 +44,10 @@ AC_CONFIG_HEADER([config.h])
|
|||
|
||||
m4_include([configure.common])
|
||||
|
||||
# Output files.
|
||||
grub_CHECK_LINK_DIR
|
||||
if test x"$link_dir" = xyes ; then
|
||||
AC_CONFIG_LINKS([include/grub/cpu:grub-core/include/grub/$target_cpu])
|
||||
if test "$platform" != emu ; then
|
||||
AC_CONFIG_LINKS([include/grub/machine:grub-core/include/grub/$target_cpu/$platform])
|
||||
fi
|
||||
else
|
||||
mkdir -p include/grub 2>/dev/null
|
||||
rm -rf include/grub/cpu
|
||||
cp -rp $srcdir/grub-core/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
||||
if test "$platform" != emu ; then
|
||||
rm -rf include/grub/machine
|
||||
cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
grub_coredir='grub-core'
|
||||
AC_SUBST(grub_coredir)
|
||||
|
||||
# Output files.
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([po/Makefile])
|
||||
AC_CONFIG_FILES([docs/Makefile])
|
||||
|
|
|
@ -19,12 +19,11 @@
|
|||
AC_ARG_PROGRAM
|
||||
|
||||
# Optimization flag. Allow user to override.
|
||||
if test "x$CFLAGS" = x; then
|
||||
CFLAGS="$CFLAGS -Os"
|
||||
if test "x$TARGET_CFLAGS" = x; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -Os"
|
||||
fi
|
||||
|
||||
# Default HOST_CPPFLAGS
|
||||
CPPFLAGS=''
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_srcdir)/grub-core/include"
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
|
||||
|
@ -43,11 +42,13 @@ case "$target_cpu" in
|
|||
sparc) target_cpu=sparc64 ;;
|
||||
mipsel|mips64el)
|
||||
target_cpu=mips;
|
||||
cpu_CPPFLAGS="-DGRUB_CPU_MIPSEL=1";
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_CPU_MIPSEL=1";
|
||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DGRUB_CPU_MIPSEL=1";
|
||||
;;
|
||||
mips|mips64)
|
||||
target_cpu=mips;
|
||||
cpu_CPPFLAGS="-DGRUB_CPU_MIPS=1";
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_CPU_MIPS=1";
|
||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DGRUB_CPU_MIPS=1";
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -122,28 +123,24 @@ case "$host_os" in
|
|||
esac
|
||||
|
||||
case "$platform" in
|
||||
coreboot) machine_CPPFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;;
|
||||
multiboot) machine_CPPFLAGS="-DGRUB_MACHINE_MULTIBOOT=1" ;;
|
||||
efi) machine_CPPFLAGS="-DGRUB_MACHINE_EFI=1" ;;
|
||||
ieee1275) machine_CPPFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;;
|
||||
qemu) machine_CPPFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
||||
pc) machine_CPPFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
||||
emu) machine_CPPFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
||||
yeeloong) machine_CPPFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
qemu-mips) machine_CPPFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
coreboot) machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;;
|
||||
multiboot) machine_CFLAGS="-DGRUB_MACHINE_MULTIBOOT=1" ;;
|
||||
efi) machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;;
|
||||
ieee1275) machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;;
|
||||
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
||||
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
||||
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
||||
yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
esac
|
||||
case "$target_cpu" in
|
||||
i386) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_I386";;
|
||||
x86_64) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_X86_64";;
|
||||
powerpc) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_POWERPC";;
|
||||
mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;; # cpu_CPPFLAGS handled above
|
||||
sparc64) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_SPARC64";
|
||||
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
||||
mips) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_MIPS=1" ;;
|
||||
sparc64) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
||||
esac
|
||||
machine_CPPFLAGS="$machine_CPPFLAGS -DMACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
|
||||
machine_CFLAGS="$machine_CFLAGS -DMACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
|
||||
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS"
|
||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS"
|
||||
HOST_CPPFLAGS="$HOST_CPPFLAGS $machine_CFLAGS"
|
||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CFLAGS"
|
||||
|
||||
AC_SUBST(host_cpu)
|
||||
AC_SUBST(host_os)
|
||||
|
@ -464,15 +461,25 @@ if test x"$enable_werror" != xno ; then
|
|||
TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
AC_SUBST(TARGET_MODULE_FORMAT)
|
||||
TARGET_CPP="$TARGET_CC -E"
|
||||
TARGET_CCAS=$TARGET_CC
|
||||
|
||||
AC_SUBST(OBJCONV)
|
||||
AC_SUBST(TARGET_CPP)
|
||||
AC_SUBST(TARGET_CCAS)
|
||||
AC_SUBST(TARGET_OBJ2ELF)
|
||||
AC_SUBST(TARGET_APPLE_CC)
|
||||
AC_SUBST(TARGET_MODULE_FORMAT)
|
||||
|
||||
AC_SUBST(TARGET_CFLAGS)
|
||||
AC_SUBST(TARGET_LDFLAGS)
|
||||
AC_SUBST(TARGET_CPPFLAGS)
|
||||
AC_SUBST(TARGET_CCASFLAGS)
|
||||
|
||||
AC_SUBST(TARGET_IMG_LDSCRIPT)
|
||||
AC_SUBST(TARGET_IMG_LDFLAGS)
|
||||
AC_SUBST(TARGET_IMG_CFLAGS)
|
||||
|
||||
AC_SUBST(HOST_CFLAGS)
|
||||
AC_SUBST(HOST_LDFLAGS)
|
||||
AC_SUBST(HOST_CPPFLAGS)
|
||||
|
|
13
gentpl.py
13
gentpl.py
|
@ -136,6 +136,7 @@ def default_cflags(): return collect_values("cflags")
|
|||
def default_ldflags(): return collect_values("ldflags")
|
||||
def default_cppflags(): return collect_values("cppflags")
|
||||
def default_ccasflags(): return collect_values("ccasflags")
|
||||
def default_extra_dist(): return collect_values("extra_dist")
|
||||
|
||||
def group_sources(group, prefix=""): return collect_values(group, prefix) if group else default_sources(prefix)
|
||||
def group_nodist_sources(group, prefix=""): return collect_values(group + "_nodist", prefix) if group else default_nodist_sources(prefix)
|
||||
|
@ -148,6 +149,7 @@ def platform_cflags(platform): return each_group(platform, "_cflags", lambda
|
|||
def platform_ldflags(platform): return each_group(platform, "_ldflags", lambda g: collect_values(g + "_ldflags") if g else default_ldflags())
|
||||
def platform_cppflags(platform): return each_group(platform, "_cppflags", lambda g: collect_values(g + "_cppflags") if g else default_cppflags())
|
||||
def platform_ccasflags(platform): return each_group(platform, "_ccasflags", lambda g: collect_values(g + "_ccasflags") if g else default_ccasflags())
|
||||
def platform_extra_dist(platform): return each_group(platform, "_extra_dist", lambda g: collect_values(g + "_extra_dist") if g else default_extra_dist())
|
||||
def platform_format(platform): return each_group(platform, "_format", lambda g: collect_values(g + "_format") if g else "binary")
|
||||
|
||||
def module(platform):
|
||||
|
@ -164,6 +166,7 @@ def module(platform):
|
|||
r += var_set(canonical_module() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_MODULE) " + platform_cppflags(platform))
|
||||
r += var_set(canonical_module() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_MODULE) " + platform_ccasflags(platform))
|
||||
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_module() + "_SOURCES)")
|
||||
r += gvar_add("CLEANFILES", "$(nodist_" + canonical_module() + "_SOURCES)")
|
||||
|
||||
|
@ -275,6 +278,7 @@ def kernel(platform):
|
|||
r += var_set(canonical_kernel() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) " + platform_cppflags(platform))
|
||||
r += var_set(canonical_kernel() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_KERNEL) " + platform_ccasflags(platform))
|
||||
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_kernel() + "_SOURCES)")
|
||||
r += gvar_add("CLEANFILES", "$(nodist_" + canonical_kernel() + "_SOURCES)")
|
||||
|
||||
|
@ -293,10 +297,12 @@ def image(platform):
|
|||
r += var_set(canonical_image() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) " + platform_cppflags(platform))
|
||||
r += var_set(canonical_image() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) " + platform_ccasflags(platform))
|
||||
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_image() + "_SOURCES)")
|
||||
r += gvar_add("CLEANFILES", "$(nodist_" + canonical_image() + "_SOURCES)")
|
||||
|
||||
r += gvar_add("platform_DATA", "[+ name +].img")
|
||||
r += gvar_add("CLEANFILES", "[+ name +].img")
|
||||
r += rule("[+ name +].img", "[+ name +].image", """
|
||||
if test x$(USE_APPLE_CC_FIXES) = xyes; then \
|
||||
$(MACHO2IMG) $< $@; \
|
||||
|
@ -316,6 +322,7 @@ def library(platform):
|
|||
r += var_set(canonical_name() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) " + platform_cppflags(platform))
|
||||
r += var_set(canonical_name() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) " + platform_ccasflags(platform))
|
||||
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_name() + "_SOURCES)")
|
||||
r += gvar_add("CLEANFILES", "$(nodist_" + canonical_name() + "_SOURCES)")
|
||||
|
||||
|
@ -352,6 +359,7 @@ def program(platform, test=False):
|
|||
r += var_set(canonical_name() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) " + platform_cppflags(platform))
|
||||
r += var_set(canonical_name() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM) " + platform_ccasflags(platform))
|
||||
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_name() + "_SOURCES)")
|
||||
r += gvar_add("CLEANFILES", "$(nodist_" + canonical_name() + "_SOURCES)")
|
||||
|
||||
|
@ -366,7 +374,10 @@ def test_program(platform):
|
|||
return program(platform, True)
|
||||
|
||||
def data(platform):
|
||||
return gvar_add(installdir() + "_DATA", platform_sources(platform))
|
||||
r = gvar_add("EXTRA_DIST", platform_sources(platform))
|
||||
r += gvar_add("EXTRA_DIST", platform_extra_dist(platform))
|
||||
r += gvar_add(installdir() + "_DATA", platform_sources(platform))
|
||||
return r
|
||||
|
||||
def script(platform, test=False):
|
||||
if test:
|
||||
|
|
|
@ -27,24 +27,14 @@ EXTRA_DIST += genhandlerlist.sh
|
|||
EXTRA_DIST += genpartmaplist.sh
|
||||
EXTRA_DIST += genparttoollist.sh
|
||||
EXTRA_DIST += genterminallist.sh
|
||||
|
||||
EXTRA_DIST += lib/libgcrypt_wrap/cipher_wrap.h
|
||||
EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
|
||||
|
||||
EXTRA_DIST += script/yylex.l
|
||||
EXTRA_DIST += script/parser.y
|
||||
|
||||
EXTRA_DIST += lib/relocator.c
|
||||
|
||||
EXTRA_DIST += efiemu/loadcore.c
|
||||
EXTRA_DIST += efiemu/prepare.c
|
||||
|
||||
EXTRA_DIST += loader/machoXX.c
|
||||
|
||||
|
||||
EXTRA_DIST += kern/i386/loader.S
|
||||
EXTRA_DIST += kern/i386/realmode.S
|
||||
EXTRA_DIST += loader/i386/bsdXX.c
|
||||
EXTRA_DIST += loader/i386/bsd_pagetable.c
|
||||
EXTRA_DIST += loader/i386/multiboot_elfxx.c
|
||||
EXTRA_DIST += commands/search.c
|
||||
|
||||
EXTRA_DIST += kern/i386/pc/lzma_decode.S
|
||||
|
|
|
@ -33,21 +33,22 @@ if COND_sparc64_ieee1275
|
|||
endif
|
||||
|
||||
CPPFLAGS_GRUB = -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir)
|
||||
CPPFLAGS_GRUB += -I$(top_srcdir)/include -I$(top_builddir)/include
|
||||
CPPFLAGS_GRUB += -I$(top_srcdir)/$(grub_coredir)/include
|
||||
CPPFLAGS_GRUB += -I$(top_builddir)/$(grub_coredir)/include
|
||||
|
||||
CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers
|
||||
CPPFLAGS_GCRY = -I$(top_srcdir)/lib/libgcrypt_wrap
|
||||
CPPFLAGS_GCRY = -I$(top_srcdir)/$(grub_coredir)/lib/libgcrypt_wrap
|
||||
|
||||
CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))"
|
||||
CPPFLAGS_GNULIB = -I$(top_srcdir)/gnulib
|
||||
CPPFLAGS_GNULIB = -I$(top_srcdir)/$(grub_coredir)/gnulib
|
||||
|
||||
CFLAGS_MKISOFS = -Wno-all -Werror
|
||||
CPPFLAGS_MKISOFS = -D_FILE_OFFSET_BITS=64 -I$(top_srcdir)/util/mkisofs/include
|
||||
|
||||
CFLAGS_POSIX = -fno-builtin
|
||||
CPPFLAGS_POSIX = -I$(top_srcdir)/lib/posix_wrap
|
||||
CPPFLAGS_POSIX = -I$(top_srcdir)/$(grub_coredir)/lib/posix_wrap
|
||||
|
||||
CPPFLAGS_EFIEMU = -I$(top_srcdir)/efiemu/runtime
|
||||
CPPFLAGS_EFIEMU = -I$(top_srcdir)/$(grub_coredir)/efiemu/runtime
|
||||
|
||||
# to calm down automake
|
||||
BUILT_SOURCES =
|
||||
|
|
|
@ -44,28 +44,12 @@ AC_CONFIG_HEADER([config.h])
|
|||
|
||||
m4_include([configure.common])
|
||||
|
||||
TARGET_CPP="$TARGET_CC -E"
|
||||
TARGET_CCAS=$TARGET_CC
|
||||
|
||||
CC=$TARGET_CC
|
||||
CPP=$TARGET_CC
|
||||
CCAS=$TARGET_CC
|
||||
|
||||
AC_SUBST(TARGET_CC)
|
||||
AC_SUBST(TARGET_CPP)
|
||||
AC_SUBST(TARGET_CCAS)
|
||||
AC_SUBST(TARGET_IMG_LDSCRIPT)
|
||||
AC_SUBST(TARGET_IMG_LDFLAGS)
|
||||
AC_SUBST(TARGET_IMG_CFLAGS)
|
||||
AC_SUBST(TARGET_OBJ2ELF)
|
||||
AC_SUBST(TARGET_MODULE_FORMAT)
|
||||
AC_SUBST(OBJCONV)
|
||||
AC_SUBST(TARGET_APPLE_CC)
|
||||
AC_SUBST(ASFLAGS)
|
||||
AC_SUBST(TARGET_CFLAGS)
|
||||
AC_SUBST(TARGET_ASFLAGS)
|
||||
AC_SUBST(TARGET_LDFLAGS)
|
||||
AC_SUBST(TARGET_CPPFLAGS)
|
||||
grub_coredir='.'
|
||||
AC_SUBST(grub_coredir)
|
||||
|
||||
# Output files.
|
||||
grub_CHECK_LINK_DIR
|
||||
|
@ -77,10 +61,10 @@ if test x"$link_dir" = xyes ; then
|
|||
else
|
||||
mkdir -p include/grub 2>/dev/null
|
||||
rm -rf include/grub/cpu
|
||||
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
||||
cp -rp $srcdir/grub-core/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
||||
if test "$platform" != emu ; then
|
||||
rm -rf include/grub/machine
|
||||
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||
cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This gendistlist.sh is free software; the author
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Generate a list of distributed files.
|
||||
|
||||
EXTRA_DISTFILES="AUTHORS COPYING ChangeLog DISTLIST INSTALL NEWS README \
|
||||
THANKS TODO Makefile.in aclocal.m4 autogen.sh config.guess \
|
||||
config.h.in config.sub configure configure.ac gencmdlist.sh \
|
||||
gendistlist.sh genfslist.sh genhandlerlist.sh geninit.sh \
|
||||
geninitheader.sh genkernsyms.sh.in genmk.rb genmoddep.awk \
|
||||
genmodsrc.sh genpartmaplist.sh genparttoollist.sh \
|
||||
genvideolist.sh \
|
||||
gensymlist.sh.in install-sh mkinstalldirs stamp-h.in"
|
||||
|
||||
DISTDIRS="boot bus commands conf disk docs efiemu font fs hello hook include io \
|
||||
kern lib loader mmap normal partmap parttool script term util video"
|
||||
|
||||
LC_COLLATE=C
|
||||
export LC_COLLATE
|
||||
|
||||
for f in $EXTRA_DISTFILES; do
|
||||
echo $f
|
||||
done
|
||||
|
||||
dir=`dirname $0`
|
||||
cd $dir
|
||||
|
||||
for dir in $DISTDIRS; do
|
||||
for d in `find $dir -type d ! -name .svn ! -name .bzr | sort`; do
|
||||
find $d -maxdepth 1 -name '*.[chSy]' -o -name '*.mk' -o -name '*.rmk' \
|
||||
-o -name '*.rb' -o -name '*.in' -o -name '*.tex' -o -name '*.texi' \
|
||||
-o -name '*.info' -o -name 'grub.cfg' -o -name 'README' \
|
||||
-o -name '*.sc' -o -name 'mdate-sh' -o -name '*.sh' \
|
||||
-o -name 'grub-dumpdevtree' -o -name '*.lua' | sort
|
||||
done
|
||||
done
|
|
@ -22,10 +22,7 @@ BEGIN {
|
|||
{
|
||||
module = $2
|
||||
|
||||
# skip if empty
|
||||
if ($1 == "" || $2 == "")
|
||||
;
|
||||
else if ($1 in symtab) {
|
||||
if ($1 in symtab) {
|
||||
modtab[module] = modtab[module] " " symtab[$1];
|
||||
}
|
||||
else if ($1 != "__gnu_local_gp") {
|
||||
|
|
|
@ -105,7 +105,7 @@ int EXPORT_FUNC(grub_dl_ref) (grub_dl_t mod);
|
|||
int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod);
|
||||
void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod));
|
||||
grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name);
|
||||
grub_err_t EXPORT_FUNC(grub_dl_register_symbol) (const char *name, void *addr,
|
||||
grub_err_t grub_dl_register_symbol (const char *name, void *addr,
|
||||
grub_dl_t mod);
|
||||
|
||||
grub_err_t grub_arch_dl_check_header (void *ehdr);
|
||||
|
|
|
@ -348,6 +348,19 @@ module = {
|
|||
library = {
|
||||
name = libgnulib.a;
|
||||
source = gnulib/regex.c;
|
||||
|
||||
extra_dist = gnulib/progname.h;
|
||||
extra_dist = gnulib/alloca.h;
|
||||
extra_dist = gnulib/error.h;
|
||||
extra_dist = gnulib/fnmatch.h;
|
||||
extra_dist = gnulib/getopt.h;
|
||||
extra_dist = gnulib/getopt_int.h;
|
||||
extra_dist = gnulib/gettext.h;
|
||||
extra_dist = gnulib/regcomp.c;
|
||||
extra_dist = gnulib/regexec.c;
|
||||
extra_dist = gnulib/fnmatch_loop.c;
|
||||
extra_dist = gnulib/regex_internal.c;
|
||||
|
||||
cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
|
||||
cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
|
||||
common;
|
||||
|
@ -823,6 +836,11 @@ module = {
|
|||
i386_pc = efiemu/prepare64.c;
|
||||
i386_pc = efiemu/pnvram.c;
|
||||
i386_pc = efiemu/i386/coredetect.c;
|
||||
|
||||
extra_dist = efiemu/prepare.c;
|
||||
extra_dist = efiemu/loadcore.c;
|
||||
extra_dist = efiemu/runtime/efiemu.S;
|
||||
extra_dist = efiemu/runtime/efiemu.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
|
@ -1216,6 +1234,7 @@ module = {
|
|||
x86 = lib/i386/relocator.c;
|
||||
x86 = lib/i386/relocator_asm.S;
|
||||
x86 = lib/i386/relocator_backward.S;
|
||||
extra_dist = lib/relocator.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
|
@ -1280,6 +1299,7 @@ module = {
|
|||
name = multiboot;
|
||||
source = loader/multiboot.c;
|
||||
source = loader/i386/multiboot_mbi.c;
|
||||
extra_dist = loader/multiboot_elfxx.c;
|
||||
x86;
|
||||
};
|
||||
|
||||
|
@ -1312,6 +1332,8 @@ module = {
|
|||
i386_pc = loader/macho64.c;
|
||||
i386_pc = loader/macho.c;
|
||||
i386_pc = loader/xnu.c;
|
||||
|
||||
extra_dist = loader/machoXX.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
|
@ -1445,6 +1467,10 @@ module = {
|
|||
nodist = grub_script.yy.c;
|
||||
nodist = grub_script.tab.h;
|
||||
nodist = grub_script.yy.h;
|
||||
|
||||
extra_dist = script/yylex.l;
|
||||
extra_dist = script/parser.y;
|
||||
|
||||
cflags = '$(CFLAGS_POSIX) -Wno-error';
|
||||
cppflags = '$(CPPFLAGS_POSIX)';
|
||||
};
|
||||
|
|
161
mkinstalldirs
161
mkinstalldirs
|
@ -1,161 +0,0 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2006-05-11.19
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -109,6 +109,7 @@ program = {
|
|||
|
||||
source = util/grub-mkimage.c;
|
||||
source = util/resolve.c;
|
||||
extra_dist = util/grub-mkimagexx.c;
|
||||
|
||||
ldadd = libutil.a;
|
||||
|
||||
|
|
|
@ -123,15 +123,11 @@ source /boot/grub/testcase.cfg
|
|||
halt
|
||||
EOF
|
||||
|
||||
rootdir=`mktemp -d`
|
||||
(cd @abs_top_builddir@ && make DESTDIR=$rootdir install) >/dev/null 2>&1
|
||||
|
||||
isofile=`mktemp`
|
||||
sh @abs_top_builddir@/grub-mkrescue --grub-mkimage=${builddir}/grub-mkimage \
|
||||
--override-directory=${builddir}/grub-core --output=${isofile} \
|
||||
boot/grub/grub.cfg=${cfgfile} \
|
||||
/boot/grub/testcase.cfg=${source} >/dev/null 2>&1
|
||||
rm -rf $rootdir
|
||||
|
||||
hdafile=`mktemp`
|
||||
cp ${isofile} ${hdafile}
|
||||
|
|
Loading…
Reference in a new issue