On Sat, 26 Sep 2015 01:02:08 +0200, Mats Lidell wrote:
I guess it is technically possible to do what you are attempting but
that is more or less constructing a new build system for the packages
isn't it?
I hope not. ;)
What I have now, and what appears to work for me, is the following
elisp snippet
(defun add-subdirs-to-load-path (basedir)
"Add all first level dirs below basedir to load-path."
(dolist (f (directory-files basedir))
(let ((name (concat basedir "/" f)))
(when (and (file-directory-p name)
(not (member f '("." "..")))
(add-to-list 'load-path name))))
(add-to-list 'load-path basedir)))
(defun compile-el-file (basedir el-file)
"With a given base path, set up load-path, and byte compile an elisp
source file."
(add-subdirs-to-load-path basedir)
(byte-compile-file el-file))
which the 'editors/semacs-package' Makefile then uses as follows
pre-configure:
[...]
@${ECHO_MSG} "Re-compiling patched elisp files ... "
for ff in `cat ${PATCHDIR}/*.el | awk '/^\\+\\+\\+/ { print $$2
}'` ; do \
${RM} -f ${WRKSRC}/$${ff}.orig ; \
cd ${WRKSRC} && xemacs --vanilla --batch \
--eval "(load-file
\"${PKGDIR}/files/compile-el-file.el\")" \
--eval "(compile-el-file \"${WRKSRC}/lisp\" \
\"${WRKSRC}/$${ff}\")" ; \
done
@${ECHO_MSG} "done"
Cheerio,
hauke
--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-3281
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta