summaryrefslogtreecommitdiff
path: root/lang/lcc/Makefile
blob: 2f9bd02f83ad45a2023a1e68d10ae78be8185e91 (plain) (blame)
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
# ex:ts=8
# Ports collection makefile for:  lcc
# Version required:	3.6
# Date created:		Sat Dec 7, 1996
# Whom:			David O'Brien (obrien@cs.ucdavis.edu)
#
# $FreeBSD$
#

DISTNAME=	lcc-3.6
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.cs.princeton.edu/pub/packages/lcc/

MAINTAINER=     obrien@FreeBSD.org
#origial [and extensive] patches by Soren Schmidt  / sos@freebsd.org

MAKEFILE=	makefile
MAKE_FLAGS=	BUILDDIR=${LCCBUILDDIR} HOSTFILE=etc/${OPSYS}.c -f
MAN1=		bprint.1 lcc.1

UNAME_M!=	uname -m
LCCBUILDDIR=	${WRKDIR}/${UNAME_M}-${OPSYS}
LCCDESTDIR=	lib/${DISTNAME}/${UNAME_M}-${OPSYS}

pre-configure:
	@${MKDIR} ${LCCBUILDDIR}
	@${CP} ${FILESDIR}/${OPSYS}.md ${WRKSRC}/src
	@sed -e "s:%%PREFIX%%:${PREFIX}:g"  \
	     -e "s:%%LCCDESTDIR%%:${LCCDESTDIR}:g"  \
	     -e "s:%%VERSION%%:${DISTNAME}:g"  \
		${FILESDIR}/${OPSYS}.c.in > ${WRKSRC}/etc/${OPSYS}.c
	@#	below can be used to patchup PLIST file for diff os/arch
	@#sed -e "s:%%LCCDESTDIR%%:${LCCDESTDIR}:g"  \
		#${PKGDIR}/PLIST.in > ${PKGDIR}/PLIST
	@sed -e "s:%%OPSYS%%:${OPSYS}:g"  \
		${WRKSRC}/makefile > ${WRKSRC}/makefile.configured
	@/bin/mv -f ${WRKSRC}/makefile.configured ${WRKSRC}/makefile

do-install:
	@(umask 022 ; ${MKDIR} ${PREFIX}/${LCCDESTDIR})
	@${INSTALL_PROGRAM} ${LCCBUILDDIR}/lcc \
		${LCCBUILDDIR}/rcc \
		${LCCBUILDDIR}/cpp \
		${LCCBUILDDIR}/bprint \
		${LCCBUILDDIR}/bbexit.o \
		${PREFIX}/${LCCDESTDIR}
	@/bin/ln -sf ${PREFIX}/${LCCDESTDIR}/lcc ${PREFIX}/bin
	@/bin/ln -sf ${PREFIX}/${LCCDESTDIR}/bprint ${PREFIX}/bin
	@${INSTALL_MAN} ${WRKSRC}/doc/lcc.1 ${WRKSRC}/doc/bprint.1 \
		${PREFIX}/man/man1


.include <bsd.port.mk>