[patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Georg Baum
lib/configure.py cannot be run if you compile with a fresh builddir != 
srcdir. The reason is that the main configure script creates builddir/lib 
only after trying to run lib/configure.py.
The attached patch fixes that. Does anybody know a better solution? If not 
I am going to put this in.


Georg
Index: configure.ac
===
--- configure.ac	(Revision 13415)
+++ configure.ac	(Arbeitskopie)
@@ -474,7 +474,7 @@ AC_CONFIG_FILES([Makefile  m4/Makefile \
src/frontends/qt4/ui/Makefile \
 ])
 echo "Running $LYX_ABS_TOP_SRCDIR/lib/configure.py --with-version-suffix=\"$version_suffix\""
-(cd lib && python $LYX_ABS_TOP_SRCDIR/lib/configure.py --with-version-suffix="$version_suffix")
+(test -d lib || mkdir lib && cd lib && python $LYX_ABS_TOP_SRCDIR/lib/configure.py --with-version-suffix="$version_suffix")
 
 AC_OUTPUT
 # show version information


Re: [patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Angus Leeming
Georg Baum <[EMAIL PROTECTED]> writes:

> 
> lib/configure.py cannot be run if you compile with a fresh builddir != 
> srcdir. The reason is that the main configure script creates builddir/lib 
> only after trying to run lib/configure.py.
> The attached patch fixes that. Does anybody know a better solution? If not 
> I am going to put this in.

Just a second... What does
foo || bar && baz
mean? Does it mean:
1)
* Run "foo".
* If "foo" fails, run "bar".
* If "foo" succeeds, run "baz".
Or does it mean:
2)
* Run "foo".
* If "foo" fails, run "bar".
* If "bar" succeeds, run "baz".

My understanding is that 1) is how the shell will interpret things.
My understanding of your patch is that you think 2) is the way things work...

Change:
test -d lib || mkdir lib && cd lib && pthon ...
to:
test -d lib || mkdir lib; cd lib && pthon ...

Angus




Re: [patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Georg Baum
Am Samstag, 18. März 2006 16:11 schrieb Angus Leeming:
> Georg Baum <[EMAIL PROTECTED]> writes:

> Just a second... What does
> foo || bar && baz
> mean? Does it mean:
> 1)
> * Run "foo".
> * If "foo" fails, run "bar".
> * If "foo" succeeds, run "baz".
> Or does it mean:
> 2)
> * Run "foo".
> * If "foo" fails, run "bar".
> * If "bar" succeeds, run "baz".
> 
> My understanding is that 1) is how the shell will interpret things.
> My understanding of your patch is that you think 2) is the way things 
work...

I believe that it is like this:
3)
* Run "foo".
* If "foo" fails, run "bar" and "baz".
* If "foo" succeeds, run "baz".

(left to right evaluation, no precedence of && over || and vice versa)
My shell (bash, version 2.05b) agrees with me here.

> Change:
> test -d lib || mkdir lib && cd lib && pthon ...
> to:
> test -d lib || mkdir lib; cd lib && pthon ...

I will do the change nevertheless, since I don't know how other shells 
will interpret it.


Georg



Re: [patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> lib/configure.py cannot be run if you compile with a fresh
Georg> builddir != srcdir. The reason is that the main configure
Georg> script creates builddir/lib only after trying to run
Georg> lib/configure.py. The attached patch fixes that. Does anybody
Georg> know a better solution? If not I am going to put this in.

Put it in. The better solution will be to run configure.py in userdir
only.

JMarc


Re: [patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Georg Baum
Am Samstag, 18. März 2006 17:01 schrieb Jean-Marc Lasgouttes:

> Put it in.

Done.

> The better solution will be to run configure.py in userdir 
> only.

That would also mean that LaTeXConfig.lyx would need to be created from a 
Makefile.


Georg



Re: [patch] fix lib/configure.py invocation for builddir != srcdir

2006-03-18 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> That would also mean that LaTeXConfig.lyx would need to be
Georg> created from a Makefile.

No, it will only be created in the user directory. We should not
create anything in the system directory.

JMarc