]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Integrate grub-mkisofs into the build system.
authorRobert Millan <rmh@aybabtu.com>
Sun, 8 Nov 2009 23:01:34 +0000 (23:01 +0000)
committerRobert Millan <rmh@aybabtu.com>
Sun, 8 Nov 2009 23:01:34 +0000 (23:01 +0000)
ChangeLog.branch
conf/common.rmk
configure.ac
util/i386/coreboot/grub-mkrescue.in

index 4794498ff5c39f6c5db061a11fd234cc9aedf216..dd7639db5e48f2d8d9254acfb3910ba7661d80fd 100644 (file)
@@ -3,3 +3,8 @@
        * util/i386/coreboot/grub-mkrescue.in: New file.
        * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
        variables.
+
+       * conf/common.rmk (bin_SCRIPTS): Add `grub-mkisofs'.
+       (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
+       * configure.ac: Add header and function checks to satisfy grub-mkisofs
+       requirements.
index c1f0bbdcf6a83d4082626da3b6e43b53517edcc2..ed296242de86319e9de8af2bbd040052852e7665 100644 (file)
@@ -28,6 +28,16 @@ ifeq ($(enable_grub_fstest), yes)
 bin_UTILITIES += grub-fstest
 endif
 
+bin_SCRIPTS += grub-mkisofs
+grub_mkisofs_SOURCES = util/mkisofs/eltorito.c util/mkisofs/fnmatch.c  \
+       util/mkisofs/getopt1.c util/mkisofs/getopt.c                    \
+       util/mkisofs/hash.c util/mkisofs/joliet.c                       \
+       util/mkisofs/match.c util/mkisofs/mkisofs.c                     \
+       util/mkisofs/multi.c util/mkisofs/name.c                        \
+       util/mkisofs/rock.c util/mkisofs/tree.c                         \
+       util/mkisofs/write.c
+grub_mkisofs_CFLAGS = -Iutil/mkisofs/include -Wno-all -Werror
+
 # For grub-fstest.
 util/grub-fstest.c_DEPENDENCIES = grub_fstest_init.h
 grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c     \
index 0953e0410475cfbd1d85b3e86a55c7b49e4df950..4decda9693dcbeda94e6ccfdb6913e346036c961 100644 (file)
@@ -181,6 +181,13 @@ fi
 # Check for functions.
 AC_CHECK_FUNCS(posix_memalign memalign asprintf)
 
+# For grub-mkisofs
+AC_HEADER_MAJOR
+AC_HEADER_DIRENT
+AC_CHECK_FUNCS(memmove sbrk strdup)
+AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h)
+AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h)
+
 #
 # Check for target programs.
 #
index fbfc138416444692a1045a851ccba4db61d3f6b2..6731e748e51ffcdf4b17ff42645ec7675b06f2c6 100644 (file)
@@ -31,12 +31,13 @@ platform=@platform@
 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
 
 grub_mkimage=${bindir}/`echo grub-mkelfimage | sed ${transform}`
+grub_mkisofs=${bindir}/`echo grub-mkisofs | sed ${transform}`
 
 # Usage: usage
 # Print the usage.
 usage () {
     cat <<EOF
-Usage: grub-mkrescue [OPTION] output_image
+Usage: $0 [OPTION] output_image
 Make GRUB rescue image.
 
   -h, --help              print this message and exit
@@ -46,8 +47,9 @@ Make GRUB rescue image.
                           (may be specified multiple times)
   --pkglibdir=DIR         use images from directory DIR instead of ${pkglibdir}
   --grub-mkimage=FILE     use FILE as grub-mkimage
+  --grub-mkisofs=FILE     use FILE as grub-mkisofs
 
-grub-mkimage generates a bootable rescue image of the specified type.
+$0 generates a bootable rescue image.
 
 Report bugs to <bug-grub@gnu.org>.
 EOF
@@ -62,7 +64,7 @@ for option in "$@"; do
        usage
        exit 0 ;;
     -v | --version)
-       echo "grub-mkrescue (GNU GRUB ${PACKAGE_VERSION})"
+       echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
        exit 0 ;;
     --modules=*)
        modules=`echo "$option" | sed 's/--modules=//'` ;;
@@ -72,6 +74,8 @@ for option in "$@"; do
        input_dir=`echo "$option" | sed 's/--pkglibdir=//'` ;;
     --grub-mkimage=*)
        grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
+    --grub-mkisofs=*)
+       grub_mkisofs=`echo "$option" | sed 's/--grub-mkisofs=//'` ;;
     -*)
        echo "Unrecognized option \`$option'" 1>&2
        usage
@@ -137,7 +141,7 @@ for i in ${modules} ; do
 done > ${iso9660_dir}/boot/grub/grub.cfg
 
 # build iso image
-grub-mkisofs \
+${grub_mkisofs} \
   --modification-date=$(echo ${iso_uuid} | sed -e s/-//g) \
   -o ${output_image} -r -J ${iso9660_dir}