bug-gnulib
[Top][All Lists]
Advanced

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

Re: libposix


From: Bruno Haible
Subject: Re: libposix
Date: Mon, 4 Oct 2010 02:26:56 +0200
User-agent: KMail/1.9.9

[removed libtool list from CC]

Hi Bruce,

Bruce Korb wrote:
> I'd still like to wrap up this thing, but it fails in a way
> I've been unable to diagnose.
> 
> A reminder, the goal here is to produce a stand alone project
> that installs a library and headers so that other projects
> can reduce the number of configury tests required in order to
> build.  The amount of time projects take to configure has become
> quite ridiculous and this should solve that issue.
> 
> So, with that goal in mind, I have used this command:
>    gnulib-tool --libtool --lib=libposix \
>       --create-testdir --source-base=lib --dir=libposix \
>       $(posix-modules)
> to produce the base set of files.

For me, with your script, this fails with two errors:
gllib/Makefile.am:34: @LTALLOCA@ used but `LTALLOCA' is undefined
gllib/Makefile.am: object `pt_chown.$(OBJEXT)' created both with libtool and 
without

I'm applying these two fixes to gnulib-tool. With this, I think you should be 
able
to get a bit further, and remove this code from your script:

    for f in $(egrep '_PROGRAMS *=' ${TARNAME}/Makefile.am | sed 's/.*= *//')
    do
        sedcmd=${sedcmd}$'\n'"/^EXTRA_${TARNAME}_la_SOURCES *+= *${f}\\.c/d"
    done
    sed -i -e "${sedcmd}" ${TARNAME}/Makefile.am

> libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'

This is just a warning that you can ignore.

Btw, in version.h the size of _libposix_git_version should not be exported
since it can change from one version to the next. So I would change
  extern char const _libposix_git_version[sizeof(_GIT_VERSION)];
to
  extern char const _libposix_git_version[];



2010-10-03  Bruno Haible  <address@hidden>

        gnulib-tool: Fixes for --create-testdir with --libtool.
        * gnulib-tool (func_get_automake_snippet): Don't augment
        EXTRA_lib_SOURCES for the pt_chown module, since pt_chown.o goes into
        an executable.
        (func_create_testdir): Handle module 'alloca' like func_import.
        Reported by Bruce Korb <address@hidden>.

--- gnulib-tool.orig    Mon Oct  4 02:15:45 2010
+++ gnulib-tool Mon Oct  4 01:52:20 2010
@@ -2228,6 +2228,7 @@
       # automake will generate a useless dependency; this is harmless.
       case "$1" in
         relocatable-prog-wrapper) ;;
+        pt_chown) ;;
         *)
           func_filter_filelist extra_files "$nl" "$extra_files" '' '.c' '' ''
           if test -n "$extra_files"; then
@@ -5128,6 +5129,12 @@
            *)
              func_get_autoconf_snippet "$module" \
                | sed -e "$sed_replace_build_aux"
+             if test "$module" = 'alloca' && test "$libtool" = true; then
+               echo 'changequote(,)dnl'
+               echo 'LTALLOCA=`echo "$ALLOCA" | sed -e '"'"'s/\.[^.]* /.lo 
/g;s/\.[^.]*$/.lo/'"'"'`'
+               echo 'changequote([, ])dnl'
+               echo 'AC_SUBST([LTALLOCA])'
+             fi
              ;;
          esac
        fi
@@ -5250,6 +5257,12 @@
      if test -n "$module"; then
        func_get_autoconf_snippet "$module" \
          | sed -e "$sed_replace_build_aux"
+       if test "$module" = 'alloca' && test "$libtool" = true; then
+         echo 'changequote(,)dnl'
+         echo 'LTALLOCA=`echo "$ALLOCA" | sed -e '"'"'s/\.[^.]* /.lo 
/g;s/\.[^.]*$/.lo/'"'"'`'
+         echo 'changequote([, ])dnl'
+         echo 'AC_SUBST([LTALLOCA])'
+       fi
      fi
    done
    func_emit_initmacro_end $macro_prefix




reply via email to

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