Re: [PATCH] erofs-utils: fix the source code hierarchy

2018-12-24 Thread Gao Xiang via Linux-erofs



On 2018/12/23 21:02, Li Guifu wrote:
> 1. move generic header files, erofs_fs.h and list_head.h, into include/
> 2. move the other mkfs source files into mkfs/
> 
> Signed-off-by: Li Guifu 

Applied with updating the commit message.

Thanks,
Gao Xiang


[PATCH] erofs-utils: fix the source code hierarchy

2018-12-23 Thread Li Guifu
1. move generic header files, erofs_fs.h and list_head.h, into include/
2. move the other mkfs source files into mkfs/

Signed-off-by: Li Guifu 
---
 Makefile.am   | 32 +--
 configure.ac  |  5 +--
 erofs_fs.h => include/erofs_fs.h  |  0
 list_head.h => include/list_head.h|  0
 mkfs/Makefile.am  | 31 ++
 erofs_cache.c => mkfs/erofs_cache.c   |  0
 erofs_cache.h => mkfs/erofs_cache.h   |  0
 erofs_compressor.c => mkfs/erofs_compressor.c |  0
 erofs_compressor.h => mkfs/erofs_compressor.h |  0
 erofs_config.c => mkfs/erofs_config.c |  0
 erofs_config.h => mkfs/erofs_config.h |  0
 erofs_debug.h => mkfs/erofs_debug.h   |  0
 erofs_error.h => mkfs/erofs_error.h   |  0
 erofs_io.c => mkfs/erofs_io.c |  0
 erofs_io.h => mkfs/erofs_io.h |  0
 erofs_lz4hc.c => mkfs/erofs_lz4hc.c   |  0
 erofs_lz4hc.h => mkfs/erofs_lz4hc.h   |  0
 erofs_types.h => mkfs/erofs_types.h   |  0
 mkfs_erofs.h => mkfs/mkfs_erofs.h |  0
 mkfs_file.c => mkfs/mkfs_file.c   |  0
 mkfs_file.h => mkfs/mkfs_file.h   |  0
 mkfs_inode.c => mkfs/mkfs_inode.c |  0
 mkfs_inode.h => mkfs/mkfs_inode.h |  0
 mkfs_main.c => mkfs/mkfs_main.c   |  0
 24 files changed, 35 insertions(+), 33 deletions(-)
 rename erofs_fs.h => include/erofs_fs.h (100%)
 rename list_head.h => include/list_head.h (100%)
 create mode 100644 mkfs/Makefile.am
 rename erofs_cache.c => mkfs/erofs_cache.c (100%)
 rename erofs_cache.h => mkfs/erofs_cache.h (100%)
 rename erofs_compressor.c => mkfs/erofs_compressor.c (100%)
 rename erofs_compressor.h => mkfs/erofs_compressor.h (100%)
 rename erofs_config.c => mkfs/erofs_config.c (100%)
 rename erofs_config.h => mkfs/erofs_config.h (100%)
 rename erofs_debug.h => mkfs/erofs_debug.h (100%)
 rename erofs_error.h => mkfs/erofs_error.h (100%)
 rename erofs_io.c => mkfs/erofs_io.c (100%)
 rename erofs_io.h => mkfs/erofs_io.h (100%)
 rename erofs_lz4hc.c => mkfs/erofs_lz4hc.c (100%)
 rename erofs_lz4hc.h => mkfs/erofs_lz4hc.h (100%)
 rename erofs_types.h => mkfs/erofs_types.h (100%)
 rename mkfs_erofs.h => mkfs/mkfs_erofs.h (100%)
 rename mkfs_file.c => mkfs/mkfs_file.c (100%)
 rename mkfs_file.h => mkfs/mkfs_file.h (100%)
 rename mkfs_inode.c => mkfs/mkfs_inode.c (100%)
 rename mkfs_inode.h => mkfs/mkfs_inode.h (100%)
 rename mkfs_main.c => mkfs/mkfs_main.c (100%)

diff --git a/Makefile.am b/Makefile.am
index 4381d3d..cb574c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,33 +1,3 @@
 # Makefile.am
-AUTOMAKE_OPTIONS = foreign
-bin_PROGRAMS = mkfs.erofs
-mkfs_erofs_SOURCES = erofs_compressor.c \
-mkfs_file.c \
-erofs_lz4hc.c \
-mkfs_main.c \
-erofs_cache.c \
-erofs_io.c \
-mkfs_inode.c \
-erofs_config.c
-
-noinst_HEADERS = erofs_config.h  \
-mkfs_inode.h \
-erofs_error.h \
-erofs_lz4hc.h \
-list_head.h \
-erofs_cache.h \
-erofs_fs.h \
-erofs_debug.h \
-mkfs_erofs.h \
-erofs_compressor.h \
-erofs_io.h \
-erofs_types.h \
-mkfs_file.h
-
-mkfs_erofs_CFLAGS = -Wall -Werror -DEROFS_MKFS_VERSION=\"v1.0\"
-ACLOCAL_AMFLAGS = -I m4
-
-if SUPPORT_LARG_FILE_AT_BIT32
-mkfs_erofs_CFLAGS += -D_FILE_OFFSET_BITS=64
-endif
 
+SUBDIRS=mkfs
diff --git a/configure.ac b/configure.ac
index 345e8ba..524252f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([mkfs.erofs], [0.0.1], [bluce.ligu...@huawei.com])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
-AC_CONFIG_SRCDIR([mkfs_main.c])
+AC_CONFIG_SRCDIR([mkfs/mkfs_main.c])
 AC_CONFIG_HEADERS([config.h])
 
 # Checks for programs.
@@ -98,5 +98,6 @@ if test "x${have_lz4}" = "x0" ; then
   AC_MSG_ERROR([Cannot build without lz4])
 fi
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile
+mkfs/Makefile])
 AC_OUTPUT
diff --git a/erofs_fs.h b/include/erofs_fs.h
similarity index 100%
rename from erofs_fs.h
rename to include/erofs_fs.h
diff --git a/list_head.h b/include/list_head.h
similarity index 100%
rename from list_head.h
rename to include/list_head.h
diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am
new file mode 100644
index 000..a9240e4
--- /dev/null
+