Skip to contentSkip to conversation

master - configure: relocate generated headers

PATCH Zdenek Kabelac 1 participant 1 message Sep 7, 2015 Library code

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9403edbb93a2c337df790408e9ff3d26566b7443
Commit:        9403edbb93a2c337df790408e9ff3d26566b7443
Parent:        ab1b54c3e3244c481a1f8bf5e7c8b48870846bd8
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Sep 7 13:49:17 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Sep 7 17:40:58 2015 +0200

configure: relocate generated headers

Relocate generated configure.h and lvm-version.h outside of compilable .c source tree.

The reason is behind - when compiling in builddir != srcdir the generated file in lib/misc/configure.h was used for all compiled source file except ones located in lib/misc dir - those would have used configure.h file located in this dir - if there have existed one (i.e. from some other build)

This problem was only visible, when srcdir == buildir was used before trying to use srcdri != builddir (as configure.h appeared then in srcdir).

---
 WHATS_NEW                 |    1 +
 conf/.gitignore           |    2 +
 conf/Makefile.in          |    3 +-
 conf/configure.h.in       |  811 +++++++++++++++++++++++++++++++++++++++++++++
 conf/lvm-version.h.in     |   30 ++
 configure.in              |    4 +-
 include/.symlinks.in      |    4 +-
 lib/Makefile.in           |    2 -
 lib/misc/.gitignore       |    2 -
 lib/misc/configure.h.in   |  811 ---------------------------------------------
 lib/misc/lvm-version.h.in |   30 --
 11 files changed, 850 insertions(+), 850 deletions(-)
WHATS_NEW +1 -0
index 3dc7384..5f8846b 100644
@@ -1,5 +1,6 @@
 Version 2.02.131 - 
 =====================================
+  Fix usage of configure.h when building in srcdir != builddir.
 
 Version 2.02.130 - 5th September 2015
 =====================================
conf/.gitignore +2 -0
index f505a49..4bfc4d3 100644
@@ -2,3 +2,5 @@ command_profile_template.profile
 example.conf
 lvmlocal.conf
 metadata_profile_template.profile
+configure.h
+lvm-version.h
conf/Makefile.in +2 -1
index 128395e..b3ea85b 100644
@@ -54,4 +54,5 @@ install_lvm2: install_conf install_localconf install_profiles
 
 install: install_lvm2
 
-DISTCLEAN_TARGETS += $(CONFSRC) $(CONFLOCAL) $(PROFILE_TEMPLATES)
+DISTCLEAN_TARGETS += $(CONFSRC) $(CONFLOCAL) $(PROFILE_TEMPLATES) \
+	configure.h lvm-version.h
conf/configure.h.in new file +811 -0

811 lines not on this page · raw message

conf/lvm-version.h.in new file +30 -0
new file mode 100644
index 0000000..2574890
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.  
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _LVM_VERSION_H
+/**
+ * The LVM version number
+ *
+ * LVM_MAJOR.LVM_MINOR.LVM_PATCHLEVEL(LVM_LIBAPI)[-LVM_RELEASE]
+ */
+
+#define LVM_VERSION @LVM_VERSION@
+#define LVM_MAJOR @LVM_MAJOR@
+#define LVM_MINOR @LVM_MINOR@
+#define LVM_PATCHLEVEL @LVM_PATCHLEVEL@
+#define LVM_LIBAPI @LVM_LIBAPI@
+#define LVM_RELEASE @LVM_RELEASE@
+#define LVM_RELEASE_DATE @LVM_RELEASE_DATE@
+#endif
configure.in +2 -2
index 868b373..3b58527 100644
@@ -16,7 +16,7 @@ AC_PREREQ(2.61)
 dnl -- Process this file with autoconf to produce a configure script.
 AC_INIT
 AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
-AC_CONFIG_HEADERS([lib/misc/configure.h])
+AC_CONFIG_HEADERS([conf/configure.h])
 
 ################################################################################
 dnl -- Setup the directory where autoconf has auxilary files
@@ -2077,7 +2077,7 @@ lib/format_pool/Makefile
 lib/locking/Makefile
 lib/mirror/Makefile
 lib/replicator/Makefile
-lib/misc/lvm-version.h
+conf/lvm-version.h
 lib/raid/Makefile
 lib/snapshot/Makefile
 lib/thin/Makefile
include/.symlinks.in +2 -2
index e78072a..77f23bc 100644
@@ -1,3 +1,5 @@
+ at top_builddir@/conf/configure.h
+ at top_builddir@/conf/lvm-version.h
 @top_srcdir@/daemons/clvmd/clvm.h
 @top_srcdir@/daemons/dmeventd/libdevmapper-event.h
 @top_srcdir@/daemons/lvmetad/lvmetad-client.h
@@ -45,7 +47,6 @@
 @top_srcdir@/lib/metadata/vg.h
 @top_srcdir@/lib/mm/memlock.h
 @top_srcdir@/lib/mm/xlate.h
- at top_builddir@/lib/misc/configure.h
 @top_srcdir@/lib/misc/crc.h
 @top_srcdir@/lib/misc/intl.h
 @top_srcdir@/lib/misc/last-path-component.h
@@ -56,7 +57,6 @@
 @top_srcdir@/lib/misc/lvm-globals.h
 @top_srcdir@/lib/misc/lvm-signal.h
 @top_srcdir@/lib/misc/lvm-string.h
- at top_builddir@/lib/misc/lvm-version.h
 @top_srcdir@/lib/misc/lvm-percent.h
 @top_srcdir@/lib/misc/lvm-wrappers.h
 @top_srcdir@/lib/misc/sharedlib.h
lib/Makefile.in +0 -2
index e29ff29..ec80c7c 100644
@@ -229,5 +229,3 @@ include $(top_builddir)/make.tmpl
 CFLAGS += $(BLKID_CFLAGS) $(UDEV_CFLAGS) $(VALGRIND_CFLAGS)
 
 $(SUBDIRS): $(LIB_STATIC)
-
-DISTCLEAN_TARGETS += misc/configure.h misc/lvm-version.h
lib/misc/.gitignore deleted +0 -2
deleted file mode 100644
index 396884b..0000000
@@ -1,2 +0,0 @@
-configure.h
-lvm-version.h
lib/misc/configure.h.in deleted +0 -811

811 lines not on this page · raw message

lib/misc/lvm-version.h.in deleted +0 -30
deleted file mode 100644
index 2574890..0000000
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.  
- * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
- *
- * This file is part of LVM2.
- *
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License v.2.1.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef _LVM_VERSION_H
-/**
- * The LVM version number
- *
- * LVM_MAJOR.LVM_MINOR.LVM_PATCHLEVEL(LVM_LIBAPI)[-LVM_RELEASE]
- */
-
-#define LVM_VERSION @LVM_VERSION@
-#define LVM_MAJOR @LVM_MAJOR@
-#define LVM_MINOR @LVM_MINOR@
-#define LVM_PATCHLEVEL @LVM_PATCHLEVEL@
-#define LVM_LIBAPI @LVM_LIBAPI@
-#define LVM_RELEASE @LVM_RELEASE@
-#define LVM_RELEASE_DATE @LVM_RELEASE_DATE@
-#endif