grub/grub-core/genmoddep.awk

103 lines
2.5 KiB
Awk
Raw Normal View History

2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
#! /usr/bin/awk -f
#
# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This genmoddep.awk 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.
2010-08-29 05:47:30 +00:00
# Read symbols' info from stdin.
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
BEGIN {
2010-08-29 05:47:30 +00:00
error = 0
}
{
if ($1 == "defined") {
2017-08-14 14:27:10 +00:00
if ($3 !~ /^\.refptr\./ && $3 in symtab) {
printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr";
error++;
}
symtab[$3] = $2;
modtab[$2] = "" modtab[$2]
} else if ($1 == "undefined") {
if ($3 in symtab)
modtab[$2] = modtab[$2] " " symtab[$3];
else if ($3 != "__gnu_local_gp" && $3 != "_gp_disp") {
printf "%s in %s is not defined\n", $3, $2 >"/dev/stderr";
2010-08-29 05:47:30 +00:00
error++;
}
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
}
else {
printf "error: %u: unrecognized input format\n", NR >"/dev/stderr";
error++;
}
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
}
# Output the result.
END {
if (error >= 1)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
exit 1;
2009-06-10 21:04:23 +00:00
total_depcount = 0
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
for (mod in modtab) {
# Remove duplications.
split(modtab[mod], depmods, " ");
for (depmod in uniqmods) {
delete uniqmods[depmod];
}
for (i in depmods) {
depmod = depmods[i];
# Ignore kernel, as always loaded.
if (depmod != "kernel" && depmod != mod)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
uniqmods[depmod] = 1;
}
modlist = ""
depcount[mod] = 0
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
for (depmod in uniqmods) {
modlist = modlist " " depmod;
inverse_dependencies[depmod] = inverse_dependencies[depmod] " " mod
depcount[mod]++
total_depcount++
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
}
if (mod == "all_video") {
continue;
}
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
printf "%s:%s\n", mod, modlist;
}
# Check that we have no dependency circles
while (total_depcount != 0) {
something_done = 0
for (mod in depcount) {
if (depcount[mod] == 0) {
delete depcount[mod]
split(inverse_dependencies[mod], inv_depmods, " ");
for (ctr in inv_depmods) {
depcount[inv_depmods[ctr]]--
total_depcount--
}
delete inverse_dependencies[mod]
something_done = 1
}
}
if (something_done == 0) {
for (mod in depcount) {
circle = circle " " mod
}
printf "error: modules %s form a dependency circle\n", circle >"/dev/stderr";
exit 1
}
}
modlist = ""
while (getline <"video.lst") {
modlist = modlist " " $1;
}
printf "all_video:%s\n", modlist;
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org> * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/i386/pc/grub-install.in (host_cpu): Removed. (target_cpu): New variable. (pkglibdir): Use target_cpu instead of host_cpu. * util/genmoddep.c: Removed. * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. * kern/dl.c: Likewise. * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to ... (GRUB_TARGET_SIZEOF_VOID_P): ... this. (GRUB_HOST_SIZEOF_LONG): Renamed to ... (GRUB_TARGET_SIZEOF_LONG): ... this. (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ... (GRUB_TARGET_WORDS_BIGENDIAN): ... this. * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P. [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG instead of GRUB_HOST_SIZEOF_LONG. [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of GRUB_HOST_WORDS_BIGENDIAN to define or undefine GRUB_CPU_WORDS_BIGENDIAN. Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to define grub_host_addr_t, grub_host_off_t, grub_host_size_t and grub_host_ssize_t. * conf/i386-efi.rmk (noinst_UTILITIES): Removed. (genmoddep_SOURCES): Likewise. * conf/i386-pc.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES): Likewise. (genmoddep_SOURCES): Likewise. * genmoddep.awk: New file. * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC, CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively. (PModule::rule): Likewise. (Program::rule): Likewise. (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS, respectively. * configure.ac: Rewritten intensively to use host and target instead of build and host, respectively. * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu. (host_cpu): Removed. (target_cpu): New variable. (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\". (BUILD_CC): Removed. (BUILD_CFLAGS): Likewise. (BUILD_CPPFLAGS): Likewise. (TARGET_CC): New variable. (TARGET_CFLAGS): Likewise. (TARGET_CPPFLAGS): Likewise. (TARGET_LDFLAGS): Likewise. (AWK): Likewise. (include): Use target_cpu instead of host_cpu. (moddep.lst:): Use genmoddep.awk instead of genmoddep. * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
}