summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-03-04 07:17:27 +0000
committerUlrich Müller <ulm@gentoo.org>2008-03-04 07:17:27 +0000
commitde5cecade98912f5e544adee1261e4e2230fd017 (patch)
tree5de710770cd38bc297d037b4a6708a1f6ca075fc
parentUpdate copyright year. (diff)
downloademacs-de5cecade98912f5e544adee1261e4e2230fd017.tar.gz
emacs-de5cecade98912f5e544adee1261e4e2230fd017.tar.bz2
emacs-de5cecade98912f5e544adee1261e4e2230fd017.zip
Clean up temporary files.
svn path=/emacs-extra/; revision=1011
-rw-r--r--eclass/ChangeLog3
-rw-r--r--eclass/elisp-common.eclass16
2 files changed, 14 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 6ec5643..577b958 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,5 +1,8 @@
2008-03-03 Ulrich Mueller <ulm@gentoo.org>
+ * elisp-common.eclass (elisp-site-file-install)
+ (elisp-site-regen, elisp-emacs-version): Clean up temporary files.
+
* elisp.eclass (EXPORT_FUNCTIONS): Call only once, according to
section 7.3 of the PMS draft.
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 9717e66..002e324 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -203,6 +203,7 @@ elisp-emacs-version() {
# The following will work for at least versions 18--23.
echo "(princ emacs-version)" >"${T}"/emacs-version.el
${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el
+ rm -f "${T}"/emacs-version.el
}
# @FUNCTION: elisp-make-autoload-file
@@ -262,16 +263,18 @@ elisp-install() {
# Install Emacs site-init file in SITELISP directory.
elisp-site-file-install() {
- local sf="${1##*/}" my_pn="${2:-${PN}}"
+ local sf="${T}/${1##*/}" my_pn="${2:-${PN}}" ret
ebegin "Installing site initialisation file for GNU Emacs"
- cp "$1" "${T}/${sf}"
+ cp "$1" "${sf}"
sed -i -e "s:@SITELISP@:${SITELISP}/${my_pn}:g" \
- -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${T}/${sf}"
+ -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${sf}"
( # subshell to avoid pollution of calling environment
insinto "${SITELISP}/site-gentoo.d"
- doins "${T}/${sf}"
+ doins "${sf}"
)
- eend $? "doins failed"
+ ret=$?
+ rm -f "${sf}"
+ eend ${ret} "doins failed"
}
# @FUNCTION: elisp-site-regen
@@ -404,4 +407,7 @@ EOF
[ "${sf%/*}" = "${ROOT}${SITELISP}/site-gentoo.d" ] \
&& cat "${sf}" >>"${ROOT}${SITELISP}"/00site-gentoo.el
done
+
+ # cleanup
+ rm -f "${T}"/site-{gentoo,start}.el
}