fix behaviour of --with-version-suffix (bug 2237)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13219 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-02-12 20:29:52 +00:00
parent ed6d4b736f
commit 0328dd98ca
6 changed files with 50 additions and 26 deletions

View File

@ -1,3 +1,8 @@
2006-02-07 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* configure.ac: call LYX_VERSION_SUFFIX and LYX_USE_PACKAGING
earlier (bug 2237); fix definition of LYX_ABS_INSTALLED_DATADIR.
2006-02-11 Lars Gullik Bjønnes <larsbj@lyx.org>
* configure.ac:
@ -7,7 +12,7 @@
* Delete all .cvsignore files from the source tree
2006-01-26 <larsbj@gullik.net>
2006-01-26 Lars Gullik Bjonnes <larsbj@gullik.net>
* autogen.sh: remove the --force-missing option to automake

View File

@ -1,4 +1,11 @@
2006-01-26 Lars Gullik Bjønne s<larsbj@lyx.org>
2006-02-07 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyxinclude.m4 (LYX_VERSION_SUFFIX): do not alter PACKAGE here.
(LYX_USE_PACKAGING): add $version_suffix to PACKAGE here and set
program_suffix for posix (bug 2237); provide a custom definition
of pkgdatadir for OSX and windows.
2006-01-26 Lars Gullik Bjønnes <larsbj@lyx.org>
* ltmain.sh: apply patch for darwin

View File

@ -7,7 +7,7 @@ dnl Allan Rae (rae@lyx.org)
dnl Usage LYX_CHECK_VERSION Displays version of LyX being built and
dnl sets variables "lyx_devel_version" and "lyx_prerelease"
AC_DEFUN([LYX_CHECK_VERSION],[
echo "configuring LyX version $VERSION"
echo "configuring LyX version" AC_PACKAGE_VERSION
if echo AC_PACKAGE_VERSION | grep 'svn' >/dev/null ; then
lyx_devel_version=yes
AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
@ -28,20 +28,19 @@ dnl Define the option to set a LyX version on installed executables and director
dnl
dnl
AC_DEFUN([LYX_VERSION_SUFFIX],[
AC_MSG_CHECKING([for install target])
AC_MSG_CHECKING([for version suffix])
RPM_VERSION_SUFFIX='""'
AC_ARG_WITH(version-suffix,
[ --with-version-suffix[=<version>] install lyx files as lyx<version>],
[if test "x$withval" = "xyes";
then
withval="-$VERSION"
withval="-"AC_PACKAGE_VERSION
ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
fi
PACKAGE="$PACKAGE$withval"
program_suffix=$withval
version_suffix=$withval
RPM_VERSION_SUFFIX="--with-version-suffix=$withval"])
AC_SUBST(RPM_VERSION_SUFFIX)
AC_MSG_RESULT([$PACKAGE])
AC_MSG_RESULT([$withval])
])
@ -586,24 +585,31 @@ AC_ARG_WITH(packaging,
AC_MSG_RESULT($lyx_use_packaging)
case $lyx_use_packaging in
macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout])
PACKAGE=LyX
default_prefix="/Applications/LyX.app"
PACKAGE=LyX${version_suffix}
program_suffix=$version_suffix
default_prefix="/Applications/${PACKAGE}.app"
bindir='${prefix}/Contents/MacOS'
libdir='${prefix}/Contents/Resources'
datadir='${prefix}/Contents/Resources'
mandir='${prefix}/Contents/Resources/man' ;;
pkgdatadir='${datadir}'
mandir='${datadir}/man' ;;
windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout])
PACKAGE=LyX
default_prefix="C:/Program Files/LyX"
PACKAGE=LyX${version_suffix}
program_suffix=$version_suffix
default_prefix="C:/Program Files/${PACKAGE}"
bindir='${prefix}/bin'
libdir='${prefix}/Resources'
datadir='${prefix}/Resources'
pkgdatadir='${datadir}'
mandir='${prefix}/Resources/man' ;;
posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout])
PACKAGE=lyx
PACKAGE=lyx${version_suffix}
program_suffix=$version_suffix
pkgdatadir='${datadir}/${PACKAGE}'
default_prefix=$ac_default_prefix ;;
*) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
esac
AC_SUBST(pkgdatadir)
])

View File

@ -9,7 +9,13 @@ AC_CONFIG_AUX_DIR(config)
# First check the version
LYX_CHECK_VERSION
LYX_VERSION_SUFFIX
# Check how the files should be packaged
AC_CANONICAL_TARGET
LYX_USE_PACKAGING
# We need to define these variables here and the no-define option of
# AM_INIT_AUTOMAKE above because we alter $PACKAGE in LYX_USE_PACKAGING.
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
dnl default maintainer mode to true for development versions
if test "${enable_maintainer_mode+set}" != set; then
@ -17,14 +23,9 @@ if test "${enable_maintainer_mode+set}" != set; then
fi
AM_MAINTAINER_MODE
save_PACKAGE=$PACKAGE
AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar no-define 1.9])
# Check how the files should be packaged
LYX_USE_PACKAGING
LYX_VERSION_SUFFIX
# We need to define these variables here and the no-define option of
# AM_INIT_AUTOMAKE above because LYX_VERSION_SUFFIX alters $PACKAGE.
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
PACKAGE=$save_PACKAGE
### Set the execute permissions of the various scripts correctly
for file in config/install-sh config/mkinstalldirs lib/configure ; do
@ -302,7 +303,8 @@ AC_FUNC_SELECT_ARGTYPES
### Some information on what just happened
real_bindir=`eval "echo \`eval \"echo ${bindir}\"\`"`
real_datadir=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
real_pkgdatadir=`eval "echo \`eval \"echo ${pkgdatadir}\"\`"`
real_localedir=`eval "echo \`eval \"echo ${datadir}/locale\"\`"`
VERSION_INFO="Configuration\n\
Host type: ${host}\n\
Special build flags: ${lyx_flags}\n\
@ -317,12 +319,11 @@ VERSION_INFO="Configuration\n\
${FRONTEND_INFO}\
Packaging: ${lyx_use_packaging}\n\
LyX binary dir: ${real_bindir}\n\
LyX files dir: ${real_datadir}\n"
LyX files dir: ${real_pkgdatadir}\n"
real_localedir=`eval "echo \`eval \"echo ${datadir}/locale\"\`"`
MSYS_AC_CANONICAL_PATH(LYX_ABS_TOP_SRCDIR, ${srcdir})
MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_LOCALEDIR, ${real_localedir})
MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_datadir})
MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_pkgdatadir})
AC_SUBST(VERSION_INFO)
AC_SUBST(RPM_FRONTEND)

View File

@ -1,3 +1,8 @@
2006-02-12 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* package.C.in (relative_system_support_dir): fix for win32 and
OSX packaging.
2005-11-02 Angus Leeming <leeming@lyx.org>
* path.C: trivial fix to a MSVS warning.

View File

@ -699,7 +699,7 @@ string const relative_system_support_dir()
string result;
#if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING)
result = AddPath("../Resources/", PACKAGE);
result = "../Resources/";
#else // Posix-like.
result = AddPath("../share/", PACKAGE);
#endif