1998-09-25 18:45:26 -04:00
|
|
|
# OpenBSD makefile for: egcs
|
1998-11-24 19:54:02 -05:00
|
|
|
# Version required: snapshot 1998-11-22
|
1998-09-25 18:45:26 -04:00
|
|
|
# Date created: 25 sep 98
|
|
|
|
# Whom: Marc Espie
|
|
|
|
#
|
1998-12-02 21:33:34 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.6 1998/12/03 02:33:34 espie Exp $
|
1998-09-25 18:45:26 -04:00
|
|
|
#
|
|
|
|
# This is a configuration file for egcs, recent snapshot
|
1998-11-17 12:39:33 -05:00
|
|
|
# PLEASE use the regular egcs-stable for serious work, resort to this one
|
|
|
|
# for experimentations and testing.
|
|
|
|
# Right now, we can only configure i386. Bound to change in the future
|
|
|
|
|
|
|
|
# we could remove this dependency by patching configure, but this is not
|
|
|
|
# reasonable...
|
1998-12-02 21:33:34 -05:00
|
|
|
|
|
|
|
# we HAVE to provide configure NOW, since the autoconf people have not
|
|
|
|
# released autoconf 2.12.1, BUT egcs uses that ANYWAY. Fuck !!!
|
|
|
|
#BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
CATEGORIES= lang
|
|
|
|
MAINTAINER= Marc.Espie@openbsd.org
|
|
|
|
|
|
|
|
# this will improve over time as more and more architectures are handled
|
1998-11-24 19:54:02 -05:00
|
|
|
# with some help from Jason L. Wright for sparc...
|
|
|
|
ONLY_FOR_ARCHS = i386 sparc
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
# user configuration section
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-16 16:11:13 -05:00
|
|
|
# see files/tests for precise testing procedure
|
1998-11-17 12:39:33 -05:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
|
|
|
|
# as of 19981122, cygnus snapshot packaging scheme is BROKEN.
|
|
|
|
# YOU MUST USE THE MAMMOTH ARCHIVE !!!
|
1998-11-16 16:11:13 -05:00
|
|
|
MAKE_TESTS=yes
|
|
|
|
MAKE_GXX=yes
|
|
|
|
MAKE_FORTRAN=yes
|
1998-11-17 12:39:33 -05:00
|
|
|
MAKE_CHILL=yes
|
1998-11-24 19:54:02 -05:00
|
|
|
MAKE_OBJC=yes
|
|
|
|
MAKE_JAVA=yes
|
1998-11-17 12:39:33 -05:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
BUILD_DEPENDS+= runtest:${PORTSDIR}/devel/dejagnu
|
|
|
|
.endif
|
1998-11-16 16:11:13 -05:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
# if you want/need to use the mammoth archive
|
|
|
|
ONE_ARCHIVE=yes
|
1998-11-17 12:39:33 -05:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
|
|
|
|
LATEST_DATE=1998-11-22
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
#### fetch section
|
|
|
|
# configuration is built so that you can test the next snapshot easily,
|
|
|
|
# define NEXT_DATE to the next snapshot... you lose the ability to check
|
|
|
|
# md5 sums, though.
|
1998-12-02 21:33:34 -05:00
|
|
|
NEXT_DATE=1998-11-30
|
|
|
|
PATCH_DEBUG=yes
|
1998-11-16 16:11:13 -05:00
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
LATEST != echo ${LATEST_DATE} | sed -e s/-//g;
|
1998-11-16 16:11:13 -05:00
|
|
|
DIRECTORY=egcs/snapshots/%SUBDIR%/
|
1998-11-17 12:39:33 -05:00
|
|
|
.if defined(NEXT_DATE)
|
|
|
|
NEXT != echo ${NEXT_DATE} | sed -e s/-//g;
|
1998-11-16 16:11:13 -05:00
|
|
|
DISTNAME= egcs-${NEXT}
|
|
|
|
.else
|
|
|
|
DISTNAME= egcs-${LATEST}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# getting the right archives where they should be
|
|
|
|
MASTER_SITE_SUBDIR=${LATEST}
|
|
|
|
PATCH_SITE_SUBDIR=${NEXT}
|
|
|
|
|
|
|
|
DIST_SUBDIR=egcs
|
|
|
|
|
|
|
|
PATCH_SITES = ${MASTER_SITES}
|
|
|
|
PATCH_DIST_STRIP=-p1
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(ONE_ARCHIVE)
|
|
|
|
DISTFILES= egcs-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.else
|
|
|
|
|
1998-09-25 18:45:26 -04:00
|
|
|
DISTFILES= egcs-core-${LATEST}${EXTRACT_SUFX}
|
1998-11-16 16:11:13 -05:00
|
|
|
.if defined(MAKE_TESTS)
|
1998-10-02 14:57:28 -04:00
|
|
|
DISTFILES+=egcs-tests-${LATEST}${EXTRACT_SUFX}
|
1998-11-16 16:11:13 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
DISTFILES+= egcs-g++-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
DISTFILES+=egcs-g++-tests-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
DISTFILES+= egcs-g77-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
DISTFILES+=egcs-g77-testsuite-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
DISTFILES+=egcs-java-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
DISTFILES+=egcs-objc-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
DISTFILES+=egcs-chill-${LATEST}${EXTRACT_SUFX}
|
|
|
|
.endif
|
1998-10-02 14:57:28 -04:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
.endif
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
# to do: check egcs-stable mirror list for sites which carry snapshots
|
|
|
|
|
1998-09-25 18:45:26 -04:00
|
|
|
MASTER_SITES= ftp://egcs.cygnus.com/pub/${DIRECTORY} \
|
|
|
|
ftp://ftp.lip6.fr/pub/${DIRECTORY}
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
# add a possible next snapshot
|
|
|
|
|
1998-11-16 16:11:13 -05:00
|
|
|
.if defined(NEXT)
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(ONE_ARCHIVE)
|
|
|
|
PATCHFILES=egcs-${LATEST}-${NEXT}.diff.gz
|
|
|
|
|
|
|
|
.else
|
1998-11-16 16:11:13 -05:00
|
|
|
PATCHFILES=egcs-core-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
PATCHFILES+=egcs-tests-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
PATCHFILES+=egcs-g++-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
PATCHFILES+=egcs-g++-tests-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
PATCHFILES+=egcs-g77-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
PATCHFILES+=egcs-g77-testsuite-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
PATCHFILES+=egcs-java-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
PATCHFILES+=egcs-objc-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
PATCHFILES+=egcs-chill-${LATEST}-${NEXT}.diff.gz
|
|
|
|
.endif
|
1998-11-24 19:54:02 -05:00
|
|
|
.endif
|
1998-11-16 16:11:13 -05:00
|
|
|
|
|
|
|
.endif
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
# synch the date
|
|
|
|
.if defined(NEXT)
|
|
|
|
post-extract:
|
|
|
|
${MV} ${WRKDIR}/egcs-${LATEST} ${WRKSRC}
|
|
|
|
.endif
|
1998-11-16 16:11:13 -05:00
|
|
|
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
####
|
|
|
|
# Patch section
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
PATCH_LIST=patch-core-*
|
1998-11-17 12:39:33 -05:00
|
|
|
.if defined(MAKE_GXX)
|
1998-11-24 19:54:02 -05:00
|
|
|
PATCH_LIST+=patch-g++-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
PATCH_LIST+=patch-objc-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
PATCH_LIST+=patch-chill-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
PATCH_LIST+=patch-g77-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
PATCH_LIST+=patch-java-*
|
1998-11-17 12:39:33 -05:00
|
|
|
.endif
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
# get openbsd configuration files where they should be
|
|
|
|
post-patch:
|
1998-12-02 21:33:34 -05:00
|
|
|
# avoid packaging include copies along...
|
|
|
|
find ${WRKSRC} -name \*.orig|xargs ${RM}
|
1998-11-17 12:39:33 -05:00
|
|
|
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
|
|
|
|
-${RM} -rf ${WRKSRC}/texinfo
|
|
|
|
.if !defined(MAKE_CHILL)
|
1998-11-24 19:54:02 -05:00
|
|
|
-${RM} -rf ${WRKSRC}/gcc/ch ${WRKSRC}/libchill
|
1998-11-17 12:39:33 -05:00
|
|
|
.endif
|
1998-12-02 21:33:34 -05:00
|
|
|
cd ${WRKSRC}; \
|
|
|
|
for f in gcc/c-parse.y \
|
|
|
|
gcc/cstamp-h.in \
|
|
|
|
gcc/c-gperf.h \
|
|
|
|
gcc/c-parse.c \
|
|
|
|
gcc/c-parse.h \
|
|
|
|
gcc/cexp.c \
|
|
|
|
gcc/cp/parse.c \
|
|
|
|
gcc/cp/parse.h \
|
|
|
|
gcc/objc/objc-parse.c \
|
|
|
|
gcc/objc/objc-parse.y \
|
|
|
|
gcc/java/parse.h \
|
|
|
|
gcc/java/parse.c \
|
|
|
|
gcc/java/parse-scan.c \
|
|
|
|
libf2c/libU77/stamp-h.in \
|
|
|
|
contrib/fixinc/fixincl.x \
|
|
|
|
contrib/fixinc/inclhack.sh \
|
|
|
|
contrib/fixinc/fixincl.sh \
|
|
|
|
gcc/fixinc/fixincl.x \
|
|
|
|
gcc/fixinc/inclhack.sh \
|
|
|
|
gcc/fixinc/fixincl.sh; \
|
|
|
|
do \
|
|
|
|
[ -f $$f ] && touch $$f; \
|
|
|
|
done
|
1998-09-25 18:45:26 -04:00
|
|
|
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
####
|
|
|
|
# configure section
|
|
|
|
#
|
|
|
|
# define AS_PATH/LD_PATH is you don't want to use the default as/ld.
|
1998-11-24 19:54:02 -05:00
|
|
|
# This should not be used for regular releases, but if you're using this
|
1998-11-17 12:39:33 -05:00
|
|
|
# snapshot, you know what you're doing, don't you ?
|
1998-11-24 19:54:02 -05:00
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
|
1998-10-02 14:57:28 -04:00
|
|
|
CONFIGURE_SCRIPT=../source/configure
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-10-02 14:57:28 -04:00
|
|
|
CONFIGURE_ENV=CFLAGS=-O2
|
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} \
|
1998-11-17 12:39:33 -05:00
|
|
|
--verbose --program-transform-name=s,^,e,
|
1998-09-25 18:45:26 -04:00
|
|
|
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
.if defined(AS_PATH)
|
|
|
|
CONFIGURE_ARGS += --with-as=${AS_PATH}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS += --with-gnu-as
|
|
|
|
.endif
|
1998-11-16 16:11:13 -05:00
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
.if defined(LD_PATH)
|
|
|
|
CONFIGURE_ARGS += --with-ld=${LD_PATH}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS += --with-gnu-ld
|
1998-11-16 16:11:13 -05:00
|
|
|
.endif
|
|
|
|
|
1998-11-17 12:39:33 -05:00
|
|
|
.if (${MACHINE_ARCH} != "alpha")
|
|
|
|
CONFIGURE_ARGS+=--enable-shared
|
|
|
|
.endif
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
# rebuild configure file after patching, then move source around !!!
|
1998-09-25 18:45:26 -04:00
|
|
|
# XXX: don't try to autoconf the main configure file, it's not autoconf.
|
1998-12-02 21:33:34 -05:00
|
|
|
# DON'T invoke autoconf unless you have autoconf >= 2.12.1
|
1998-09-25 18:45:26 -04:00
|
|
|
pre-configure:
|
1998-12-02 21:33:34 -05:00
|
|
|
# cd ${WRKSRC}/gcc && autoconf
|
1998-11-17 12:39:33 -05:00
|
|
|
-${MV} ${WRKSRC} ${WRKDIR}/source
|
|
|
|
${MKDIR} ${WRKSRC}
|
|
|
|
|
|
|
|
|
|
|
|
####
|
|
|
|
# build section
|
1998-11-24 19:54:02 -05:00
|
|
|
# should work without gmake. If it turns out to be needed, this must be
|
|
|
|
# reported to the egcs folks
|
1998-11-17 12:39:33 -05:00
|
|
|
#USE_GMAKE= yes
|
|
|
|
|
|
|
|
# you shouldn't skip bootstrap unless you know what you're doing
|
1998-11-24 19:54:02 -05:00
|
|
|
# use bootstrap-lean if you're pressed for space
|
1998-11-17 12:39:33 -05:00
|
|
|
ALL_TARGET=bootstrap
|
|
|
|
# ALL_TARGET=bootstrap-lean
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
ALL_TARGET+=check
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# XXX we need to override do-build to get the warnings from within make
|
|
|
|
do-build:
|
|
|
|
@(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET} 2>warnings)
|
1998-11-17 12:39:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
####
|
|
|
|
# Install section
|
1998-09-25 18:45:26 -04:00
|
|
|
|
1998-11-24 19:54:02 -05:00
|
|
|
PLIST=${WRKDIR}/PLIST
|
|
|
|
|
1998-11-16 16:11:13 -05:00
|
|
|
M4FLAGS=-Uinclude -DDISTNAME=${DISTNAME}
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
M4FLAGS+= -DGXX
|
|
|
|
.endif
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
M4FLAGS+= -DFORTRAN
|
1998-11-16 16:11:13 -05:00
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
M4FLAGS+= -DCHILL
|
|
|
|
.endif
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(MAKE_OBJC)
|
1998-11-16 16:11:13 -05:00
|
|
|
M4FLAGS+= -DOBJC
|
|
|
|
.endif
|
1998-11-24 19:54:02 -05:00
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
M4FLAGS+= -DJAVA
|
|
|
|
.endif
|
1998-11-16 16:11:13 -05:00
|
|
|
.if (${MACHINE_ARCH}) != "alpha")
|
|
|
|
M4FLAGS+= -DDYNAMIC
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-install:
|
1998-12-02 21:33:34 -05:00
|
|
|
${M4} ${M4FLAGS} -DARCH=`${WRKDIR}/source/config.guess` \
|
1998-11-17 12:39:33 -05:00
|
|
|
-DVERSION=`${SED} -e 's/.*\(egcs-[0-9.]*\) .*/\1/' <${WRKDIR}/source/gcc/version.c` \
|
1998-11-24 19:54:02 -05:00
|
|
|
<${FILESDIR}/PLIST.template >${PLIST}
|
1998-11-16 16:11:13 -05:00
|
|
|
|
1998-09-25 18:45:26 -04:00
|
|
|
.include <bsd.port.mk>
|