bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 6/7] libposix: raw files to import an installable libposix projec


From: Gary V. Vaughan
Subject: [PATCH 6/7] libposix: raw files to import an installable libposix project
Date: Tue, 12 Oct 2010 23:08:41 +0700

And with all the groundwork done, this patch creates a libposix
subdirectory with necessary files to bootstrap, configure, build,
test, install and distribute libposix from within.

Note the sanity check in bootstrap I mentioned earlier

* libposix/bootstrap: New script to import gnulib posix modules
and bootstrap configury so that the result is an installable
libposix.la.
* libposix/configure.ac: New file to configure the new libposix
subdirectory.
* libposix/Makefile.am: New file to delegate build duties to the
generated libposix/lib/Makefile at make time.
* libposix/lib/Makefile.am: New file to make sure `-version-info'
is passed to libtool at libposix.la link-time.
---
 ChangeLog                |   11 +++++++++
 libposix/.gitignore      |   45 +++++++++++++++++++++++++++++++++++++
 libposix/Makefile.am     |    4 +++
 libposix/bootstrap       |   55 ++++++++++++++++++++++++++++++++++++++++++++++
 libposix/configure.ac    |   25 +++++++++++++++++++++
 libposix/lib/Makefile.am |   17 ++++++++++++++
 6 files changed, 163 insertions(+), 0 deletions(-)
 create mode 100644 libposix/.gitignore
 create mode 100644 libposix/Makefile.am
 create mode 100755 libposix/bootstrap
 create mode 100644 libposix/configure.ac
 create mode 100644 libposix/lib/Makefile.am

diff --git a/ChangeLog b/ChangeLog
index 27394fb..2679141 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2010-10-12  Gary V. Vaughan  <address@hidden>
 
+       libposix: raw files to import an installable libposix project
+       * libposix/bootstrap: New script to import gnulib posix modules
+       and bootstrap configury so that the result is an installable
+       libposix.la.
+       * libposix/configure.ac: New file to configure the new libposix
+       subdirectory.
+       * libposix/Makefile.am: New file to delegate build duties to the
+       generated libposix/lib/Makefile at make time.
+       * libposix/lib/Makefile.am: New file to make sure `-version-info'
+       is passed to libtool at libposix.la link-time.
+
        add _HEADERS primaries to Makefile.am snippets for installable headers
        * modules/alloca-opt, modules/arg-nonnull, modules/argz,
        modules/arpa_inet, modules/byteswap, modules/c++defs, modules/ctype,
diff --git a/libposix/.gitignore b/libposix/.gitignore
new file mode 100644
index 0000000..d54d869
--- /dev/null
+++ b/libposix/.gitignore
@@ -0,0 +1,45 @@
+.deps
+.libs
+*.a
+*.gperf
+*.la
+*.lo
+*.o
+*.output
+*.valgrind
+/*/glthread
+/*/unistr
+/*/uniwidth
+Makefile
+Makefile.in
+aclocal.m4
+arg-nonnull.h
+/autom4te.cache
+c++defs.h
+compile
+config.*
+configure
+depcomp
+install-sh
+/lib/*.alias
+/lib/*.c
+/lib/*.h
+/lib/*.mk
+/lib/*.sed
+/lib/*.sin
+/lib/arpa
+/lib/pt_chown
+/lib/sys
+libtool
+ltmain.sh
+/m4
+missing
+stamp-h1
+/tests/*.c
+/tests/*.h
+/tests/*.mk
+/tests/*.sh
+/tests/test-*
+unused-parameter.h
+warn-on-use.h
+/config.rpath
diff --git a/libposix/Makefile.am b/libposix/Makefile.am
new file mode 100644
index 0000000..da7dc13
--- /dev/null
+++ b/libposix/Makefile.am
@@ -0,0 +1,4 @@
+ACLOCAL_AMFLAGS                = -I m4
+SUBDIRS                        = lib tests
+DIST_SUBDIRS           = $(SUBDIRS)
+EXTRA_DIST             = bootstrap m4/gnulib-cache.m4
diff --git a/libposix/bootstrap b/libposix/bootstrap
new file mode 100755
index 0000000..59d06d0
--- /dev/null
+++ b/libposix/bootstrap
@@ -0,0 +1,55 @@
+#! /bin/sh
+
+PATH=..:$PATH
+
+gnulib-tool --import --lib=libposix --makefile-name=gnulib.mk \
+  --macro-prefix=LIBPOSIX --libtool --no-changelog --symlink \
+  --with-tests --with-c++-tests --with-longrunning-tests \
+  libposix
+
+mv tests/gnulib.mk tests/Makefile.am
+
+# sanity check the module list for synchronisation issues.
+echo "posix-modules :
+`posix-modules`
+libposix :
+`gnulib-tool --extract-dependencies libposix`" |awk '
+/^$/           { next; }
+/^[a-z-]+ :/   { tag=$1; next; }
+               { if (modules[$1])
+                       modules[$1] = "both";
+                 else
+                       modules[$1] = tag;
+               }
+END            { # posix-modules only 
+                 header=0;
+                 for (i in modules)
+                   {
+                     if ("posix-modules" == modules[i])
+                       {
+                         if (0 == header)
+                           {
+                             print "Modules in posix-modules list only:"
+                             header = 1
+                           }
+                         printf ("\t%s\n", i);
+                       }
+                   }
+                 # libposix only
+                 header=0;
+                 for (i in modules)
+                   {
+                     if ("libposix" == modules[i])
+                       {
+                         if (0 == header)
+                           {
+                             print "Modules in libposix only:"
+                             header = 1
+                           }
+                         printf ("\t%s\n", i);
+                       }
+                   }
+               }
+'
+
+autoreconf --force --install --verbose --symlink
diff --git a/libposix/configure.ac b/libposix/configure.ac
new file mode 100644
index 0000000..a3aedc3
--- /dev/null
+++ b/libposix/configure.ac
@@ -0,0 +1,25 @@
+AC_INIT([GNU libposix], [20101011], address@hidden)
+
+dnl this should be AC_REQUIRED by gnulib modules that need it,
+dnl but either a couple of modules have forgotten it, or else
+dnl AC_REQUIRE is emitting macro expansions out of order
+AC_USE_SYSTEM_EXTENSIONS
+
+dnl we can't use AC_CONFIG_AUX_DIR here, because the heuristics
+dnl for finding install-sh in the generated configure script
+dnl consider this directory to be a subproject of gnulib proper,
+dnl and will only look for install-sh in . and .. :(
+dnl AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_FILES([Makefile lib/Makefile tests/Makefile])
+
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+AC_PROG_CC
+LIBPOSIX_EARLY
+AM_PROG_CC_C_O
+LIBPOSIX_INIT
+
+AC_OUTPUT
diff --git a/libposix/lib/Makefile.am b/libposix/lib/Makefile.am
new file mode 100644
index 0000000..fa2e6ed
--- /dev/null
+++ b/libposix/lib/Makefile.am
@@ -0,0 +1,17 @@
+BUILT_SOURCES =
+EXTRA_DIST =
+
+EXTRA_HEADERS =
+include_HEADERS =
+nobase_include_HEADERS =
+
+
+CLEANFILES =
+MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES =
+MAINTAINERCLEANFILES =
+
+include gnulib.mk
+
+
+libposix_la_LDFLAGS += -version-info 0:0:0
-- 
1.7.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]