[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] gnulib, take2: incremental



Here is the first of two patches.  For now, neither includes
all of the new files.  That one's coming up shortly.

First the incremental one, to show you what's changed since last time:
(so you would apply this on top of the patch from last night)
I'll post the combined, (i.e., full, trunk-relative) one separately.

Adapt to change directory names:
Now we use these:

   gnulib/lib
   gnulib/m4
   tests/gnulib

* Makefile.am (SUBDIRS): Change dir names.
* autogen.sh: Add -I gnulib/m4.
* bootstrap: Don't exclude snprintf after all. Define cleanup function.
* configure.in: adjust dir/Makefile names.
* qemud/Makefile.am: Adjust -I and .a paths.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.

Signed-off-by: Jim Meyering <meyering redhat com>
---
 Makefile.am       |    6 +++---
 autogen.sh        |    2 +-
 bootstrap         |   34 ++++++++++++++++++++++++++--------
 configure.in      |    2 +-
 qemud/Makefile.am |    4 ++--
 src/Makefile.am   |    6 +++---
 tests/Makefile.am |    4 ++--
 7 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fcf0eb6..1f2ca52 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,9 @@
 ## Process this file with automake to produce Makefile.in

-SUBDIRS = lib src qemud proxy include docs @PYTHON_SUBDIR@ \
-  gl-tests tests po scripts
+SUBDIRS = gnulib/lib src qemud proxy include docs @PYTHON_SUBDIR@ \
+  tests/gnulib tests po scripts

-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4

 EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \
              libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \
diff --git a/autogen.sh b/autogen.sh
index 97b636d..3bcffd3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -57,7 +57,7 @@ fi
 autopoint --force
 #rm -rf m4
 libtoolize --copy --force
-aclocal -I m4
+aclocal -I m4 -I gnulib/m4
 autoheader
 automake --add-missing
 autoconf
diff --git a/bootstrap b/bootstrap
index b49378d..ca186bd 100755
--- a/bootstrap
+++ b/bootstrap
@@ -40,6 +40,12 @@ do
   esac
 done

+cleanup_gnulib() {
+  st=$?
+  rm -fr .gnulib
+  exit $st
+}
+
 case ${GNULIB_SRCDIR--} in
 -)
   if [ ! -d gnulib ]; then
@@ -47,22 +53,23 @@ case ${GNULIB_SRCDIR--} in

     trap cleanup_gnulib 1 2 13 15

-    git clone --depth 1 git://git.sv.gnu.org/gnulib ||
+    git clone --depth 1 git://git.sv.gnu.org/gnulib .gnulib ||
       cleanup_gnulib

     trap - 1 2 13 15
   fi
-  GNULIB_SRCDIR=gnulib
+  GNULIB_SRCDIR=.gnulib
 esac

 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 <$gnulib_tool || exit

 # Tell gnulib to:
-#   put tests in new gl-tests/ dir
-#   put m4/*.m4 files in existing m4/ dir
-#   lib/*.[ch] files in new lib/ dir.
-# With --avoid=snprintf, we pull in about 30 fewer files
+#   put tests in new tests/gnulib/ dir
+#   put *.m4 files in new gnulib/m4/ dir
+#   put *.[ch] files in new gnulib/lib/ dir.
+# With --avoid=snprintf, we drop support for systems (many!) with
+# losing snprintf but pull in about 30 fewer files
 # With the current gnulib and gettext-0.17, the following
 # files are added to m4/ by both.  But gnulib is stable enough
 # and gettext-0.16.1 is new enough that they are identical.
@@ -82,9 +89,20 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 #  --avoid=snprintf-tests
 #  --avoid=vasnprintf-tests

+avoid='--avoid=snprintf'
+
+avoid='
+  --avoid=snprintf-tests
+  --avoid=vasnprintf-tests
+'
+
 $gnulib_tool			\
   --lgpl			\
-  --avoid=snprintf		\
+  $avoid			\
+  --avoid=snprintf-tests	\
+  --avoid=vasnprintf-tests	\
   --with-tests			\
-  --tests-base=gl-tests		\
+  --m4-base=gnulib/m4		\
+  --source-base=gnulib/lib	\
+  --tests-base=tests/gnulib	\
   --import physmem getaddrinfo
diff --git a/configure.in b/configure.in
index 18a533f..2ab8411 100644
--- a/configure.in
+++ b/configure.in
@@ -566,7 +566,7 @@ cp COPYING.LIB COPYING
 AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
           docs/examples/Makefile docs/devhelp/Makefile \
 	  docs/examples/python/Makefile \
-	  lib/Makefile gl-tests/Makefile \
+	  gnulib/lib/Makefile tests/gnulib/Makefile \
           libvirt.pc libvirt.spec \
           po/Makefile.in scripts/Makefile \
 	  include/libvirt/Makefile include/libvirt/libvirt.h \
diff --git a/qemud/Makefile.am b/qemud/Makefile.am
index 267b43e..7e3b694 100644
--- a/qemud/Makefile.am
+++ b/qemud/Makefile.am
@@ -27,7 +27,7 @@ libvirtd_SOURCES = \

 #-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
 libvirtd_CFLAGS = \
-        -I$(top_srcdir)/lib -I../lib \
+        -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
         -I$(top_srcdir)/include -I$(top_builddir)/include \
         $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) \
         $(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
@@ -38,7 +38,7 @@ libvirtd_CFLAGS = \

 libvirtd_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS)
 libvirtd_DEPENDENCIES = ../src/libvirt.la
-libvirtd_LDADD = ../src/libvirt.la ../lib/libgnu.la
+libvirtd_LDADD = ../src/libvirt.la ../gnulib/lib/libgnu.la

 if HAVE_AVAHI
 libvirtd_SOURCES += mdns.c mdns.h
diff --git a/src/Makefile.am b/src/Makefile.am
index efea233..f9a2308 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in

 INCLUDES = \
-	   -I$(top_srcdir)/lib -I../lib \
+	   -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
 	   -I../include \
 	   -I top_srcdir@/include \
 	   -I top_srcdir@/qemud \
@@ -16,7 +16,7 @@ INCLUDES = \
 	   $(WARN_CFLAGS) \
 	   $(LIBVIRT_FEATURES)
 DEPS = libvirt.la
-LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) libvirt.la ../lib/libgnu.la
+LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) libvirt.la ../gnulib/lib/libgnu.la
 VIRSH_LIBS = @VIRSH_LIBS@

 confdir = $(sysconfdir)/libvirt/
@@ -62,7 +62,7 @@ SERVER_SOURCES = 						\

 libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
 libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(LTLIBOBJS) \
-		    @CYGWIN_EXTRA_LIBADD@ ../lib/libgnu.la
+		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
 libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                      -version-info @LIBVIRT_VERSION_INFO@ \
                     $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4de0c45..8220e1b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,7 +11,7 @@ SUBDIRS = virshdata confdata sexpr2xmldata xml2sexprdata xmconfigdata xencapsdat
 LIBVIRT = $(wildcard $(top_builddir)/src/.libs/libvirt_la-*.o)

 INCLUDES = \
-	-I$(top_srcdir)/lib -I../lib \
+	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
 	-I$(top_builddir)/include \
 	-I$(top_builddir)/src \
 	-I$(top_srcdir)/include \
@@ -30,7 +30,7 @@ LDADDS = \
         $(GNUTLS_LIBS) \
         $(WARN_CFLAGS) \
 	$(LIBVIRT) \
-	../lib/libgnu.la \
+	../gnulib/lib/libgnu.la \
         $(COVERAGE_LDFLAGS)

 EXTRA_DIST =		\
--
1.5.3.6.950.g92b7b


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]