summaryrefslogtreecommitdiffstats
path: root/emacs-lisp/FUNCTIONS
diff options
context:
space:
mode:
Diffstat (limited to 'emacs-lisp/FUNCTIONS')
-rwxr-xr-xemacs-lisp/FUNCTIONS46
1 files changed, 27 insertions, 19 deletions
diff --git a/emacs-lisp/FUNCTIONS b/emacs-lisp/FUNCTIONS
index 6f054a8528..437521227f 100755
--- a/emacs-lisp/FUNCTIONS
+++ b/emacs-lisp/FUNCTIONS
@@ -10,38 +10,46 @@ function emacs_lisp_install() {
## Section-default build script.
#-------------------------------------------------------------------------
function default_build_emacs_lisp() {
+ [ $# = 0 ] && set -- "$SOURCE_DIRECTORY"
shopt -s nullglob
- local texi_files=("$SOURCE_DIRECTORY"/*.texi)
-
- emacs -Q -L "$SOURCE_DIRECTORY" -batch -f batch-byte-compile \
- "$SOURCE_DIRECTORY"/*.el &&
- if [ ${#texi_files[@]} -gt 0 ]
- then
- makeinfo "${texi_files[@]}" &&
- gzip -9 "$SOURCE_DIRECTORY"/*.info
- fi
+ local texi_files
+
+ while [ $# -gt 0 ]; do
+ emacs -Q -L "$1" -batch -f batch-byte-compile "$1"/*.el &&
+ texi_files=("$1"/*.texi)
+ if [ ${#texi_files[@]} -gt 0 ]
+ then
+ makeinfo "${texi_files[@]}" &&
+ gzip -9 "$1"/*.info
+ fi
+ shift
+ done
}
#-------------------------------------------------------------------------
## Section-default install script.
#-------------------------------------------------------------------------
function default_install_emacs_lisp() {
+ [ $# = 0 ] && set -- "$SOURCE_DIRECTORY"
shopt -s nullglob
local dir="$INSTALL_ROOT/usr/share/emacs/site-lisp/$SPELL"
local info_dir="$INSTALL_ROOT/usr/share/info"
- local info_files=("$SOURCE_DIRECTORY"/*.info.gz)
-
- install -d -m755 "$dir" &&
- install -m644 "$SOURCE_DIRECTORY"/*.el "$SOURCE_DIRECTORY"/*.elc "$dir" &&
-
- if [ ${#info_files[@]} -gt 0 ]
- then
- install -m644 "${info_files[@]}" "$info_dir" &&
- install-info --info-dir="$info_dir" "${info_files[@]/#*\//$info_dir/}"
- fi
+ local info_files
+
+ while [ $# -gt 0 ]; do
+ install -d -m755 "$dir" &&
+ install -m644 "$1"/*.el "$1"/*.elc "$dir" &&
+ info_files=("$1"/*.info.gz)
+ if [ ${#info_files[@]} -gt 0 ]
+ then
+ install -m644 "${info_files[@]}" "$info_dir" &&
+ install-info --info-dir="$info_dir" "${info_files[@]/#*\//$info_dir/}"
+ fi
+ shift
+ done
}
function default_build() {