openbsd-ports/devel/binutils/stable/Makefile
espie 8bc41423db fix PKGNAME, so that cross-binutils have real different names.
Install files correctly, so that SEPARATE_BUILD gets possible.
2003-06-30 21:01:14 +00:00

92 lines
2.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.22 2003/06/30 21:01:14 espie Exp $
COMMENT= "GNU development tools"
V= 2.13.2.1
DISTNAME= binutils-$V
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=binutils/}
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MAINTAINER= Federico G. Schwindt <fgsch@openbsd.org>
HOMEPAGE= http://sources.redhat.com/binutils/
AUTOCONF_VERSION= 2.13
BUILD_DEPENDS= ::devel/automake \
${MODGNU_AUTOCONF_DEPENDS}
SUBST_VARS= TARGET_ARCH OSREV
MODULES= gnu
CONFIGURE_STYLE= simple
CONFIGURE_ARGS= --with-prefix=${PREFIX} \
--disable-nls --disable-commonbfdlib
# cross-tools
FLAVORS= alpha hppa i386 m68k m88k mips powerpc \
sparc sparc64 vax x86_64
FLAVOR?=
SEPARATE_BUILD= flavored
# XXX: special handling needed for powerpc arch's and bootstraping
.if !empty(FLAVOR:L) && ${FLAVOR:L} != ${MACHINE_ARCH}
CONFIGURE_ARGS+= --target=${FLAVOR:L}-unknown-openbsd${OSREV}
TARGET_ARCH= ${FLAVOR:L}
PLIST= ${PKGDIR}/PLIST.cross
FULLPKGNAME= binutils-${TARGET_ARCH}-$V
.if ${FLAVOR} == "x86_64" || ${FLAVOR} == "sparc64" || ${FLAVOR} == "alpha"
CONFIGURE_ARGS+= --enable-64-bit-bfd
.endif
.else
TARGET_ARCH= ${MACHINE_ARCH}
.endif
TARGET_DIR= $${PREFIX}/${TARGET_ARCH}-unknown-openbsd${OSREV}
REGRESS_TARGET= check
REGRESS_DEPENDS= ::devel/dejagnu
FILES= ar nm-new objdump ranlib size strings strip-new
EMULPARAMS= i386obsd.sh sparcobsd.sh m68kobsd.sh
post-extract:
.for f in ${EMULPARAMS}
cp -f ${FILESDIR}/${f} ${WRKSRC}/ld/emulparams
.endfor
@cp -f ${FILESDIR}/te-obsd.h ${WRKSRC}/gas/config
post-patch:
@cd ${WRKSRC}/bfd && AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf
@-cd ${WRKSRC}/gas && { automake; AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf; }
@cd ${WRKSRC}/ld && automake
do-install:
${INSTALL_DATA_DIR} ${TARGET_DIR}/bin
${INSTALL_DATA_DIR} ${TARGET_DIR}/man/man1
if [ -f ${WRKBUILD}/gprof/gprof ]; then \
cd ${WRKBUILD}; \
${INSTALL_PROGRAM} gprof/gprof ${TARGET_DIR}/bin; \
${INSTALL_MAN} gprof/gprof.1 ${TARGET_DIR}/man/man1; \
fi
cd ${WRKBUILD} && { \
${INSTALL_PROGRAM} gas/as-new ${TARGET_DIR}/bin/as; \
${INSTALL_PROGRAM} ld/ld-new ${TARGET_DIR}/bin/ld; \
${INSTALL_MAN} gas/doc/as.1 ${TARGET_DIR}/man/man1; \
${INSTALL_MAN} ld/ld.1 ${TARGET_DIR}/man/man1; \
for s in ${FILES}; do \
d=`echo $${s} | sed s/-new//`; \
${INSTALL_PROGRAM} binutils/$${s} ${TARGET_DIR}/bin/$${d}; \
${INSTALL_MAN} ${WRKSRC}/binutils/doc/$${d}.1 ${TARGET_DIR}/man/man1; \
done \
}
.include <bsd.port.mk>