Skip to contentSkip to conversation

erofs-utils: fix the source code hierarchy

PATCH New Li Guifu 2 participants 2 messages Dec 23, 2018 – Dec 24, 2018 Kbuild

lore
Share & tools
lore

Li Guifu

author
#0 lore raw

PATCH 1/1 erofs-utils: fix the source code hierarchy

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 <blucerlee at gmail.com>
---
 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%)
Makefile.am +1 -31
index 4381d3d..cb574c3 100644
@@ -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
configure.ac +3 -2
index 345e8ba..524252f 100644
@@ -6,7 +6,7 @@ AC_INIT([mkfs.erofs], [0.0.1], [bluce.liguifu at 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
include/erofs_fs.h renamed from erofs_fs.h +0 -0
similarity index 100%
rename from erofs_fs.h
rename to include/erofs_fs.h
include/list_head.h renamed from list_head.h +0 -0
similarity index 100%
rename from list_head.h
rename to include/list_head.h
mkfs/Makefile.am new file +31 -0
new file mode 100644
index 0000000..a9240e4
@@ -0,0 +1,31 @@
+## 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 \
+				 erofs_cache.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\" -I$(top_srcdir)/include
+ACLOCAL_AMFLAGS = -I m4
+
+if SUPPORT_LARG_FILE_AT_BIT32
+    mkfs_erofs_CFLAGS += -D_FILE_OFFSET_BITS=64
+endif
+
mkfs/erofs_cache.c renamed from erofs_cache.c +0 -0
similarity index 100%
rename from erofs_cache.c
rename to mkfs/erofs_cache.c
mkfs/erofs_cache.h renamed from erofs_cache.h +0 -0
similarity index 100%
rename from erofs_cache.h
rename to mkfs/erofs_cache.h
mkfs/erofs_compressor.c renamed from erofs_compressor.c +0 -0
similarity index 100%
rename from erofs_compressor.c
rename to mkfs/erofs_compressor.c
mkfs/erofs_compressor.h renamed from erofs_compressor.h +0 -0
similarity index 100%
rename from erofs_compressor.h
rename to mkfs/erofs_compressor.h
mkfs/erofs_config.c renamed from erofs_config.c +0 -0
similarity index 100%
rename from erofs_config.c
rename to mkfs/erofs_config.c
mkfs/erofs_config.h renamed from erofs_config.h +0 -0
similarity index 100%
rename from erofs_config.h
rename to mkfs/erofs_config.h
mkfs/erofs_debug.h renamed from erofs_debug.h +0 -0
similarity index 100%
rename from erofs_debug.h
rename to mkfs/erofs_debug.h
mkfs/erofs_error.h renamed from erofs_error.h +0 -0
similarity index 100%
rename from erofs_error.h
rename to mkfs/erofs_error.h
mkfs/erofs_io.c renamed from erofs_io.c +0 -0
similarity index 100%
rename from erofs_io.c
rename to mkfs/erofs_io.c
mkfs/erofs_io.h renamed from erofs_io.h +0 -0
similarity index 100%
rename from erofs_io.h
rename to mkfs/erofs_io.h
mkfs/erofs_lz4hc.c renamed from erofs_lz4hc.c +0 -0
similarity index 100%
rename from erofs_lz4hc.c
rename to mkfs/erofs_lz4hc.c
mkfs/erofs_lz4hc.h renamed from erofs_lz4hc.h +0 -0
similarity index 100%
rename from erofs_lz4hc.h
rename to mkfs/erofs_lz4hc.h
mkfs/erofs_types.h renamed from erofs_types.h +0 -0
similarity index 100%
rename from erofs_types.h
rename to mkfs/erofs_types.h
mkfs/mkfs_erofs.h renamed from mkfs_erofs.h +0 -0
similarity index 100%
rename from mkfs_erofs.h
rename to mkfs/mkfs_erofs.h
mkfs/mkfs_file.c renamed from mkfs_file.c +0 -0
similarity index 100%
rename from mkfs_file.c
rename to mkfs/mkfs_file.c
mkfs/mkfs_file.h renamed from mkfs_file.h +0 -0
similarity index 100%
rename from mkfs_file.h
rename to mkfs/mkfs_file.h
mkfs/mkfs_inode.c renamed from mkfs_inode.c +0 -0
similarity index 100%
rename from mkfs_inode.c
rename to mkfs/mkfs_inode.c
mkfs/mkfs_inode.h renamed from mkfs_inode.h +0 -0
similarity index 100%
rename from mkfs_inode.h
rename to mkfs/mkfs_inode.h
mkfs/mkfs_main.c renamed from mkfs_main.c +0 -0
similarity index 100%
rename from mkfs_main.c
rename to mkfs/mkfs_main.c
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 erofs-utils: fix the source code hierarchy

Quoted 4 lines · 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 <blucerlee at gmail.com>

Applied with updating the commit message.

Thanks,
Gao Xiang