From 140234dc0dbb110a780ded195f28da2aad9adc6e Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 21 Feb 2023 01:41:21 +0100 Subject: [PATCH] btrfs-progs: move include from toplevel directory to include/ In order to reduce number of files in the toplevel directory, Signed-off-by: David Sterba --- .gitignore | 6 +++--- Makefile | 11 ++++++----- configure.ac | 2 +- crypto/hash-speedtest.c | 2 +- crypto/hash-vectest.c | 2 +- crypto/hash.h | 2 +- ioctl.h => include/ioctl.h | 0 kerncompat.h => include/kerncompat.h | 0 8 files changed, 13 insertions(+), 12 deletions(-) rename ioctl.h => include/ioctl.h (100%) rename kerncompat.h => include/kerncompat.h (100%) diff --git a/.gitignore b/.gitignore index c24ed8fc..65697ba8 100644 --- a/.gitignore +++ b/.gitignore @@ -55,9 +55,9 @@ /autom4te.cache /config.cache /config/* -/config.h -/config.h.in -/config.h.in~ +/include/config.h +/include/config.h.in +/include/config.h.in~ /config.log /config.status /configure diff --git a/Makefile b/Makefile index 97018cd2..2021bc4a 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ ENABLE_WARNING_FLAGS := $(call cc-option, -Wimplicit-fallthrough) # Common build flags CFLAGS = $(SUBST_CFLAGS) \ -std=gnu11 \ - -include config.h \ + -include include/config.h \ -DBTRFS_FLAT_INCLUDES \ -D_XOPEN_SOURCE=700 \ -fno-strict-aliasing \ @@ -97,6 +97,7 @@ CFLAGS = $(SUBST_CFLAGS) \ -Wall \ -Wunused-but-set-parameter \ -I$(TOPDIR) \ + -I$(TOPDIR)/include \ $(CRYPTO_CFLAGS) \ -DCOMPRESSION_LZO=$(COMPRESSION_LZO) \ -DCOMPRESSION_ZSTD=$(COMPRESSION_ZSTD) \ @@ -695,15 +696,15 @@ quick-test: quick-test.o $(objects) libbtrfsutil.a $(libs_shared) @echo " [LD] $@" $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -ioctl-test.o: tests/ioctl-test.c ioctl.h kerncompat.h kernel-shared/ctree.h +ioctl-test.o: tests/ioctl-test.c include/ioctl.h include/kerncompat.h kernel-shared/ctree.h @echo " [CC] $@" $(Q)$(CC) $(CFLAGS) -c $< -o $@ -ioctl-test-32.o: tests/ioctl-test.c ioctl.h kerncompat.h kernel-shared/ctree.h +ioctl-test-32.o: tests/ioctl-test.c include/ioctl.h include/kerncompat.h kernel-shared/ctree.h @echo " [CC32] $@" $(Q)$(CC) $(CFLAGS) -m32 -c $< -o $@ -ioctl-test-64.o: tests/ioctl-test.c ioctl.h kerncompat.h kernel-shared/ctree.h +ioctl-test-64.o: tests/ioctl-test.c include/ioctl.h include/kerncompat.h kernel-shared/ctree.h @echo " [CC64] $@" $(Q)$(CC) $(CFLAGS) -m64 -c $< -o $@ @@ -852,7 +853,7 @@ clean-gen: configure.lineno config.status.lineno Makefile.inc \ Documentation/Makefile tags TAGS \ cscope.files cscope.out cscope.in.out cscope.po.out \ - config.log config.h config.h.in~ aclocal.m4 \ + config.log include/config.h include/config.h.in~ aclocal.m4 \ configure autom4te.cache/ config/ clean-dep: diff --git a/configure.ac b/configure.ac index 3d482f23..7a27c233 100644 --- a/configure.ac +++ b/configure.ac @@ -427,7 +427,7 @@ AC_SUBST([BTRFS_UTIL_VERSION_MAJOR]) AC_SUBST([BTRFS_UTIL_VERSION_MINOR]) AC_SUBST([BTRFS_UTIL_VERSION_PATCH]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_FILES([ Makefile.inc diff --git a/crypto/hash-speedtest.c b/crypto/hash-speedtest.c index 25dad11c..f8ee4b68 100644 --- a/crypto/hash-speedtest.c +++ b/crypto/hash-speedtest.c @@ -14,7 +14,7 @@ * Boston, MA 021110-1307, USA. */ -#include "../kerncompat.h" +#include "kerncompat.h" #include #include #include diff --git a/crypto/hash-vectest.c b/crypto/hash-vectest.c index abb169f9..d3219366 100644 --- a/crypto/hash-vectest.c +++ b/crypto/hash-vectest.c @@ -14,7 +14,7 @@ * Boston, MA 021110-1307, USA. */ -#include "../kerncompat.h" +#include "kerncompat.h" #include "crypto/hash.h" #include "crypto/crc32c.h" #include "crypto/sha.h" diff --git a/crypto/hash.h b/crypto/hash.h index b3aab2c8..8a6deed1 100644 --- a/crypto/hash.h +++ b/crypto/hash.h @@ -17,7 +17,7 @@ #ifndef CRYPTO_HASH_H #define CRYPTO_HASH_H -#include "../kerncompat.h" +#include "kerncompat.h" #define CRYPTO_HASH_SIZE_MAX 32 diff --git a/ioctl.h b/include/ioctl.h similarity index 100% rename from ioctl.h rename to include/ioctl.h diff --git a/kerncompat.h b/include/kerncompat.h similarity index 100% rename from kerncompat.h rename to include/kerncompat.h