2008-01-31 Robert Millan * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the top. (normal/command.c_DEPENDENCIES): New variable. (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables. * conf/i386-ieee1275.rmk: Likewise. * conf/i386-linuxbios.rmk: Likewise. * conf/i386-pc.rmk: Likewise. * conf/sparc64-ieee1275.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. (grub_emu_SOURCES): Add `fs/fshelp.c'. * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it. diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/i386-efi.rmk ./conf/i386-efi.rmk --- ../grub2/conf/i386-efi.rmk 2008-01-30 16:32:55.000000000 +0100 +++ ./conf/i386-efi.rmk 2008-01-31 16:56:45.000000000 +0100 @@ -4,6 +4,10 @@ COMMON_ASFLAGS = -nostdinc -fno-builtin COMMON_CFLAGS = -fno-builtin -m32 COMMON_LDFLAGS = -melf_i386 -nostdlib +# Used by various components. These rules need to precede them. +normal/execute.c_DEPENDENCIES = grub_script.tab.h +normal/command.c_DEPENDENCIES = grub_script.tab.h + # Utilities. bin_UTILITIES = grub-mkimage sbin_UTILITIES = grub-mkdevicemap @@ -29,8 +33,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkd # For grub-emu. util/grub-emu.c_DEPENDENCIES = grub_emu_init.h -normal/execute.c_DEPENDENCIES = grub_script.tab.h -grub-emu_DEPENDENCIES = grub_script.tab.c grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/configfile.c commands/help.c \ commands/terminal.c commands/ls.c commands/test.c \ @@ -99,7 +101,6 @@ kernel_syms.lst: $(addprefix include/gru /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/i386-ieee1275.rmk ./conf/i386-ieee1275.rmk --- ../grub2/conf/i386-ieee1275.rmk 2008-01-30 16:32:55.000000000 +0100 +++ ./conf/i386-ieee1275.rmk 2008-01-31 16:55:57.000000000 +0100 @@ -4,6 +4,10 @@ COMMON_ASFLAGS = -m32 -nostdinc -fno-bui COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3 COMMON_LDFLAGS = -nostdlib -static -lgcc +# Used by various components. These rules need to precede them. +normal/execute.c_DEPENDENCIES = grub_script.tab.h +normal/command.c_DEPENDENCIES = grub_script.tab.h + # Images. pkglib_PROGRAMS = kernel.elf @@ -54,8 +58,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkd # For grub-emu. util/grub-emu.c_DEPENDENCIES = grub_emu_init.h -normal/execute.c_DEPENDENCIES = grub_script.tab.h -grub-emu_DEPENDENCIES = grub_script.tab.c grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/configfile.c commands/echo.c commands/help.c \ commands/terminal.c commands/ls.c commands/test.c \ @@ -93,7 +95,6 @@ pkglib_MODULES = normal.mod halt.mod reb multiboot.mod _multiboot.mod serial.mod # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/i386-linuxbios.rmk ./conf/i386-linuxbios.rmk --- ../grub2/conf/i386-linuxbios.rmk 2008-01-30 16:32:55.000000000 +0100 +++ ./conf/i386-linuxbios.rmk 2008-01-31 16:57:11.000000000 +0100 @@ -4,6 +4,10 @@ COMMON_ASFLAGS = -m32 -nostdinc -fno-bui COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3 COMMON_LDFLAGS = -nostdlib -static -lgcc +# Used by various components. These rules need to precede them. +normal/execute.c_DEPENDENCIES = grub_script.tab.h +normal/command.c_DEPENDENCIES = grub_script.tab.h + # Images. pkglib_PROGRAMS = kernel.elf @@ -53,8 +57,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkd # For grub-emu. util/grub-emu.c_DEPENDENCIES = grub_emu_init.h -normal/execute.c_DEPENDENCIES = grub_script.tab.h -grub-emu_DEPENDENCIES = grub_script.tab.c grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/configfile.c commands/echo.c commands/help.c \ commands/terminal.c commands/ls.c commands/test.c \ @@ -103,7 +105,6 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/i386-pc.rmk ./conf/i386-pc.rmk --- ../grub2/conf/i386-pc.rmk 2008-01-30 16:32:56.000000000 +0100 +++ ./conf/i386-pc.rmk 2008-01-31 16:56:51.000000000 +0100 @@ -89,8 +89,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkd # For grub-emu. util/grub-emu.c_DEPENDENCIES = grub_emu_init.h -normal/execute.c_DEPENDENCIES = grub_script.tab.h -grub-emu_DEPENDENCIES = grub_script.tab.c grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/configfile.c commands/echo.c commands/help.c \ commands/terminal.c commands/ls.c commands/test.c \ @@ -166,7 +164,6 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/powerpc-ieee1275.rmk ./conf/powerpc-ieee1275.rmk --- ../grub2/conf/powerpc-ieee1275.rmk 2008-01-30 16:32:56.000000000 +0100 +++ ./conf/powerpc-ieee1275.rmk 2008-01-31 17:02:45.000000000 +0100 @@ -5,6 +5,10 @@ COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY_ COMMON_CFLAGS = -ffreestanding -msoft-float COMMON_LDFLAGS += -nostdlib +# Used by various components. These rules need to precede them. +normal/execute.c_DEPENDENCIES = grub_script.tab.h +normal/command.c_DEPENDENCIES = grub_script.tab.h + # Images. MOSTLYCLEANFILES += kernel_elf_symlist.c kernel_syms.lst @@ -41,8 +45,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkd # For grub-emu util/grub-emu.c_DEPENDENCIES = grub_emu_init.h -normal/execute.c_DEPENDENCIES = grub_script.tab.h -grub-emu_DEPENDENCIES = grub_script.tab.c grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ commands/configfile.c commands/help.c \ commands/search.c commands/terminal.c commands/test.c \ @@ -59,7 +61,7 @@ grub_emu_SOURCES = commands/boot.c comma kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \ kern/err.c kern/file.c kern/fs.c kern/loader.c kern/main.c \ kern/misc.c kern/parser.c kern/partition.c kern/rescue.c \ - kern/term.c \ + kern/term.c fs/fshelp.c \ normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ @@ -114,7 +116,6 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/conf/sparc64-ieee1275.rmk ./conf/sparc64-ieee1275.rmk --- ../grub2/conf/sparc64-ieee1275.rmk 2007-12-25 10:09:43.000000000 +0100 +++ ./conf/sparc64-ieee1275.rmk 2008-01-31 16:57:39.000000000 +0100 @@ -5,6 +5,10 @@ COMMON_ASFLAGS = -nostdinc COMMON_CFLAGS = -ggdb -ffreestanding -m64 -mno-app-regs COMMON_LDFLAGS = -melf64_sparc -nostdlib +# Used by various components. These rules need to precede them. +normal/execute.c_DEPENDENCIES = grub_script.tab.h +normal/command.c_DEPENDENCIES = grub_script.tab.h + # Images. MOSTLYCLEANFILES += kernel_elf_symlist.c kernel_syms.lst @@ -151,7 +155,6 @@ sfs_mod_LDFLAGS = $(COMMON_LDFLAGS) #linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. -normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/completion.c normal/execute.c \ normal/function.c normal/lexer.c normal/main.c normal/menu.c \ diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/genmk.rb ./genmk.rb --- ../grub2/genmk.rb 2008-01-25 23:33:56.000000000 +0100 +++ ./genmk.rb 2008-01-31 22:00:28.000000000 +0100 @@ -70,7 +70,7 @@ MOSTLYCLEANFILES += #{deps_str} extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end dir = File.dirname(src) - "#{obj}: #{src} + "#{obj}: #{src} $(#{src}_DEPENDENCIES) $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $< -include #{dep} @@ -146,7 +146,7 @@ endif extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end dir = File.dirname(src) - "#{obj}: #{src} + "#{obj}: #{src} $(#{src}_DEPENDENCIES) $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $< -include #{dep} @@ -154,12 +154,12 @@ CLEANFILES += #{command} #{fs} COMMANDFILES += #{command} FSFILES += #{fs} -#{command}: #{src} gencmdlist.sh +#{command}: #{src} $(#{src}_DEPENDENCIES) gencmdlist.sh set -e; \ $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ | sh $(srcdir)/gencmdlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) -#{fs}: #{src} genfslist.sh +#{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh set -e; \ $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ | sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) @@ -237,7 +237,7 @@ MOSTLYCLEANFILES += #{deps_str} dep = deps[i] dir = File.dirname(src) - "#{obj}: #{src} + "#{obj}: #{src} $(#{src}_DEPENDENCIES) $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -MD -c -o $@ $< -include #{dep} @@ -264,7 +264,7 @@ class Script "CLEANFILES += address@hidden address@hidden: #{src} config.status address@hidden: #{src} $(#{src}_DEPENDENCIES) config.status ./config.status --file=#{name}:#{src} chmod +x $@