Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: "Hans de Graaff (graaff)" <graaff@g.o>
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: xemacs-elisp-common.eclass xemacs-elisp.eclass
Date: Sat, 15 Sep 2007 09:11:58
Message-Id: 20070915085952.GG14418@supernova
1 Just a couple comments on this ...
2
3 On 07:19 Sat 15 Sep , Hans de Graaff (graaff) wrote:
4 > SITEPACKAGE=/usr/lib/xemacs/site-packages
5
6 Is using get_libdir() a concern here?
7
8 > xemacs-elisp-compile () {
9 > ${XEMACS_BATCH_CLEAN} -f batch-byte-compile "$@"
10 > xemacs-elisp-make-autoload-file "$@"
11 > }
12
13 > xemacs-elisp-install () {
14 > local subdir="$1"
15 > shift
16 > ( # use sub-shell to avoid possible environment polution
17 > dodir "${SITEPACKAGE}"/lisp/"${subdir}"
18 > insinto "${SITEPACKAGE}"/lisp/"${subdir}"
19 > doins "$@"
20 > ) || die "Installing lisp files failed"
21 > }
22
23 The lack of parallels between these two functions bothers me. One dies
24 and the other doesn't, which makes later code using them look wrong. It would be neater to die in both of these functions.
25
26 Also, try using { } around a block of code instead of ( ), which creates
27 a subshell.
28
29 > xemacs-elisp_src_compile() {
30 > xemacs-elisp-compile *.el || die "Compilation of lisp files failed"
31 > }
32 >
33 > xemacs-elisp_src_install () {
34 > xemacs-elisp-install "${PN}" *.el *.elc
35 > }
36
37 Here's the funny-looking bit.
38
39 Thanks,
40 Donnie
41 --
42 gentoo-dev@g.o mailing list

Replies