Annotation of pkgsrc/lang/gcc/Makefile, Revision 1.61
1.61 ! seb 1: # $NetBSD: Makefile,v 1.60 2003/06/02 01:19:04 jschauma Exp $
1.1 tron 2:
1.31 tron 3: DISTNAME= gcc-2.95.3
1.58 grant 4: PKGREVISION= 2
1.1 tron 5: CATEGORIES= lang
6: MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
1.39 jmc 7: #
1.47 jlam 8: # Synced from patches against main source tree as of 2002-03-28
1.39 jmc 9: #
1.60 jschauma 10: MAINTAINER= tech-pkg@netbsd.org
1.1 tron 11: HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
1.14 agc 12: COMMENT= GNU Compiler Collection
1.52 grant 13:
14: NOT_FOR_PLATFORM= Darwin-*-*
1.44 dmcmahil 15:
16: PATCH_SITES= ${MASTER_SITE_LOCAL}
1.45 dmcmahil 17: PATCHFILES= gcc-2.95.3-diff-2002-08-29.gz
1.1 tron 18:
1.47 jlam 19: USE_BUILDLINK2= YES
1.53 jlam 20: USE_PKGINSTALL= YES
1.4 tron 21: USE_GMAKE= YES
1.47 jlam 22:
1.4 tron 23: HAS_CONFIGURE= YES
1.49 seb 24: CONFIGURE_SCRIPT= ${WRKSRC}/configure
1.47 jlam 25: CONFIGURE_ARGS= --host=${MACHINE_GNU_PLATFORM}
26: CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
27: CONFIGURE_ARGS+= --enable-shared
1.1 tron 28:
1.49 seb 29: CONFIGURE_DIRS= ${WRKDIR}/objdir
30: BUILD_DIRS= ${CONFIGURE_DIRS}
1.1 tron 31:
1.47 jlam 32: INFO_FILES= chill.info cpp.info g77.info gcc.info
33:
1.9 tron 34: .include "../../mk/bsd.prefs.mk"
35:
1.58 grant 36: GCC_PREFIX= ${PREFIX}/${PKGNAME_NOREV}
37: PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
38: CONFIGURE_ARGS+= --infodir=${PREFIX}/info
39:
1.47 jlam 40: .if ${OPSYS} == "SunOS"
41: CONFLICTS+= gcc-[0-9]* pgcc-[0-9]*
1.54 grant 42: . if ${CC:M*gcc*} == ""
1.9 tron 43: ALL_TARGET= bootstrap
1.47 jlam 44: . endif
1.54 grant 45: # we know it's a GNU toolchain on Linux and the BSDs.
1.55 grant 46: .elif ${OPSYS:M*BSD} != "" || ${OPSYS} == "Linux"
1.47 jlam 47: CONFIGURE_ARGS+= --with-gnu-as
48: CONFIGURE_ARGS+= --with-gnu-ld
1.54 grant 49: .else
50: # play it safe, force a bootstrap build if we don't know for sure it
51: # is gcc.
1.55 grant 52: . if ${CC:M*gcc*} == ""
1.54 grant 53: ALL_TARGET= bootstrap
54: . endif
1.9 tron 55: .endif
56:
1.47 jlam 57: GCC_ARCHDIR= ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}
58: FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX}
1.61 ! seb 59: FILES_SUBST+= DISTNAME=${DISTNAME}
! 60: MESSAGE_SUBST+= DISTNAME=${DISTNAME}
! 61: PLIST_SUBST+= DISTNAME=${DISTNAME}
1.47 jlam 62:
1.1 tron 63: post-extract:
64: ${MKDIR} ${WRKSRC}
1.49 seb 65: ${CP} ${FILESDIR}/xm-netbsd.h ${WRKSRC}/gcc/config
66: ${CP} ${FILESDIR}/xm-target64.h ${WRKSRC}/gcc/config
1.47 jlam 67: for file in ${FILESDIR}/*_* ; do \
68: arch=`${BASENAME} $${file} | ${SED} -e "s/_.*//"`; \
69: dest=`${BASENAME} $${file} | ${SED} -e "s/$${arch}_//"`; \
1.49 seb 70: ${MKDIR} ${WRKSRC}/gcc/config/$${arch}; \
71: ${CP} $${file} ${WRKSRC}/gcc/config/$${arch}/$${dest}; \
1.39 jmc 72: done
1.49 seb 73: ${RM} ${WRKSRC}/gcc/config/alpha/netbsd-elf.h
74: ${RM} ${WRKSRC}/gcc/config/arm/t-netbsd
75: ${RM} ${WRKSRC}/gcc/config/mips/x-netbsd
76: ${RM} ${WRKSRC}/libf2c/libF77/dtime_.c
77: ${RM} ${WRKSRC}/libf2c/libF77/etime_.c
1.8 fredb 78:
1.47 jlam 79: pre-configure:
1.49 seb 80: ${MKDIR} ${BUILD_DIRS}
1.57 jschauma 81: cd ${WRKSRC} && contrib/egcs_update --touch
1.4 tron 82:
83: post-build:
1.47 jlam 84: @${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc.mk > ${WRKDIR}/gcc.mk
1.29 fredb 85:
1.54 grant 86: .if ${OPSYS} == "SunOS"
1.47 jlam 87: #
88: # remove empty file and directories that show up when one does:
89: # make install; make deinstall; make install
90: #
91: post-install:
1.61 ! seb 92: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${DISTNAME}
! 93: ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/share/examples/${DISTNAME}/mk.conf
1.47 jlam 94: -cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
95: .else
1.4 tron 96: post-install:
1.61 ! seb 97: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${DISTNAME}
! 98: ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/share/examples/${DISTNAME}/mk.conf
1.47 jlam 99: . if exists(/usr/include/g++/FlexLexer.h)
100: ${LN} -fs /usr/include/g++/FlexLexer.h \
101: ${GCC_PREFIX}/include/g++-3/FlexLexer.h
102: . endif
103: ${RM} -f ${GCC_ARCHDIR}/include/curses.h ${GCC_PREFIX}/bin/cc
1.58 grant 104: .endif
1.47 jlam 105: ${LN} -s gcc ${GCC_PREFIX}/bin/cc
1.41 dmcmahil 106: ${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
1.47 jlam 107: ${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
108: | ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
109: >> ${PLIST_SRC}
110: ${FIND} ${GCC_PREFIX} -type d -print \
111: | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
112: >> ${PLIST_SRC}
1.1 tron 113:
1.35 seb 114: .include "../../mk/texinfo.mk"
1.1 tron 115: .include "../../mk/bsd.pkg.mk"
1.9 tron 116:
117: # Make bootstrap with compiler != gcc possible.
1.42 yyamano 118: LDFLAGS= ${_STRIPFLAG_CC}
CVSweb <webmaster@jp.NetBSD.org>