Remove the need for explicit make grub-emu

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-07 04:45:54 +01:00
parent 2083672af1
commit 19987ffa02
2 changed files with 10 additions and 6 deletions

View file

@ -178,7 +178,10 @@ endif
### General targets. ### General targets.
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst pkglib_DATA += command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst
ifneq ($(platform), emu)
pkglib_DATA += moddep.lst
endif
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
cat $(DEFSYMFILES) /dev/null \ cat $(DEFSYMFILES) /dev/null \
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \ | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
@ -278,7 +281,7 @@ build_env.mk: Makefile
) > $@ ) > $@
pkglib_BUILDDIR += config.h grub_script.tab.h pkglib_BUILDDIR += config.h grub_script.tab.h
all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo) all-local: $(PROGRAMS) $(GRUB_EMU) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo)
install: install-local install: install-local
@ -299,7 +302,7 @@ install-local: all
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \ $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
done done
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
@list='$(bin_UTILITIES)'; for file in $$list; do \ @list='$(bin_UTILITIES) $(GRUB_EMU)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \ $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
@ -375,7 +378,7 @@ uninstall:
dest="`echo $$file | sed 's,.*/,,'`"; \ dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \ rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
done done
@list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \ @list='$(bin_UTILITIES) $(bin_SCRIPTS) $(GRUB_EMU)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
rm -f $(DESTDIR)$(bindir)/$$dest; \ rm -f $(DESTDIR)$(bindir)/$$dest; \
rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \ rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \

View file

@ -82,6 +82,7 @@ pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
grub_emu_LDFLAGS += $(LIBPCIACCESS) grub_emu_LDFLAGS += $(LIBPCIACCESS)
endif endif
include $(srcdir)/conf/common.mk
grub_emu_init.h: genemuinitheader.sh $(pkglib_MODULES) grub_emu_init.h: genemuinitheader.sh $(pkglib_MODULES)
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@ rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
@ -91,8 +92,8 @@ grub_emu_init.c: genemuinit.sh $(pkglib_MODULES)
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinit.sh $(NM) > $@ rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
DISTCLEANFILES += grub_emu_init.c DISTCLEANFILES += grub_emu_init.c
include $(srcdir)/conf/common.mk CLEANFILES += grub-emu
grub-emu: $(pkglib_MODULES) $(pkglib_PROGRAMS) grub-emu: $(pkglib_MODULES) $(pkglib_PROGRAMS)
$(CC) -o $@ $(pkglib_MODULES) $(pkglib_PROGRAMS) $(grub_emu_LDFLAGS) $(LDFLAGS) $(CC) -o $@ $(pkglib_MODULES) $(pkglib_PROGRAMS) $(grub_emu_LDFLAGS) $(LDFLAGS)
GRUB_EMU=grub-emu