summaryrefslogtreecommitdiff
path: root/lang/camlp4/Makefile
blob: f2bcf59a6b8035520f5b14bdf8245096f3519052 (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
# $NetBSD: Makefile,v 1.5 2001/12/19 21:52:49 agc Exp $
#

DISTNAME=	camlp4-3.01.6
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/

MAINTAINER=	wulf@netbsd.org
HOMEPAGE=	http://caml.inria.fr/camlp4/
COMMENT=	Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml

DEPENDS+=	ocaml-3.01:../ocaml

USE_GMAKE=	yes

ALL_TARGET=	world
PLIST_SRC=      ${WRKDIR}/PLIST

do-configure:
		${SED} -e 's|\$${PREFIX}|${PREFIX}|g' < ${FILESDIR}/config-answers | (cd ${WRKSRC} && ./configure)

pre-build:
		if ! ${TEST} -x ${LOCALBASE}/bin/ocamlc.opt; then \
			${ECHO} "No optimized ocaml binaries found"; \
			cd ${WRKSRC}/config; \
			${MV} Makefile Makefile.orig; \
			${SED} -e "s/\.opt//g" Makefile.orig > Makefile; \
		fi

pre-install:
		if ${TEST} -x ${LOCALBASE}/bin/ocamlopt; then \
			cd ${WRKSRC}; \
			${GMAKE} opt; \
			${CAT} ${PKGDIR}/PLIST.opt > ${PLIST_SRC}; \
			${CAT} ${PKGDIR}/PLIST >> ${PLIST_SRC}; \
		else \
			${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC}; \
		fi

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