summaryrefslogtreecommitdiffstats
path: root/emacs-lisp/FUNCTIONS
diff options
context:
space:
mode:
Diffstat (limited to 'emacs-lisp/FUNCTIONS')
-rwxr-xr-xemacs-lisp/FUNCTIONS44
1 files changed, 18 insertions, 26 deletions
diff --git a/emacs-lisp/FUNCTIONS b/emacs-lisp/FUNCTIONS
index 437521227f..6d51acc382 100755
--- a/emacs-lisp/FUNCTIONS
+++ b/emacs-lisp/FUNCTIONS
@@ -11,19 +11,15 @@ function emacs_lisp_install() {
#-------------------------------------------------------------------------
function default_build_emacs_lisp() {
[ $# = 0 ] && set -- "$SOURCE_DIRECTORY"
- shopt -s nullglob
- 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
+ find "$@" -maxdepth 1 -name \*.el \
+ -execdir emacs -Q -L . --batch -f batch-byte-compile {} + \
+ -execdir gzip -9 {} + \
+ -o -name \*.texi -print |
+ while read file; do
+ local t=$(mktemp -p "$SOURCE_DIRECTORY")
+ makeinfo -o - "$file" | gzip -9 > "$t" &&
+ mv "$t" "${file%.texi}.info.gz"
done
}
@@ -32,24 +28,20 @@ function default_build_emacs_lisp() {
#-------------------------------------------------------------------------
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
-
- 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
+ install -d -m755 "$dir" &&
+ find "$@" -maxdepth 1 \( -name \*.el.gz -o -name \*.elc \) \
+ -exec install -m644 -t "$dir" {} + \
+ -o -name \*.info.gz \
+ -exec install -m644 -t "$info_dir" {} \; -print0 |
+ sed -z "s@.*/@$info_dir/@" | xargs -r0 install-info --info-dir="$info_dir" &&
+ emacs -Q --batch --eval '
+ (let ((generated-autoload-file (car argv)))
+ (update-directory-autoloads (elt argv 1)))
+ ' "$dir/../loaddefs.el" "$dir"
}
function default_build() {