GNU bug report logs - #11806
(setq load-path ..) of elisp-comp

Previous Next

Package: automake;

Reported by: Makoto Fujiwara <makoto <at> ki.nu>

Date: Thu, 28 Jun 2012 04:52:01 UTC

Severity: normal

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #22 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Jack Kelly <jack <at> jackkelly.name>
Cc: "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	Makoto Fujiwara <makoto <at> ki.nu>, 11806 <at> debbugs.gnu.org
Subject: Re: bug#11806: (setq load-path ..) of elisp-comp
Date: Thu, 05 Jul 2012 19:56:02 +0200
[Message part 1 (text/plain, inline)]
tags 11806  + patch
thanks

On 07/01/2012 01:03 AM, Jack Kelly wrote:
> On Sat, Jun 30, 2012 at 11:19 AM, Makoto Fujiwara <makoto <at> ki.nu> wrote:
>> With your advice for VPATH issue, I am now using attached patch,
>> thanks a lot,
>> --- lib/elisp-comp.orig 2012-01-31 20:41:18.000000000 +0900
>> +++ lib/elisp-comp      2012-04-13 22:14:39.000000000 +0900
>> @@ -62,6 +62,7 @@
>>  fi
>>
>>  tempdir=elc.$$
>> +currdir=`pwd`
>>
>>  # Cleanup the temporary directory on exit.
>>  trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
>> @@ -72,7 +73,7 @@
>>
>>  (
>>    cd $tempdir
>> -  echo "(setq load-path (cons nil load-path))" > script
>> +  echo "(setq load-path (cons \"$currdir\" (cons nil load-path)))" > script
>>    $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
>>    mv *.elc ..
>>  ) || exit $?
> 
> Hi,
> 
> Unfortunately your patch doesn't quite work, because in a VPATH build
> the build dir is not the sourcedir, so when you set $currdir, you are
> setting the wrong path.
> 
> I'm not sure of the best way to fix this. The rules for calling
> elisp-comp could be updated so that $(abs_srcdir) is passed along:
> 
>         abs_srcdir="$(abs_srcdir)" EMACS="$(EMACS)" $(SHELL)
> $(elisp_comp) "$$@" || exit 1; \
> 
> , which is then added to load-path. elisp-comp would still need a
> patch, but that's ok.
> 
> As to providing test cases, something like this should work:
> 
> configure.ac:
> 
> AC_INIT([foo], [bar], [baz <at> quux.net])
> AM_INIT_AUTOMAKE([foreign])
> AM_PATH_LISPDIR
> AC_CONFIG_FILES([Makefile])
> AC_OUTPUT
> 
> Makefile.am:
> 
> lisp_LISP = foo.el
> lisp_DATA = bar.el
> 
> foo.el:
> 
> (require 'bar)
> 
> bar.el:
> 
> (provide 'bar)
> 
> Once elisp-comp (and whatever else) is fixed, this setup should
> survive a ./configure && make in both a normal and VPATH build.
>
Thanks.  I've condensed a patch from you explanation (see attachment).
I will push it shortly if there are no objections.

> (Aside: my copyright paperwork should still be in order. Email me
> off-list if it is not.)
>
I don't have an account on fencepost, so I can't check this, sorry.
Since your part of the changes are short enough to be classified as
"tiny change", I've just added a 'Copyright-paperwork-exempt' field
to the patch to get the easiest way out.

> -- Jack

Thanks,
  Stefano
[0001-lisp-better-support-of-VPATH-builds.patch (text/x-diff, attachment)]

This bug report was last modified 13 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.