@ -29,12 +29,12 @@
@@ -29,12 +29,12 @@
( setq debug-on-error t )
( defconst fg42/CORE_DIR ( concat ( getenv " HOME " ) " /.fg42/core " ) )
( add-to-list 'load-path fg42/CORE_DIR )
( setenv " FG42_HOME " ( concat ( getenv " HOME " ) " /.fg42/ " ) )
( defconst fg42/CORE_DIR ( concat ( getenv " FG42_HOME " ) " core " ) )
( setq user-emacs-directory ( concat ( getenv " FG42_HOME " ) " emacs.d " ) )
( add-to-list 'load-path fg42/CORE_DIR )
( require 'fg42/build/core )
( require 'fg42/build/utils )
@ -68,33 +68,9 @@ PARAMS:
@@ -68,33 +68,9 @@ PARAMS:
docs-actions ' ( fg42/build-prepare-docs ) )
( defun main ( )
" The entry point to the build script. "
( message ( fg42/version ) )
( message " \n FG42 Build tool v%s \n \n " ( fg42/version ) )
;; UTF-8 as default encoding
( prefer-coding-system 'utf-8 )
( set-default-coding-systems 'utf-8 )
( set-terminal-coding-system 'utf-8 )
( set-keyboard-coding-system 'utf-8 )
( let* ( ( fg42-home ( car command-line-args-left ) )
( build-dir ( from-root " /build " ) )
( parsed-args ( read-args ( cdr command-line-args-left ) ) )
( eval-string ( plist-get ( car parsed-args ) :e ) )
( command ( caadr parsed-args ) )
( args ( cdadr parsed-args ) ) )
;; Evaluate the expression provided by :e
( when eval-string
( eval ( car ( read-from-string eval-string ) ) ) )
( setq debug-mode ( plist-get ( car parsed-args ) :d ) )
( cond
( ( string= command " docs " )
( do-command
( command-> command args
( ( string= command " docs " )
( do-command
( require 'fpkg )
( fpkg/use dash )
( fpkg/use mustache )
@ -105,23 +81,23 @@ PARAMS:
@@ -105,23 +81,23 @@ PARAMS:
( 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 " ) ) )
;; TODO: create a new command to update the license headers for
;; the copyright years. Hint: just run:
;; sed 's/2010-2021/2010-2022/' -i ` grep '2010-2021' . -R --color --exclude-dir=emacs.d/|cut -d':' -f1`
( t ( print-help command ) ) ) ) )
( ( string= commad " 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 " ) ) ) )
( provide 'build )
;;; build.el ends here