Re: noinst_bindir

2006-04-29 Thread Ralf Wildenhues
Hi Bob, Russ,

* Russ Allbery wrote on Sun, Apr 30, 2006 at 05:34:53AM CEST:
> Bob Rossi <[EMAIL PROTECTED]> writes:
> 
> > noinst_bin_PROGRAMS = gdbmi_driver
> > noinst_bindir = $(top_builddir)/progs
> 
> Try using $(abs_top_builddir) instead.  I've always had bad luck with
> relative paths and anything that involves libtool.

Libtool explicitly forbis relative paths because, portably, you can't
put libraries in paths other than the ones specified, and can't move
them around.  Luckily those systems are less used today.
(I know you know this, Russ; in fact, I'm citing (you?) here)

Hmm.  Maybe libtool should be less anal about relative paths when it
comes to installing programs.

Actually, I don't know what noinst_bin_PROGRAMS is supposed to mean.
noinst means it should not be installed; bin means it should be
installed in $(bindir).  The fact that Automake outputs an install rule
for this and doesn't die complaining looks awfully like an Automake bug
to me.  Or maybe it's just that the prefix rules have the priority the
other way round (match longest prefix first), gotta go and check.

Do you actually want 'make install' to copy into the build tree, a
binary linked against the installed libraries?

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: noinst_bindir

2006-04-29 Thread Russ Allbery
Bob Rossi <[EMAIL PROTECTED]> writes:

> I have 

> noinst_bin_PROGRAMS = gdbmi_driver
> noinst_bindir = $(top_builddir)/progs

Try using $(abs_top_builddir) instead.  I've always had bad luck with
relative paths and anything that involves libtool.

-- 
Russ Allbery ([EMAIL PROTECTED]) 


___
http://lists.gnu.org/mailman/listinfo/libtool


noinst_bindir

2006-04-29 Thread Bob Rossi
Hi,

I have 

noinst_bin_PROGRAMS = gdbmi_driver
noinst_bindir = $(top_builddir)/progs

and I wasn't using AC_PROG_LIBTOOL. I've never had a problem with 'make
install' before. However, since I've enabled AM_PROG_LIBTOOL,
I'm getting this error,

test -z "../progs" || mkdir -p -- "../progs"
  /bin/sh ../libtool --mode=install /usr/bin/install -c 'gdbmi_driver' 
'../progs/gdbmi_driver'
libtool: install: `../progs' must be an absolute directory name
Try `libtool --help --mode=install' for more information.
make[2]: *** [install-noinst_binPROGRAMS] Error 1
make[2]: Leaving directory `/home/bob/cvs/gdbmi/builddir/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/bob/cvs/gdbmi/builddir/src'
make: *** [install-recursive] Error 1


Attached is the configure.in and Makefile.am file. Any ideas?

Thanks,
Bob Rossi
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.5)
AC_INIT(gdbmi, 0.1)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

AM_PROG_LIBTOOL
#AC_PROG_RANLIB
AM_PROG_LEX
AC_PROG_YACC

dnl Checks for header files.
AC_HEADER_STDC

dnl determine other headers for tgdb, Error if they do not exist
AC_CHECK_HEADERS(stdio.h stdlib.h string.h,,AC_MSG_ERROR)

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL

AC_ARG_ENABLE(tcl-extension,[  --enable-tcl-extension  Build the TCL extension],
[case "${enableval}" in
  yes) enable_tcl_extension=true ;;
  no)  enable_tcl_extension=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-tcl-extension) ;;
esac],[enable_tcl_extension=false])

AM_CONDITIONAL(ENABLE_TCL_EXTENSION, test x$enable_tcl_extension = xtrue)

AC_OUTPUT(Makefile src/Makefile)
# libgdbmi
noinst_LIBRARIES=libgdbmi.a

libgdbmi_a_SOURCES= \
gdbmi_grammar.y \
gdbmi_lexer.l \
gdbmi_pt.c \
gdbmi_parser.c

EXTRA_DIST = gdbmi_parser.h  gdbmi_pt.h gdbmi_grammar.h

# gdbmi driver program
noinst_bin_PROGRAMS = gdbmi_driver
noinst_bindir = $(top_builddir)/progs

gdbmi_driver_LDFLAGS = -L.
gdbmi_driver_LDADD = -lgdbmi
gdbmi_driver_SOURCES = gdbmi_driver.c


# If this package was compiled with --enable-tcl-extension, then the gdbmi
# tcl extension will also be compiled.

if ENABLE_TCL_EXTENSION
TCL_EXTENSION = libgdbmi_tclext-1.0.la
else
TCL_EXTENSION =
endif

lib_LTLIBRARIES = $(TCL_EXTENSION)
libgdbmi_tclext_1_0_la_SOURCES = \
gdbmi_tclext.c \
$libgdbmi_a_SOURCES
___
http://lists.gnu.org/mailman/listinfo/libtool