Quoting Andrew Barnert <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel:
:One minor problem, for building RPM's: make install assumes that the BINDIR 
:already exists. If you pass a different value to make install than you did to 
:Configure (which you have to, for an RPM), this fails. Of course the 
:workaround is easy (just mkdir it before calling make install in the 
:specfile), but this should probably be fixed in the Makefile.

Hmm...  No, the BINDIR should exist beforehand.  Is it hard to pre-create?

:Here's what I have so far in the specfile:
:
:%build
:./Configure -D_prefix=%_prefix/ -Dbindir=%_bindir/ -Dprivlib=%_datadir/%name/ 
:-Dsysman=%_mandir/man1/ -Dcc="$CC" -Dccflags="-Wall $CFLAGS" 
:-Doptimize="%optflags" -Dgtkversion=2 -Dremotectrl=true -ders 
:%make
:
:%install
:rm -rf $RPM_BUILD_ROOTway, 
:mkdir -p $RPM_BUILD_ROOT/%_bindir
:%makeinstall DESTDIR=$RPM_BUILD_ROOT/ PREFIX=$RPM_BUILD_ROOT/%_prefix/ 
:BINDIR=$RPM_BUILD_ROOT/%_bindir/ PRIVLIB=$RPM_BUILD_ROOT/%_datadir/%name/

You should use the INSTALL_PREFIX=%_prefix parameter to shorten the above!

:This works on my system, but I don't know about 64-bit linux, cross-compilers, 
:embedded systems with dietlibc, or other weird platforms supported by 
:Mandrake/Redhat/etc. I can find people to do the testing on Mandrake, but 
:someone should look into at least one other RPM-based distro (probably 
:Redhat). And I don't know if the lack of libtoolize/cputoolize stuff makes 
:any difference....
:
:It would be supercool to have two changes:
:
:1. Create a "./configure" front-end that converts all the autoconf crap to 
:equivalent metaconf crap (so CFLAGS=-blah ./configure --prefix=%_prefix/ 
:--with-remotectrl=yes --with-gtkversion=2 becomes ./Configure -Dccflags=-blah 
:-D_prefix=%_prefix/ -Dremotectrl=yes -Dgtkersion=2). It should also look for 
:autoconf site defaults, I guess. This should be relatively easy; I could do 
:it. But if you're against the idea, I won't.

Please avoid using the "crap" qualifying adjective when referring to
metaconfig.  That is reserved for autoconf. ;-)
:
If you run "metaconfig -m -G", it will already produce a "configure"
frontend.  I guess one could start from here and tailor the default
configure further.  I've appended a copy at the end of this message.

:2. Generate a Makefile that honors the autoconf-style defines (prefix, 
:exec_prefix, etc.). Alternatively, just honor DESTDIR and "%makeinstall 
:DESTDIR=$RPM_BUILD_ROOT" will work 99% of the time.
:
:I suppose the real solution is to build metaconfig-aware rpm macros instead 
:(so you'd just use %configure_meta and %makeinstall_meta--or, better yet, 
:%configure and %makeinstall would automagically figure out that the package 
:uses metaconfig and act accordingly). I'll see if the Mandrake people are 
:interested in such a solution.

Doesn't INSTALL_PREFIX does what you need here?

:As always for gnu stuff, the only standard resource is the info files, which 
:are only just barely navigable if you're already familiar with the concepts.
:
:The quick-and-dirty way is to look at the main Makefile, po/Makefile, and 
:po/POFILES generated by autoconf and copy and paste (you may want to have 
:your scripts scan for po/*.po and sed the results accordingly).

I'll have a look.  I don't know the innards of any of that stuff though.

:I suppose there's no way to get a list of options like ./configure --help, 
:other than by reading the Configure script, like:
:  grep 'case\ \"\$' Configure

Nah, this would depend too much on the goodwill of people writing units.
Remember that Configure is meant to be an interactive configuration tool.

:If you could manually specify extra text in Jmakefile (or wherever) to be 
:added to the Configure -h output, that'd be at least as easy as in autoconf, 
:and almost as useful.

It would be better to add support in metaconfig directly, and embed the
help text in the units.  However, this would only be done for things that
the user would want to override at build-time.  I won't do that now,
however.

Virtually anything can be overriden with Configure provided you know the
variable (just look at the Configure script -- it's supposed to be
readable), and that the unit is correctly written.

Raphael

------------------------------------------------------------------------
#! /bin/sh
#
# $Id: configure,v 3.0.1.2 1997/02/28 16:28:49 ram Exp ram $
#
# GNU configure-like front end to metaconfig's Configure.
#
# Written by Andy Dougherty <[EMAIL PROTECTED]>
# Matthew Green <[EMAIL PROTECTED]> and Tom Tromey <[EMAIL PROTECTED]>.
#
# Reformatted and modified for inclusion in the dist-3.0 package by
# Raphael Manfredi <[EMAIL PROTECTED]>.
#
# This script belongs to the public domain and may be freely redistributed.
#
# The remaining of this leading shell comment may be removed if you
# include this script in your own package.
#
# $Log: configure,v $
# Revision 3.0.1.2  1997/02/28  16:28:49  ram
# patch61: added the srcdir support now that we have src.U
# patch61: random cleanup for nicer help message
#
# Revision 3.0.1.1  1995/07/25  14:16:21  ram
# patch56: created
#

(exit $?0) || exec sh $0 $argv:q
opts=''
verbose=''
create='-e'
srcdir=''
while test $# -gt 0; do
        case $1 in
    --help)
                cat <<EOM
Usage: configure [options]
This is GNU configure-like front end for a metaconfig-generated Configure.
It emulates the following GNU configure options (must be fully spelled out):

    --help               --srcdir=DIRECTORY
    --no-create          --silent
    --prefix=PREFIX      --verbose
    --quiet              --version

And it honours these environment variables: CC, CFLAGS and DEFS.

Furthermore, it ignores the following arguments, when supplied:

    --cache-file=FILE    --target=TARGET
    --enable-*           --with-*
    --host=HOST
EOM
                exit 0
                ;;
        --no-create)
                create='-E'
                shift
                ;;
        --prefix=*)
                arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
                opts="$opts $arg"
                shift
                ;;
        --prefix)
                shift
                opts="$opts -Dprefix=$1"
                shift
                ;;
        --srcdir=*)
                arg=`echo $1 | sed 's/--srcdir=//'`
                srcdir=$arg
                shift
                ;;
        --srcdir)
                shift
                srcdir=$1
                shift
                ;;
        --quiet|--silent)
                exec >/dev/null 2>&1
                shift
                ;;
        --verbose)
                verbose=true
                shift
                ;;
        --version)
                copt="$copt -V"
                shift
                ;;
        --host=*|--target=*|--cache-file=*|--enable-*|--with-*)
                shift
                ;;
        --*)
                opt=`echo $1 | sed 's/=.*//'`
                echo "This GNU configure front end does not understand $opt"
                exit 1
                ;;
        *)
                opts="$opts $1"
                shift
                ;;
        esac
done

case "$CC" in
'') ;;
*) opts="$opts -Dcc='$CC'";;
esac

# Join DEFS and CFLAGS together.
ccflags=''
case "$DEFS" in
'') ;;
*) ccflags=$DEFS;;
esac
case "$CFLAGS" in
'') ;;
*) ccflags="$ccflags $CFLAGS";;
esac
case "$ccflags" in
'') ;;
*) opts="$opts -Dccflags='$ccflags'";;
esac

# Don't use -s if they want verbose mode
case "$verbose" in
'') copt="$copt -ds";;
*) copt="$copt -d";;
esac

# Figure out srcdir if not set already
case "$srcdir" in
'') srcdir=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
esac
case "$srcdir" in
".") ;;
*) opts="$opts -Dsrc=$srcdir";;
esac

set X sh $srcdir/Configure $copt $create $opts
shift
echo "$@"
exec "$@"


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to