summaryrefslogtreecommitdiffstats
path: root/emacs-lisp/FUNCTIONS
diff options
context:
space:
mode:
Diffstat (limited to 'emacs-lisp/FUNCTIONS')
-rwxr-xr-xemacs-lisp/FUNCTIONS42
1 files changed, 21 insertions, 21 deletions
diff --git a/emacs-lisp/FUNCTIONS b/emacs-lisp/FUNCTIONS
index 6f054a8528..6d51acc382 100755
--- a/emacs-lisp/FUNCTIONS
+++ b/emacs-lisp/FUNCTIONS
@@ -10,38 +10,38 @@ function emacs_lisp_install() {
## Section-default build script.
#-------------------------------------------------------------------------
function default_build_emacs_lisp() {
- 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
+ [ $# = 0 ] && set -- "$SOURCE_DIRECTORY"
+
+ 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
}
#-------------------------------------------------------------------------
## Section-default install script.
#-------------------------------------------------------------------------
function default_install_emacs_lisp() {
- shopt -s nullglob
+ [ $# = 0 ] && set -- "$SOURCE_DIRECTORY"
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
+ 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() {