pkgsrc/editors/matlab-mode/Makefile
uebayasi aa8e85bcfd Rework emacs.mk:
1) Simplify the way how an emacs version is picked when no emacs
   is installed, but a user try to install an Emacs Lisp package.
   Just pick up the version set as EMACS_TYPE than searching for
   versions already installed etc.  If the EMACS_TYPE version is
   not supported by the Emacs Lisp Package, just fail.  EMACS_TYPE
   be default to GNU Emacs 21.

   (In other words, users should set EMACS_TYPE as they want.
   Otherwise GNU Emacs 21 is used.)

2) All Emacs Lisp Packages *must* prepend EMACS_PKGNAME_PREFIX to
   a) the PKGNAME itself, and b) PKGNAME in its dependency lines.
   EMACS_PKGNAME_PREFIX is expanded to "xemacs-" when XEmacs is
   used.  This keeps dependency graph of Emacs-Lisp-packages-
   installed-for-XEmacs consistent.

3) Document EMACS_* variables as much as possible.

4) Provide more cookies for PLIST.  Maybe utilized later.

Note that the 2) change doesn't affect the default, GNU Emacs 21
behaviour.  So no version / revision bumps in this commit.
2005-08-28 04:25:28 +00:00

41 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.7 2005/08/28 04:25:29 uebayasi Exp $
#
DISTNAME= matlab.el
# we do this because we want DIST_SUBDIR to not change based on
# emacs vs xemacs
BASEPKGNAME= matlab-mode-2.3.1
PKGNAME= ${EMACS_PKGNAME_PREFIX}${BASEPKGNAME}
CATEGORIES= editors math
MASTER_SITES= http://www.mathworks.com/matlabcentral/files/104/
EXTRACT_SUFX=
MAINTAINER= dmcmahill@NetBSD.org
HOMEPAGE= http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=104&objectType=file
COMMENT= Matlab mode for Emacs
WRKSRC= ${WRKDIR}
EXTRACT_CMD= ${CP} ${DOWNLOADED_DISTFILE} ${WRKDIR}
DIST_SUBDIR= ${BASEPKGNAME}
.include "../../mk/emacs.mk"
.if ${EMACS_FLAVOR} == "emacs"
EMACS= emacs
.else
EMACS= xemacs
.endif
SRCS= matlab.el
do-build:
for f in ${SRCS}; do \
${EMACS} --no-init-file --no-site-file -batch \
-f batch-byte-compile ${WRKSRC}/$$f; \
done
do-install:
${INSTALL_DATA_DIR} ${EMACS_LISPPREFIX}/${PKGBASE:C|^xemacs-||}
cd ${WRKSRC} && ${INSTALL_DATA} ${SRCS} ${SRCS:.el=.elc} ${EMACS_LISPPREFIX}/${PKGBASE}
.include "../../mk/bsd.pkg.mk"