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 <blueness@gentoo.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Anthony G. Basile 2015-03-07 11:16:54 -05:00 committed by Jaegeuk Kim
parent fd32210229
commit 5792951de2
4 changed files with 13 additions and 6 deletions

7
autogen.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
aclocal && \
autoheader && \
autoconf && \
libtoolize && \
automake -a -c

View File

@ -76,10 +76,10 @@ AS_IF([test "$ac_cv_header_byteswap_h" = "yes"],
[AC_CHECK_DECLS([bswap_64],,,[#include <byteswap.h>])])
# 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

View File

@ -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:

View File

@ -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