aboutsummaryrefslogtreecommitdiff
path: root/lang/gforth/Makefile
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-03-23 03:05:35 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-03-23 03:05:35 +0000
commit8112d2aaa845022fc0b694f87cb0759231e3c812 (patch)
treee84a9a28e92050f73ebedcfc03d3bd2e873e14d2 /lang/gforth/Makefile
parentfb97d1d104464a9d58479dce989a48e46c1fa29e (diff)
downloadports-8112d2aaa845022fc0b694f87cb0759231e3c812.tar.gz
ports-8112d2aaa845022fc0b694f87cb0759231e3c812.zip
o Make it CFLAGS safe
o Fix info installation o Fix PLIST PR: 25841 Submitted by: MAINTAINER Spotted by: bento
Notes
Notes: svn path=/head/; revision=40241
Diffstat (limited to 'lang/gforth/Makefile')
-rw-r--r--lang/gforth/Makefile85
1 files changed, 79 insertions, 6 deletions
diff --git a/lang/gforth/Makefile b/lang/gforth/Makefile
index 0c2975ba6747..17d951238248 100644
--- a/lang/gforth/Makefile
+++ b/lang/gforth/Makefile
@@ -13,17 +13,90 @@ MASTER_SITE_SUBDIR= gforth
MAINTAINER= clefevre@poboxes.com
-CFLAGS= #none
+#
+# Global variables
+#
+
STRIP= #none
GNU_CONFIGURE= yes
+USE_GMAKE= yes
+ALL_TARGET= all info
+
+.if make(do-install)
+# DESTDIR isn't honored. fake it w/ prefix.
+MAKE_ARGS= prefix=${PREFIX}
+.endif
MAN1= gforth.1
-post-install:
- @install-info ${PREFIX}/info/gforth.info ${PREFIX}/info/dir
-.if !exists(${PREFIX}/share/emacs/site-lisp/gforth.el)
- @${INSTALL_DATA} ${WRKSRC}/gforth.el ${PREFIX}/share/emacs/site-lisp
-.endif
+#
+# 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
+
+SHARE_DIR= ${PREFIX}/share/${PORTNAME}
+
+EMPTY_FILES= siteinit.fs
+FORTH_DIR= ${SHARE_DIR}/site-forth
+
+EMPTY_DIRS= 4stack 6502 8086 avr c165 generic h8 \
+ hppa ia64 m68k misc power shboom sparc
+ARCH_DIR= ${SHARE_DIR}/${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:
+ @${PERL} -pi.fbsd -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>