+2010-09-10 Colin Watson <cjwatson@ubuntu.com>
+
+ grub-fstest needs the host and hostfs modules while other utilities
+ actively require those modules to be absent, so grub-fstest needs
+ its own initialisation and finalisation code.
+
+ * Makefile.am (grub_fstest.pp): New target.
+ (grub_fstest_init.lst): Likewise.
+ (grub_fstest_init.c): Likewise.
+ * Makefile.util.def (grub-fstest): Add grub_fstest_init.c.
+
2010-09-10 Robert Millan <rmh@gnu.org>
* configure.ac: Check for `struct statfs.f_fstypename' and
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
CLEANFILES += libgrub_a_init.c
+# For grub-fstest
+grub_fstest.pp: $(grub_fstest_SOURCES)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_fstest_CPPFLAGS) $(CPPFLAGS) \
+ -D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
+CLEANFILES += grub_fstest.pp
+
+grub_fstest_init.lst: libgrub.pp grub_fstest.pp
+ cat $^ | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
+CLEANFILES += grub_fstest_init.lst
+
+grub_fstest_init.c: grub_fstest_init.lst $(top_srcdir)/geninit.sh
+ sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
+CLEANFILES += grub_fstest_init.c
+
if COND_GRUB_MKFONT
if COND_HAVE_FONT_SOURCE
grubdata_DATA = unicode.pf2 ascii.pf2 ascii.h widthspec.h
program = {
name = grub-fstest;
mansection = 1;
+ common_nodist = grub_fstest_init.c;
common = util/grub-fstest.c;
common = grub-core/kern/emu/hostfs.c;
common = grub-core/disk/host.c;