use MODULE_FILES for genemuinit* instead of MOD_FILES

MinGW native nm does not support ELF binaries.
This commit is contained in:
Andrey Borzenkov 2014-01-18 23:15:40 +04:00
parent b204b718cc
commit 015045471e
4 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,11 @@
2014-01-18 Andrey Borzenkov <arvidjaar@gmail.com>
* grub-core/Makefile.am: Build grub_emu_init.[ch] from MODULE_FILES
instead of MOD_FILES.
* grub-core/genemuinit.sh: Simplify stripping of suffix so it works
both with and without .exe.
* grub-core/genemuinitheader.sh: Same.
2014-01-18 Vladimir Serbinenko <phcoder@gmail.com> 2014-01-18 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-install.c: Fix a typo. * util/grub-install.c: Fix a typo.

View file

@ -294,12 +294,12 @@ grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
grub_emu_init.h: genemuinitheader.sh $(MOD_FILES) grub_emu_init.h: genemuinitheader.sh $(MODULE_FILES)
rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@ rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@
CLEANFILES += grub_emu_init.h CLEANFILES += grub_emu_init.h
grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES) grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MODULE_FILES)
rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(TARGET_NM) > $@ rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinit.sh $(TARGET_NM) > $@
CLEANFILES += grub_emu_init.c CLEANFILES += grub_emu_init.c
endif endif

View file

@ -47,7 +47,7 @@ EOF
read mods read mods
for line in $mods; do for line in $mods; do
if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
echo "grub_${line}_init ();" | sed 's,\.mod,,g;' echo "grub_${line%%.*}_init ();"
fi fi
done done
@ -63,7 +63,7 @@ EOF
for line in $mods; do for line in $mods; do
if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
echo "grub_${line}_fini ();" | sed 's,\.mod,,g;' echo "grub_${line%%.*}_fini ();"
fi fi
done done

View file

@ -44,9 +44,9 @@ EOF
read mods read mods
for line in $mods; do for line in $mods; do
if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
echo "void grub_${line}_init (void);" | sed 's,\.mod,,g;' echo "void grub_${line%%.*}_init (void);"
fi fi
if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
echo "void grub_${line}_fini (void);" | sed 's,\.mod,,g;' echo "void grub_${line%%.*}_fini (void);"
fi fi
done done