2002-04-08 14:11:43 +02:00
|
|
|
# $NetBSD: Makefile,v 1.41 2002/04/08 12:11:43 dmcmahill Exp $
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-01-03 22:39:54 +01:00
|
|
|
# Make sure that the version number in "Makefile.gcc" matches this.
|
2002-01-03 21:40:37 +01:00
|
|
|
DISTNAME= gcc-2.95.3
|
2000-03-25 00:41:20 +01:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
|
|
|
|
|
2002-03-28 11:11:50 +01:00
|
|
|
#
|
|
|
|
# Synced from patches against main source tree as of:
|
|
|
|
#
|
|
|
|
# 03/28/02
|
2000-03-25 00:41:20 +01:00
|
|
|
MAINTAINER= packages@netbsd.org
|
|
|
|
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
|
2001-02-17 10:06:56 +01:00
|
|
|
COMMENT= GNU Compiler Collection
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2001-09-28 01:17:41 +02:00
|
|
|
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2000-09-16 01:58:47 +02:00
|
|
|
USE_GMAKE= YES
|
|
|
|
HAS_CONFIGURE= YES
|
2002-03-14 17:21:57 +01:00
|
|
|
CONFIGURE_ARGS= --host=${MACHINE_GNU_PLATFORM} \
|
2001-05-04 12:15:44 +02:00
|
|
|
--prefix=${GCC_PREFIX} \
|
|
|
|
--enable-shared
|
2000-03-27 10:54:53 +02:00
|
|
|
CONFIGURE_SCRIPT= ${SRCDIR}/configure
|
2001-06-11 19:21:56 +02:00
|
|
|
INFO_FILES= chill.info cpp.info g77.info gcc.info
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-01-09 17:33:32 +01:00
|
|
|
PLIST_SUBST+= GCC_VERSION=${PKGVERSION}
|
2001-03-01 00:51:12 +01:00
|
|
|
SRCDIR= ${WRKDIR}/${DISTNAME}
|
2000-03-27 10:54:53 +02:00
|
|
|
WRKSRC= ${WRKDIR}/objdir
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if (${OPSYS} != SunOS)
|
2001-06-11 19:21:56 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld --infodir=${PREFIX}/info
|
2001-01-11 07:53:10 +01:00
|
|
|
GCC_PREFIX= ${LOCALBASE}/${PKGNAME}
|
2002-04-08 14:11:43 +02:00
|
|
|
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
|
2001-01-11 07:53:10 +01:00
|
|
|
.else
|
|
|
|
.if (${CC} != gcc)
|
|
|
|
ALL_TARGET= bootstrap
|
|
|
|
.endif
|
|
|
|
GCC_PREFIX= ${LOCALBASE}
|
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.SunOS
|
2001-01-29 12:34:21 +01:00
|
|
|
MESSAGE= ${PKGDIR}/MESSAGE.SunOS
|
2001-02-21 19:12:20 +01:00
|
|
|
CONFLICTS+= gcc-[0-9]* pgcc-[0-9]*
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
|
|
|
|
2000-03-25 00:41:20 +01:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKSRC}
|
2002-01-03 21:40:37 +01:00
|
|
|
cd ${WRKSRC}/../${DISTNAME}/gcc/config; \
|
|
|
|
${CP} ${FILESDIR}/xm-netbsd.h .; \
|
2002-03-28 11:11:50 +01:00
|
|
|
${CP} ${FILESDIR}/xm-target64.h .; \
|
|
|
|
for FILE in ${FILESDIR}/*_* ; do \
|
|
|
|
ARCH=`basename $${FILE} | cut -d_ -f1`; \
|
|
|
|
DEST=`basename $${FILE} | sed -e "s/$${ARCH}_//"`; \
|
2002-01-03 21:40:37 +01:00
|
|
|
${MKDIR} $${ARCH}; \
|
2002-03-28 11:11:50 +01:00
|
|
|
${CP} $${FILE} $${ARCH}/$${DEST}; \
|
2002-02-16 15:46:19 +01:00
|
|
|
done; \
|
2002-03-28 11:11:50 +01:00
|
|
|
cd ${WRKSRC}/../${DISTNAME}; \
|
|
|
|
for i in gcc/config/alpha/netbsd-elf.h gcc/config/arm/t-netbsd gcc/config/mips/x-netbsd libf2c/libF77/dtime_.c libf2c/libF77/etime_.c; do \
|
|
|
|
${RM} $${i};\
|
|
|
|
done
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2000-09-26 00:19:19 +02:00
|
|
|
post-patch:
|
|
|
|
${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
.if (${OPSYS} != SunOS)
|
2000-09-16 01:58:47 +02:00
|
|
|
post-build:
|
2001-02-08 18:27:01 +01:00
|
|
|
for FILE in ${FILESDIR}/gcc.mk; do \
|
2000-09-16 02:19:45 +02:00
|
|
|
${SED} -e 's#@@MAKE@@#${MAKE}#g' \
|
|
|
|
-e 's#@@PKGNAME@@#${PKGNAME}#g' \
|
|
|
|
-e 's#@@PREFIX@@#${PREFIX}#g' \
|
2001-01-11 07:53:10 +01:00
|
|
|
<$$FILE >${WRKDIR}/`basename $$FILE`; \
|
2000-09-16 02:19:45 +02:00
|
|
|
done
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
2000-09-16 01:58:47 +02:00
|
|
|
|
2001-12-29 18:41:45 +01:00
|
|
|
pre-install:
|
|
|
|
${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} any PRE-INSTALL
|
|
|
|
|
2001-01-13 01:34:55 +01:00
|
|
|
.if (${OPSYS} != SunOS)
|
2000-09-16 01:58:47 +02:00
|
|
|
post-install:
|
2002-03-14 17:21:57 +01:00
|
|
|
${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/curses.h ${PREFIX}/${PKGNAME}/bin/cc
|
2001-01-13 01:34:55 +01:00
|
|
|
${LN} -s gcc ${PREFIX}/${PKGNAME}/bin/cc
|
2000-09-16 01:58:47 +02:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
|
2002-04-08 14:11:43 +02:00
|
|
|
${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
|
|
|
|
${FIND} ${PREFIX}/${PKGNAME} -type f -print | ${SORT} -r | ${SED} 's;${PREFIX}/;;g' >> ${PLIST_SRC}
|
|
|
|
${FIND} ${PREFIX}/${PKGNAME} -type l -print | ${SORT} -r | ${SED} 's;${PREFIX}/;;g' >> ${PLIST_SRC}
|
|
|
|
${FIND} ${PREFIX}/${PKGNAME} -type d -print | ${SORT} -r | ${SED} 's;${PREFIX}/;@dirrm ;g' >> ${PLIST_SRC}
|
2002-01-09 17:33:32 +01:00
|
|
|
.else
|
2002-03-14 21:44:21 +01:00
|
|
|
# remove empy file and directories that show up when one
|
2002-01-09 17:33:32 +01:00
|
|
|
# does make install; make deinstall; make install
|
|
|
|
post-install:
|
2002-03-14 21:44:21 +01:00
|
|
|
-cd ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include && \
|
|
|
|
${RM} -f fixed && \
|
|
|
|
${RMDIR} v7 v9
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
2000-09-16 01:58:47 +02:00
|
|
|
|
2002-02-18 16:14:00 +01:00
|
|
|
.include "../../mk/texinfo.mk"
|
2000-03-25 00:41:20 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|
2001-01-11 07:53:10 +01:00
|
|
|
|
|
|
|
# Make bootstrap with compiler != gcc possible.
|
|
|
|
LDFLAGS= ${STRIPFLAG}
|