1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/lang/gcc28/Makefile
Satoshi Asami e244b8bccc Fix to make ports work with bsd.port.mk rev. 1.306.
${MACHINE_ARCH}--freebsd${OSREL} is now passed to CONFIGURE_ARGS if
GNU_CONFIGURE is defined.  Take the target out of CONFIGURE_ARGS of
some ports that added it explicitly; define it as
${MACHINE_ARCH}--freebsd if the port doesn't like the ${OSREL} part;
define it as something else (such as ${MACHINE_ARCH}--freebsdelf if
the port requires that; define it as an empty string if the port
doesn't like it at all.

The last might be a sign that a GNU_CONFIGURE port actually doesn't
use GNU's version of configure at all; but I don't have time to go
look at them all, we'll fix them as time goes on.

At least we've got much fewer "-unknown-"s in the tree as the result. :)
1999-03-08 07:28:36 +00:00

75 lines
2.3 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: gcc
# Version required: 2.8.1
# Date created: 17 Jan 1998
# Whom: David O'Brien <obrien@NUXI.com>
#
# $Id: Makefile,v 1.21 1999/02/09 18:25:42 obrien Exp $
#
DISTNAME= gcc-2.8.1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gcc
MAINTAINER= obrien@FreeBSD.org
.include <bsd.port.pre.mk>
.if ${PORTOBJFORMAT} == "elf"
GNUHOST= ${ARCH}-unknown-freebsd${OSREL}
.else
GNUHOST= ${ARCH}-unknown-freebsdaout${OSREL}
.endif
PLIST_SUB= GNUHOST=${GNUHOST}
CONFIGURE_ARGS= --with-gxx-include-dir=${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/include/g++
.if ${PORTOBJFORMAT} == "elf"
CONFIGURE_ARGS+= --host=${GNUHOST}
.endif
GNU_CONFIGURE= yes
CONFIGURE_TARGET= # empty
USE_GMAKE= yes
ALL_TARGET= bootstrap
MAN1= cccp28.1 g++28.1 gcc28.1
pre-fetch:
@${ECHO} "GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} ${PORTOBJFORMAT}"
pre-patch:
@${MV} ${WRKSRC}/config/i386/freebsd.h ${WRKSRC}/config/i386/freebsd-aout.h
@${MV} ${WRKSRC}/config/i386/freebsd-elf.h ${WRKSRC}/config/i386/freebsd.h
pre-configure:
@# Keep from running `autoconf' and `autoheader' since we modified
@# configure.in by patching it.
@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/configure
@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/cstamp-h.in
@(cd ${WRKSRC}/config/${ARCH}/ ; \
MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
${MV} freebsd-aout.h freebsd-aout.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" \
freebsd-aout.h.in >freebsd-aout.h ; \
${MV} freebsd.h freebsd.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
>freebsd.h)
post-install:
@${RM} -f ${PREFIX}/bin/c++
(for prog in ${PREFIX}/bin/gcc ${PREFIX}/bin/g++ ${PREFIX}/bin/gcov \
${PREFIX}/bin/protoize ${PREFIX}/bin/unprotoize \
${PREFIX}/bin/${GNUHOST}-gcc \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1 \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1obj \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1plus \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cpp ; \
do strip $$prog ; \
done)
ln -f ${PREFIX}/bin/gcc ${PREFIX}/bin/gcc28
ln -f ${PREFIX}/bin/g++ ${PREFIX}/bin/g++28
@${MV} ${PREFIX}/man/man1/cccp.1 ${PREFIX}/man/man1/cccp28.1
@${MV} ${PREFIX}/man/man1/g++.1 ${PREFIX}/man/man1/g++28.1
@${MV} ${PREFIX}/man/man1/gcc.1 ${PREFIX}/man/man1/gcc28.1
.include <bsd.port.post.mk>