aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gforth/Makefile
blob: a0b6da8395b46991a9395e2acaa973e7075b0d47 (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
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
90
91
92
93
94
95
# New ports collection makefile for:    gforth
# Date created:             12 October 2000
# Whom:                 Cyrille Lefevre <clefevre@citeweb.net>
#
# $FreeBSD$
#

PORTNAME=   gforth
PORTVERSION=    0.5.0
CATEGORIES= lang
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gforth

MAINTAINER= cyrille.lefevre@laposte.net

# Global variables
#

STRIP=      #none

USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
USE_GMAKE=  yes
ALL_TARGET= all info

# PREFIX isn't honored. force it w/ prefix.
MAKE_ARGS=  prefix=${PREFIX}

MAN1=       gforth.1

# Local variables
#

INSTALL_INFO?=  install-info

INFO_FILES= ${PORTNAME}.info
INFO_DIR=   ${PREFIX}/info

EMACS_FILES=    gforth.el
EMACS_DIR=  ${PREFIX}/share/emacs/site-lisp

EMPTY_FILES=    siteinit.fs
FORTH_DIR=  ${DATADIR}/site-forth

EMPTY_DIRS= 4stack 6502 8086 avr c165 generic h8 \
        hppa ia64 m68k misc power shboom sparc
ARCH_DIR=   ${DATADIR}/${PORTVERSION}/arch

# Post-extract
#

post-extract: remove-info-files

remove-info-files:
.for file in ${INFO_FILES}
    @${RM} -f ${WRKSRC}/doc/${file}*
.endfor

# Post-patch
#

post-patch: patch-makefiles

patch-makefiles:
    @${REINPLACE_CMD} -e 's|makeinfo|makeinfo --no-split|g' \
        ${WRKSRC}/Makefile.in

#
# Post-install
#

post-install: install-info install-el \
          remove-empty-files remove-empty-dirs

install-info:
.for file in ${INFO_FILES}
    @${INSTALL_INFO} ${INFO_DIR}/${file} ${INFO_DIR}/dir
.endfor

install-el:
.for file in ${EMACS_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${file} ${EMACS_DIR}/${file}
.endfor

remove-empty-files:
.for file in ${EMPTY_FILES}
    @${RM} -f ${FORTH_DIR}/${file}
.endfor

remove-empty-dirs:
.for dir in ${EMPTY_DIRS}
    @${RMDIR} ${ARCH_DIR}/${dir}
.endfor

.include <bsd.port.mk>