summaryrefslogtreecommitdiff
path: root/lang/gcc3-c/Makefile
blob: f1eae06fad8dbebf8bc6223f5511601d19294540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $NetBSD: Makefile,v 1.23 2007/10/25 21:04:22 jlam Exp $

PKGNAME=	gcc3${GCC3_PKGMODIF}-c-${GCC_VERSION}
COMMENT=	GNU Compiler Collection, v3 - C compiler

PKG_DESTDIR_SUPPORT=	user-destdir

INFO_FILES=	yes

.include "../../lang/gcc3/Makefile.common"

# The "gcc" frontend knows all languages (by patch)
CONFIGURE_ARGS+=	--enable-languages=c

MAKE_ENV+=	ALL_GCC=${ALL_GCC:Q}
MAKE_ENV+=	ALL_GCC_C=${ALL_GCC_C:Q}
MAKE_ENV+=	ALL_GCC_CCC=${ALL_GCCXX_C:Q}

.include "../../mk/compiler.mk"

.if empty(CC_VERSION:Mgcc-*)
BUILD_TARGET=	bootstrap
.endif

post-build:
	${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk

GENERATE_PLIST+=							\
	${FIND} ${DESTDIR:Q}${GCC_PREFIX} \( -type f -o -type l \) -print \
		| ${SORT} | ${SED} -e "s,${DESTDIR}${PREFIX}/,,g";	\
	${FIND} ${DESTDIR:Q}${GCC_PREFIX} -type d -print		\
		| ${SORT} -r | ${SED} -e "s,${DESTDIR}${PREFIX}/,@dirrm ,g";

post-install:
.if ${OPSYS} == "SunOS"
	cd ${DESTDIR:Q}${GCC_ARCHDIR}/include && ${RM} -f fixed
.if exists(${DESTDIR}${GCC_ARCHDIR}/include/v7)
	${RMDIR} ${DESTDIR:Q}${GCC_ARCHDIR}/include/v7
.endif
.if exists(${DESTDIR}${GCC_ARCHDIR}/include/v9)
	${RMDIR} ${DESTDIR:Q}${GCC_ARCHDIR}/include/v9
.endif
.endif
	${INSTALL_DATA_DIR} ${DESTDIR:Q}${GCC_PREFIX}/mk
	${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${DESTDIR:Q}${GCC_PREFIX}/mk/c.mk
	${LN} -f ${DESTDIR:Q}${GCC_PREFIX}/bin/gcc ${DESTDIR:Q}${GCC_PREFIX}/bin/cc

.include "../../mk/bsd.pkg.mk"