The following patches improve the situation of windows packaging.
I see you committed it. I'll test it out.
Run 1. Explicit specification of the prefix as I'm guessing that you concentrated on getting the implicit prefix to work first.
$ ../configure --prefix='J:/Program Files/LyX' \
--enable-maintainer-mode --with-included-gettext \
--with-frontend=qt --with-qt-dir=/home/angus/qt3
...
configure: running /bin/sh '../../../lib/reLyX/configure' --prefix=J:/Program Files/LyX '--prefix=J:/Program Files/LyX' '--enable-maintainer-mode' '--with-included-gettext' '--with-frontend=qt' '--with-qt-dir=/home/angus/qt3' --cache-file=/dev/null --srcdir=../../../lib/reLyX
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: Files/LyX
checking whether to enable maintainer-specific portions of Makefiles... yes
Ie, the prefix is repeated, one unquoted, second quoted.
$ touch ../src/support/package.C ../src/main.C
$ make
...
make[3]: Entering directory `/home/Angus/lyx-13x/build-qt/src/support'
g++ -DHAVE_CONFIG_H -I. -I../../../src/support -I../../src -I../../../src/support/.. -I../../../boost -g -O -W -Wall -mms-bitfields \
-DLYX_DIR=\"J:/Program Files/LyX/Resources/lyx\" \
-DTOP_SRCDIR=\"../../..\" \
-DLOCALEDIR=\"J:/Program Files/LyX/Resources/locale\" \
-c ../../../src/support/package.C && \
echo "timestamp" > package.lo
../../../src/support/package.C: In function `const std::string lyx::<unnamed>::get_locale_dir(const std::string&)':
../../../src/support/package.C:285: error: missing terminating " character
../../../src/support/package.C:285: error: expected primary-expression before ';' token
../../../src/support/package.C: In function `const std::string lyx::<unnamed>::get_system_support_dir(const std::string&, const std::string&)':
../../../src/support/package.C:488: error: missing terminating " character
../../../src/support/package.C:488: error: expected primary-expression before ';' token
g++.exe: Files/LyX/Resources/lyx": No such file or directory
g++.exe: Files/LyX/Resources/locale": No such file or directory
Perhaps src/support/Makefile.am should overquote these paths...
Ok, that works.
make[3]: Entering directory `/home/Angus/lyx-13x/build-qt/src/support'
g++ -DHAVE_CONFIG_H -I. -I../../../src/support -I../../src -I../../../src/support/.. -I../../../boost -g -O -W -Wall -mms-bitfields \
-DLYX_DIR=\"'J:/Program Files/LyX/Resources/lyx'\" \
-DTOP_SRCDIR=\"'../../..'\" \
-DLOCALEDIR=\"'J:/Program Files/LyX/Resources/locale'\" \
-c ../../../src/support/package.C && \
echo "timestamp" > package.lo
Run 2. Implicit specification of the prefix. $ ../configure --enable-maintainer-mode --with-included-gettext \ --with-frontend=qt --with-qt-dir=/home/angus/qt3
Note that this is with my overquoted Makefile.ams.
...
configure: configuring in lib/reLyX
configure: running /bin/sh '../../../lib/reLyX/configure' --prefix='C:/Program Files/LyX' '--enable-maintainer-mode' '--with-included-gettext' '--with-frontend=qt' '--with-qt-dir=/home/angus/qt3' --cache-file=/dev/null --srcdir=../../../lib/reLyX
checking whether to enable maintainer-specific portions of Makefiles... yes
Packaging: windows LyX binary dir: C:/Program Files/LyX/bin LyX files dir: C:/Program Files/LyX/Resources/lyx
$ touch ../src/support/package.C ../src/main.C $ make
Achhh, that's no good:
g++ -DHAVE_CONFIG_H -I. -I../../../src/support -I../../src -I../../../src/support/.. -I../../../boost -g -O -W -Wall -mms-bitfields \
-DLYX_DIR=\"''C:/Program Files/LyX'/Resources/lyx'\" \
-DTOP_SRCDIR=\"'../../..'\" \
-DLOCALEDIR=\"''C:/Program Files/LyX'/Resources/locale'\" \
-c ../../../src/support/package.C && \
echo "timestamp" > package.lo
make: *** [all-recursive] Interrupt
../../../src/support/package.C: In function `const std::string lyx::<unnamed>::get_locale_dir(const std::string&)':
../../../src/support/package.C:285: error: missing terminating " character
../../../src/support/package.C:285: error: expected primary-expression before ';' token
../../../src/support/package.C: In function `const std::string lyx::<unnamed>::get_system_support_dir(const std::string&, const std::string&)':
../../../src/support/package.C:488: error: missing terminating " character
../../../src/support/package.C:488: error: expected primary-expression before ';' token
Ie, the overquoting that is needed in src/support/Makefile.am in the case of an explicitly specified prefix is killing in the case of an implicit prefix.
Still, it looks to me that a bit of sed in the Makefile.am will do the trick. Having said that, maybe the fault also lies with your
prefix="'${prefix}'"
that I think I spotted somewhere. I guess that we should be boxing a little bit more cleverly. Maybe:
prefix=`echo ${prefix} | sed "s/^[^'].*[^']$/'&'/"`
Testing: $ echo "foo" | sed "s/^[^'].*[^']$/'&'/" 'foo'
$ echo "'foo'" | sed "s/^[^'].*[^']$/'&'/" 'foo'
I haven't figured out how to run sed within Makefile.am.
Anyway, the real test is what happens at install-time and since this thing takes 24 minutes to link...
Let's go back to the first use run and try and install it in
J:\Program Files\LyX. Using my overquoted versions of src/support/Makefile.am and src/Makefile.am
$ ../configure --prefix='J:/Program Files/LyX' \ --enable-maintainer-mode --with-included-gettext \ --with-frontend=qt --with-qt-dir=/home/angus/qt3 $ make
Go make a cup of tea, have a biscuit, read the paper, walk the dog, feed the baby, go out to dinner, come back, make another cup of tea, go to bed, get up... Ahhhh. it's finished!
$ make install No joy. Log file attached.
This is all a bit of a stream of consciousness. Sorry 'bout that. Angus
install.log.bz2
Description: Binary data