summaryrefslogtreecommitdiff
path: root/lang/smalleiffel/Makefile
blob: 300ef777ed63e688555473f291e4bf1142497b7d (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# $NetBSD: Makefile,v 1.5 2000/01/09 01:19:11 wiz Exp $
#

DISTNAME=	se
PKGNAME=	smalleiffel-0.78
WRKSRC=		${WRKDIR}/SmallEiffel
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.loria.fr/pub/loria/genielog/SmallEiffel/ \
		ftp://ftp.cs.rit.edu/pub/mirrors/SmallEiffel/ \
		ftp://ftp.progsoc.uts.edu.au/pub/Eiffel/SmallEiffel/ \
		ftp://gd.tuwien.ac.at/pub/languages/SmallEiffel/
EXTRACT_SUFX=	.tgz

MAINTAINER=	jlam@netbsd.org
HOMEPAGE=	http://smalleiffel.loria.fr/

DOCDIR=		${PREFIX}/share/doc/smalleiffel
EGDIR=		${PREFIX}/share/examples/smalleiffel
LIBDIR=		${PREFIX}/share/smalleiffel
LIBEXECDIR=	${PREFIX}/libexec/smalleiffel

BINNAME=	smalleiffel
SE_BINARIES=	clean compile compile_to_c compile_to_jvm \
		finder pretty print_jvm_class short

post-extract:
	${FIND} ${WRKSRC} -type f -print | xargs ${CHMOD} 644
	${FIND} ${WRKSRC} -name ".gdb*" -print | xargs ${RM} -f
	cd ${WRKSRC}/man; ${RM} -f *.txt
	cd ${WRKSRC}/sys; ${RM} -f compiler.se gc loadpath.* system.se
	cd ${FILESDIR}; \
		${CP} -f compiler.se gc system.se ${WRKSRC}/sys
	${SED} -e "s,@@SE_LIB@@,${LIBDIR},g" \
		${FILESDIR}/loadpath.UNIX.in > ${WRKSRC}/sys/loadpath.UNIX

do-build:
	@${ECHO} '*** Building Eiffel compiler system (pass 1) ***'
	@cd ${WRKSRC}/bin_c; \
	for file in ${SE_BINARIES}; do \
		${ECHO} Building $$file...; \
		${SH} $$file.make; \
		${CP} -f ${WRKSRC}/bin_c/$$file ${WRKSRC}/bin/$$file; \
	done; \
	${RM} -f *

	@${ECHO} '*** Building Eiffel compiler system (pass 2) ***'
	@cd ${WRKSRC}/bin_c; \
	(${ECHO} ${WRKSRC}/lib_std/; \
	 ${ECHO} ${WRKSRC}/lib_rand/; \
	 ${ECHO} ${WRKSRC}/lib_se/) > loadpath.se; \
	for file in ${SE_BINARIES}; do \
		${ECHO} Building $$file...; \
		SmallEiffel=${WRKSRC}/sys/system.se ${WRKSRC}/bin/compile \
			-boost -no_gc -no_split -O2 -o $$file $$file; \
	done

post-build:
	${SED}	-e "s,@@SE_LIB@@,${LIBDIR},g" \
		-e "s,@@SE_LIBEXEC@@,${LIBEXECDIR},g" \
		${FILESDIR}/${BINNAME}.sh > ${WRKDIR}/${BINNAME}.sh

pre-install:
	${FIND} ${WRKSRC} -name "*.orig" -print | xargs ${RM} -f

do-install:
	${INSTALL_SCRIPT} ${WRKDIR}/${BINNAME}.sh ${PREFIX}/bin/${BINNAME}
	${INSTALL_PROGRAM_DIR} ${LIBEXECDIR}
	for file in ${SE_BINARIES}; do \
		${INSTALL_PROGRAM} ${WRKSRC}/bin_c/$$file ${LIBEXECDIR}; \
	done
	${INSTALL_DATA_DIR} ${LIBDIR}
	cd ${WRKSRC}; \
	for dir in lib_rand lib_se lib_std short sys; do \
		${PAX} -rw $$dir ${LIBDIR}; \
	done
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${LIBDIR}
	${INSTALL_DATA_DIR} ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/misc/NOT_YET_IMPLEMENTED.txt ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/misc/WeNeedFeedBack.txt ${DOCDIR}
	cd ${WRKSRC}/man; ${INSTALL_DATA} *.html *.gif *.FAQ ${DOCDIR}
	${INSTALL_DATA_DIR} ${EGDIR}
	cd ${WRKSRC}; \
	for dir in contrib lib_show; do \
		${PAX} -rw $$dir ${EGDIR}; \
	done
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EGDIR}

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