From 5792951de24ebeaa6e8731ad5f3edfb08a442dd9 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sat, 7 Mar 2015 11:16:54 -0500 Subject: [PATCH] f2fs-tools: fix build system to make distcheck correctly The current build system fails to `make distcheck` correctly for two reasons: 1) Some header files are not listed in the source files for fsck.f2fs and mkfs.f2fs, and so don't make it into the dist tarball. 2) By setting a default prefix in configure.ac, the mock install doesn't add the correct prefix and instead tries to install directly to the file system. This patch corrects those problems and also adds an autogen.sh script for convenience. Signed-off-by: Anthony G. Basile Signed-off-by: Jaegeuk Kim --- autogen.sh | 7 +++++++ configure.ac | 8 ++++---- fsck/Makefile.am | 2 +- mkfs/Makefile.am | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 autogen.sh diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..2b0945d --- /dev/null +++ b/autogen.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +aclocal && \ +autoheader && \ +autoconf && \ +libtoolize && \ +automake -a -c diff --git a/configure.ac b/configure.ac index ae451b8..7c54808 100644 --- a/configure.ac +++ b/configure.ac @@ -76,10 +76,10 @@ AS_IF([test "$ac_cv_header_byteswap_h" = "yes"], [AC_CHECK_DECLS([bswap_64],,,[#include ])]) # Install directories -AC_PREFIX_DEFAULT([/usr]) -AC_SUBST([sbindir], [/sbin]) -AC_SUBST([sysconfdir], [/etc]) -AC_SUBST([localstatedir], [/var]) +#AC_PREFIX_DEFAULT([/usr]) +#AC_SUBST([sbindir], [/sbin]) +#AC_SUBST([sysconfdir], [/etc]) +#AC_SUBST([localstatedir], [/var]) AC_CONFIG_FILES([ Makefile man/Makefile diff --git a/fsck/Makefile.am b/fsck/Makefile.am index 3258e47..6c19e11 100644 --- a/fsck/Makefile.am +++ b/fsck/Makefile.am @@ -3,7 +3,7 @@ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include AM_CFLAGS = -Wall sbin_PROGRAMS = fsck.f2fs -fsck_f2fs_SOURCES = main.c fsck.c dump.c mount.c +fsck_f2fs_SOURCES = main.c fsck.c dump.c mount.c f2fs.h fsck.h $(top_srcdir)/include/f2fs_fs.h fsck_f2fs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/libf2fs.la install-data-hook: diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am index fa48699..7343f23 100644 --- a/mkfs/Makefile.am +++ b/mkfs/Makefile.am @@ -3,5 +3,5 @@ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include AM_CFLAGS = -Wall -DWITH_BLKDISCARD sbin_PROGRAMS = mkfs.f2fs -mkfs_f2fs_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c +mkfs_f2fs_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c f2fs_format_utils.h $(top_srcdir)/include/f2fs_fs.h mkfs_f2fs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/libf2fs.la -- 2.7.4