diff options
author | uebayasi <uebayasi> | 2002-09-16 12:51:34 +0000 |
---|---|---|
committer | uebayasi <uebayasi> | 2002-09-16 12:51:34 +0000 |
commit | 4c8beb025f74833fd0f7903a71e1027b41d0a11d (patch) | |
tree | b48f4f85b21b9cd4d19ef776a3f3e3337a83b555 | |
parent | fa61f29426f8d3caad9801e7735edc049f165f3a (diff) | |
download | pkgsrc-4c8beb025f74833fd0f7903a71e1027b41d0a11d.tar.gz |
* Assume each Emacs lisp package supports only (GNU) Emacs 20/21 by default.
* Slightly modify the way to prefix "xemacs-" to a package compiled for XEmacs.
* Suppress warnings issued when Emacs/XEmacs are not installed.
-rw-r--r-- | mk/emacs.mk | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/mk/emacs.mk b/mk/emacs.mk index 61f0f5ee91e..e9a97a06e88 100644 --- a/mk/emacs.mk +++ b/mk/emacs.mk @@ -1,4 +1,4 @@ -# $NetBSD: emacs.mk,v 1.2 2002/09/14 02:19:29 uebayasi Exp $ +# $NetBSD: emacs.mk,v 1.3 2002/09/16 12:51:34 uebayasi Exp $ # # A Makefile fragment for Emacs Lisp packages. # @@ -10,7 +10,13 @@ # XEmacs # ->${PREFIX}/lib/xemacs/site-packages/lisp/foo/... # -# * XEmacs package's names are prefix'ed by "xemacs-" +# * XEmacs package's names are prefix'ed by "xemacs-", since Emacs +# {20,21} conflict, and XEmacs conflict. +# +# * Assume each package supports GNU Emacs {20,21} by default. If the +# package supports XEmacsen too, define EMACS_VERSIONS_ACCEPTED +# explicitly before including mk/emacs.mk. Note that the order is +# important. # .if !defined(EMACS_MK) @@ -18,7 +24,7 @@ EMACS_MK= # defined .include "../../mk/bsd.prefs.mk" -# XXX For now, assume only GNU emacsen are supported by default. +# Assume only GNU emacsen are supported by default. # EMACS_VERSION_DEFAULT?= emacs21 .if !defined(USE_XEMACS) @@ -43,7 +49,12 @@ _EMACS_VERSION_${v}_OK= yes # Look for Emacs 21/Emacs 20 # -_TMP!= ${PKG_TOOLS_BIN}/pkg_info -I emacs 2>/dev/null | ${AWK} '{print $$1}' +_TMP!= if ${PKG_TOOLS_BIN}/pkg_info -e emacs >/dev/null 2>&1; then \ + ${PKG_TOOLS_BIN}/pkg_info -I emacs 2>/dev/null | \ + ${AWK} '{print $$1}'; \ + else \ + ${ECHO}; \ + fi .if ${_TMP} != "" _EMACS_VERSION_EMACS_FULL:= ${_TMP} _EMACS_VERSION_EMACS= ${_EMACS_VERSION_EMACS_FULL:C/^.*-//} @@ -57,7 +68,12 @@ _EMACS_VERSION_emacs20_INSTALLED= yes # Look for XEmacs 21.5/XEmacs 21.1 # -_TMP!= ${PKG_TOOLS_BIN}/pkg_info -I xemacs 2>/dev/null | ${AWK} '{print $$1}' +_TMP!= if ${PKG_TOOLS_BIN}/pkg_info -e xemacs >/dev/null 2>&1; then \ + ${PKG_TOOLS_BIN}/pkg_info -I xemacs 2>/dev/null | \ + ${AWK} '{print $$1}'; \ + else \ + ${ECHO}; \ + fi .if ${_TMP} != "" _EMACS_VERSION_XEMACS_FULL:= ${_TMP:C/^.*-//} _EMACS_VERSION_XEMACS= ${_EMACS_VERSION_XEMACS_FULL:C/^.*-//} @@ -122,11 +138,9 @@ DEPENDS+= ${BUILDLINK_DEPENDS.leim20}:../../editors/leim20 .endif .elif ${_EMACS_VERSION} == "xemacs215" EMACS_DEPENDENCY= ${BUILDLINK_DEPENDS.xemacs215}:../../editors/xemacs-current -PKGNAME= xemacs-${DISTNAME} FOR.xemacs215= "" .elif ${_EMACS_VERSION} == "xemacs211" EMACS_DEPENDENCY= ${BUILDLINK_DEPENDS.xemacs211}:../../editors/xemacs -PKGNAME= xemacs-${DISTNAME} FOR.xemacs211= "" .else IGNORE+= "Accepted versions are: ${EMACS_VERSIONS_ACCEPTED}" @@ -142,11 +156,14 @@ DEPENDS+= ${EMACS_DEPENDENCY} # EMACS_FLAVOR= ${_EMACS_VERSION:C|[0-9]*$||} .if ${EMACS_FLAVOR} == "emacs" +EMACS_BIN= ${PREFIX}/bin/emacs EMACS_VERSION= ${_EMACS_VERSION_EMACS_FULL:C|^.*-||} EMACS_LISPPREFIX= ${PREFIX}/share/emacs/site-lisp .else +EMACS_BIN= ${PREFIX}/bin/xemacs EMACS_VERSION= ${_EMACS_VERSION_XEMACS_FULL:C|^.*-||} EMACS_LISPPREFIX= ${PREFIX}/lib/xemacs/site-packages/lisp +PKGNAME= xemacs-${DISTNAME} .endif PLIST_SUBST+= EMACS_VERSION=${EMACS_VERSION} PLIST_SUBST+= EMACS_LISPPREFIX=${EMACS_LISPPREFIX:C|^${PREFIX}/||} |