How to get the %configure macro to run "../configure"?
%global _configure ../configure works on my machine but not the koji builders.
On Thu, Feb 26, 2009 at 09:54:10AM -0700, Orion Poplawski wrote:
How to get the %configure macro to run "../configure"?
%global _configure ../configure works on my machine but not the koji builders.
FWIW we recently changed the %{_mingw32_configure} macro so that it automatically looks for ./configure and ../configure in that order.
It now looks like this:
%_mingw32_configure %{_mingw32_env} ; \ __mingw32_topdir=.; if ! test -x configure; then __mingw32_topdir=..; fi; \\ $__mingw32_topdir/configure --cache-file=%{_mingw32_cache} \\ [etc]
http://cvs.fedoraproject.org/viewvc/devel/mingw32-filesystem/macros.mingw32?...
Rich.
On Thu, 2009-02-26 at 09:54 -0700, Orion Poplawski wrote:
How to get the %configure macro to run "../configure"?
%global _configure ../configure works on my machine but not the koji builders.
I was trying to do this (for hv3...) and couldn't figure out a way. Mandriva can do it, because its %configure script includes a CONFIGURE_TOP variable:
# This is an improved version of %configure (from PLD team). %configure \ %before_configure ; \ %{?!_disable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \ [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \ CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \ $CONFIGURE_TOP/configure %{_target_platform} \\
(etc etc etc)
might be nice to have that in Fedora. Obviously, if CONFIGURE_TOP is not specified it defaults to ./ , and if you want to run a configure from some other dir, you define CONFIGURE_TOP in the spec.
Some spec files use:
mkdir build cd build ln -s ../configure ., %configure ...
On Thu, Feb 26, 2009 at 6:12 PM, Adam Williamson awilliam@redhat.com wrote:
On Thu, 2009-02-26 at 09:54 -0700, Orion Poplawski wrote:
How to get the %configure macro to run "../configure"?
%global _configure ../configure works on my machine but not the koji builders.
I was trying to do this (for hv3...) and couldn't figure out a way. Mandriva can do it, because its %configure script includes a CONFIGURE_TOP variable:
# This is an improved version of %configure (from PLD team). %configure \ %before_configure ; \ %{?!_disable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \ [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \ CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \ $CONFIGURE_TOP/configure %{_target_platform} \\
(etc etc etc)
might be nice to have that in Fedora. Obviously, if CONFIGURE_TOP is not specified it defaults to ./ , and if you want to run a configure from some other dir, you define CONFIGURE_TOP in the spec.
Would it not be more appropriate to do this as a macro? It seems like CONFIGURE_TOP is an environment variable.
rpm/macros: %_configure ./configure %configure \ %{_configure} ...
And then
%define _configure ../configure cd build %configure --enable-other-stuff
in the package.
-- Dan
On Fri, 2009-02-27 at 12:31 -0800, Dan Nicholson wrote:
I was trying to do this (for hv3...) and couldn't figure out a way. Mandriva can do it, because its %configure script includes a CONFIGURE_TOP variable:
# This is an improved version of %configure (from PLD team). %configure \ %before_configure ; \ %{?!_disable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \ [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \ CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \ $CONFIGURE_TOP/configure %{_target_platform} \\
(etc etc etc)
might be nice to have that in Fedora. Obviously, if CONFIGURE_TOP is not specified it defaults to ./ , and if you want to run a configure from some other dir, you define CONFIGURE_TOP in the spec.
Would it not be more appropriate to do this as a macro? It seems like CONFIGURE_TOP is an environment variable.
rpm/macros: %_configure ./configure %configure \ %{_configure} ...
And then
%define _configure ../configure cd build %configure --enable-other-stuff
Sure, looks sensible to me. I think the CONFIGURE_TOP stuff is quite old, it may have been a different scenario back when it was invented. macro looks like a good way to do it now.
Roland McGrath wrote:
Some spec files use:
mkdir build cd build ln -s ../configure ., %configure ...
This doesn't work for me - doesn't know then that the source directory is "..".
Dan Nicholson wrote:
Would it not be more appropriate to do this as a macro? It seems like CONFIGURE_TOP is an environment variable.
rpm/macros: %_configure ./configure %configure \ %{_configure} ...
And then
%define _configure ../configure cd build %configure --enable-other-stuff
in the package.
https://bugzilla.redhat.com/show_bug.cgi?id=489942