From bc72fe47a46e310c59da1f6efcbe5873a54f728a Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 27 Jul 2021 16:37:18 +0100 Subject: [PATCH] Add a build target to compile the 'core' package --- build.el | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build.el b/build.el index ed94a55..ed1b909 100755 --- a/build.el +++ b/build.el @@ -1,4 +1,4 @@ -:;exec emacs --no-site-file --no-site-lisp --batch -L ./ -l "$0" -f main "$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)" "$@" +:;exec `echo $EMACS` --no-site-file --no-site-lisp --batch -L ./ -l "$0" -f main "$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)" "$@" ;;; Buid --- The builder for FG42 -*- lexical-binding: t; -*- ;; ;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors @@ -29,8 +29,10 @@ (setq debug-on-error t) +(defconst fg42/CORE_DIR (concat (getenv "HOME") "/.fg42/core")) + (setq user-emacs-directory (concat (getenv "HOME") "/.fg42/emacs.d")) -(add-to-list 'load-path (concat (getenv "HOME") "/.fg42/core")) +(add-to-list 'load-path fg42/CORE_DIR) (require 'fg42/build/core) @@ -98,6 +100,20 @@ PARAMS: (do-command (require 'fg42/build/docs) (fg42/build-docs build-dir))) + + ((string= command "compile") + (do-command + (native-compile-async fg42/CORE_DIR 'recursively) + (native-compile-async "~/.fg42.v3.el") + + (print "Compiling FG42 files ...") + (while (or comp-files-queue + (> (comp-async-runnings) 0)) + (print ".") + (sleep-for 1)) + + (message "Done"))) + (t (print-help command))))) (provide 'build)