Chris Johns 4f26bdb2f0 Add Canadian Cross support.
Add support to build MinGW tools using Cygwin. This is a Canadian cross
build.

Do not expand the directives when parsing a configuration file. Hold
in the package object the text as read from the configuration file. Still
parse the logic but leave the macros. This allows a configuration to be
varied when the build happens. The Canadian cross uses this to build a
build compiler used to build a Cxc runtime.

Add Cxc support to the build module. In the defaults add rm and rmfile
macros, add Cxc paths and pre-build script code.

In the setbuilder check for a Cxc build and if so and the package
allow Cxc build the build host version then the host target
version.

Add cygiwn support to the defaults processing and to the Windows module.
2013-04-01 15:19:56 +11:00

78 lines
1.6 KiB
INI

#
# Automake 1.xx Version 1.
#
# This configuration file configure's, make's and install's automake
#
%ifn %{defined _internal_autotools}
%define _internal_autotools no
%endif
Name: automake-%{automake_version}-%{_host}-%{release}
Summary: Automake v%{automake_version} for host %{_host}
Version: %{automake_version}
Release: %{release}
URL: http://www.gnu.org/software/automake/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
VersionControl0: git clone git://git.savannah.gnu.org/automake.git
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
cd automake-%{automake_version}
%{?patch0:%patch0 -p1}
cd ..
%build
if test "%{_internal_autotools}" == "yes"; then
export PATH="%{_bindir}:${PATH}"
else
export PATH=$SB_ORIG_PATH
fi
cd automake-%{automake_version}
if test "%{_internal_autotools}" == "yes"; then
am_prefix=$SB_TMPPREFIX
else
am_prefix=%{_prefix}
fi
if test "%{_build}" != "%{_host}" ; then
CFLAGS_FOR_BUILD="-g -O2 -Wall"
fi
export CFLAGS CFLAGS_FOR_BUILD CC
CFLAGS="$SB_OPT_FLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
--verbose \
--prefix=${am_prefix}
%{__make} %{?_smp_mflags} all
unset CFLAGS_FOR_BUILD
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $SB_BUILD_ROOT
cd automake-%{automake_version}
if "%{_internal_autotools}" == "yes"; then
%{__make} install
else
%{__make} DESTDIR=$SB_BUILD_ROOT install
fi
cd ..