master - configure: avoid repeative inclusion of configure.h
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=18aa541ca270d70899ab7ec6095075b70a21fb09 Commit: 18aa541ca270d70899ab7ec6095075b70a21fb09 Parent: a7034fa4200d63207daa45290150159dd02cf01f Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Dec 21 19:11:49 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Dec 21 19:19:50 2018 +0100
configure: avoid repeative inclusion of configure.h
Since configure.h is a generated header and it's missing traditional ifdefs preambule - it can be included & parsed multiple times. Normally compiler is fine when defines have same value and there is no warning - yet we don't need to parse this several times and by adding -include directive we can ensure every file in the package is rightly compile with configure.h as the first header file.
--- base/data-struct/radix-tree.h | 2 -- base/memory/zalloc.h | 1 - daemons/cmirrord/logging.h | 1 - daemons/dmeventd/dmeventd.c | 1 - daemons/dmeventd/libdevmapper-event.c | 1 - device_mapper/all.h | 2 -- device_mapper/vdo/status.c | 2 -- libdm/dm-tools/dmsetup.c | 1 - libdm/make.tmpl.in | 4 ++-- libdm/misc/dmlib.h | 2 -- make.tmpl.in | 4 ++-- test/lib/brick-shelltest.h | 2 -- test/lib/harness.c | 2 -- test/unit/framework.h | 1 - tools/tool.h | 2 -- 15 files changed, 4 insertions(+), 24 deletions(-)
base/data-struct/radix-tree.h +0 -2
@@ -13,8 +13,6 @@#ifndef BASE_DATA_STRUCT_RADIX_TREE_H #define BASE_DATA_STRUCT_RADIX_TREE_H -#include "configure.h" -#include <stdbool.h> #include <stdint.h> #include <stdio.h>
base/memory/zalloc.h +0 -1
@@ -13,7 +13,6 @@#ifndef BASE_MEMORY_ZALLOC_H #define BASE_MEMORY_ZALLOC_H -#include "configure.h" #include <stdlib.h> //----------------------------------------------------------------
daemons/cmirrord/logging.h +0 -1
@@ -13,7 +13,6 @@#ifndef _LVM_CLOG_LOGGING_H#define _LVM_CLOG_LOGGING_H -#include "configure.h" #include <stdio.h> #include <stdint.h> #include <syslog.h>
daemons/dmeventd/dmeventd.c +0 -1
@@ -17,7 +17,6 @@*/ -#include "configure.h" #include "libdevmapper-event.h" #include "dmeventd.h"
daemons/dmeventd/libdevmapper-event.c +0 -1
@@ -12,7 +12,6 @@* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "configure.h" #include "libdevmapper-event.h" #include "dmeventd.h" #include "libdm/misc/dm-logging.h"
device_mapper/all.h +0 -2
@@ -17,8 +17,6 @@#ifndef LIB_DEVICE_MAPPER_H #define LIB_DEVICE_MAPPER_H -#include "configure.h" -#include "base/data-struct/list.h" #include "base/data-struct/hash.h" #include "vdo/target.h"
device_mapper/vdo/status.c +0 -2
@@ -15,8 +15,6 @@/* Note: this object is also used by VDO dmeventd plugin for parsing status */ /* File could be included by VDO plugin and can use original libdm library */ #ifndef LIB_DMEVENT_H -#include "configure.h" -// For DM_ARRAY_SIZE! #include "device_mapper/all.h" #endif
libdm/dm-tools/dmsetup.c +0 -1
@@ -17,7 +17,6 @@*/ // For canonicalize_file_name() -#include "configure.h" #include "libdm/misc/dm-logging.h" #include "libdm/dm-tools/util.h"
libdm/make.tmpl.in +2 -2
@@ -275,11 +275,11 @@ LIB_VERSION_LVM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)/VERSION_DM) -INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include +INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include configure.h DEPS = $(top_builddir)/libdm/make.tmpl $(top_srcdir)/VERSION \ - $(top_builddir)/libdm/Makefile + $(top_builddir)/libdm/Makefile $(top_builddir)/include/configure.h OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o) POTFILES = $(SOURCES:%.c=%.pot)
libdm/misc/dmlib.h +0 -2
@@ -19,8 +19,6 @@#ifndef _DM_LIB_H#define _DM_LIB_H -#include "configure.h" -/* * Symbol export control macros *
make.tmpl.in +2 -2
@@ -294,12 +294,12 @@ LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir) LIB_VERSION_APP := $(shell $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}' $(top_srcdir)/VERSION) -INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include +INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include configure.h #VDO_INCLUDES=-I at VDO_INCLUDE@ DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \ - $(top_builddir)/Makefile + $(top_builddir)/Makefile $(top_builddir)/include/configure.h OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o) POTFILES = $(SOURCES:%.c=%.pot)
test/lib/brick-shelltest.h +0 -2
@@ -80,8 +80,6 @@#include <unistd.h> #endif -#include "configure.h" -/* Timeout for the whole test suite in hours */ static const time_t TEST_SUITE_TIMEOUT =4 ;
test/lib/harness.c +0 -2
@@ -12,8 +12,6 @@* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "configure.h" -#include <errno.h> #include <fcntl.h> #include <limits.h>
test/unit/framework.h +0 -1
@@ -1,7 +1,6 @@#ifndef TEST_UNIT_FRAMEWORK_H #define TEST_UNIT_FRAMEWORK_H -#include "configure.h" #include "device_mapper/all.h" #include <stdbool.h>
tools/tool.h +0 -2
@@ -18,8 +18,6 @@#ifndef _LVM_TOOL_H#define _LVM_TOOL_H -#include "configure.h" -#include "base/memory/zalloc.h" #include "device_mapper/all.h" #include "lib/misc/util.h"