]> git.lyx.org Git - features.git/commitdiff
fix PACKAGE handling for MacOS and Windows
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 13 Oct 2005 14:45:12 +0000 (14:45 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 13 Oct 2005 14:45:12 +0000 (14:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10550 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
config/ChangeLog
config/lyxinclude.m4
configure.ac
src/support/ChangeLog
src/support/package.C.in

index 9c6efa5af4d84ede65ec876e36a3276261f5c126..cda83989cb6ef403ee85a665a50881062c5efda7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-12  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * configure.ac: call LYX_USE_PACKAGING early. Sanitize PACKAGE
+       setting. 
+
 2005-09-30  Angus Leeming  <leeming@lyx.org>
 
        * configure.ac: check for NewAPIs.h. If found, define the
index 529aa318ad1f757d569720b237c6c5171fcb98db..82d90a8590154ec01c99a545123a563be5514864 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-12  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * lyxinclude.m4 (LYX_USE_PACKAGING): set PACKAGE depending on
+       packaging setting.
+       (LYX_VERSION_SUFFIX): honor PACKAGE value.
+
 2005-09-29  Angus Leeming  <leeming@lyx.org>
 
        * lyxinclude.m4: add a new MSYS_AC_CANONICAL_PATH macro that
index 13f632a0a1cb8e193bccdbce5c13659f6e3f20a7..40400e0c2192d940f3231a38d66e5100f12d4578 100644 (file)
@@ -28,7 +28,7 @@ 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 install target])
 RPM_VERSION_SUFFIX='""'
 AC_ARG_WITH(version-suffix,
   [  --with-version-suffix[=<version>]  install lyx files as lyx<version>],
@@ -37,12 +37,11 @@ AC_ARG_WITH(version-suffix,
      withval="-$VERSION"
      ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
    fi
-   lyxname="lyx$withval"
+   PACKAGE="$PACKAGE$withval"
    program_suffix=$withval
-   RPM_VERSION_SUFFIX="--with-version-suffix=$withval"],
-  [lyxname=lyx])
+   RPM_VERSION_SUFFIX="--with-version-suffix=$withval"])
 AC_SUBST(RPM_VERSION_SUFFIX)
-AC_MSG_RESULT([$lyxname])
+AC_MSG_RESULT([$PACKAGE])
 ])
 
 
@@ -587,20 +586,21 @@ 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])
-          test $PACKAGE = "lyx" && PACKAGE=LyX
+          PACKAGE=LyX
           default_prefix="/Applications/LyX.app"
           bindir='${prefix}/Contents/MacOS'
           libdir='${prefix}/Contents/Resources'
           datadir='${prefix}/Contents/Resources'
           mandir='${prefix}/Contents/Resources/man' ;;
   windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout])
-          test $PACKAGE = "lyx" && PACKAGE=LyX
+          PACKAGE=LyX
           default_prefix="C:/Program Files/LyX"
           bindir='${prefix}/bin'
           libdir='${prefix}/Resources'
           datadir='${prefix}/Resources'
           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
           default_prefix=$ac_default_prefix ;;
     *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
 esac
index 0e22032ade05622610f07f934f3aedd5e0a1f5df..338a6aa5f5dc80075c4e8c84eecf4196bb5e79bd 100644 (file)
@@ -7,9 +7,12 @@ AM_CONFIG_HEADER([src/config.h])
 
 AC_CONFIG_AUX_DIR(config)
 
-PACKAGE=lyx${program_suffix}
+# first the version
 VERSION="1.4.0cvs"
 LYX_CHECK_VERSION
+# Check how the files should be packaged
+LYX_USE_PACKAGING
+LYX_VERSION_SUFFIX
 
 dnl default maintainer mode to true for development versions
 if test "${enable_maintainer_mode+set}" != set; then
@@ -18,9 +21,7 @@ fi
 AM_MAINTAINER_MODE
 AC_CANONICAL_TARGET
 
-LYX_VERSION_SUFFIX
-
-AM_INIT_AUTOMAKE($lyxname, $VERSION)
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do
@@ -227,8 +228,6 @@ dnl qt build will fail without moc or uic
   esac
 done
 
-### Check how the files should be packaged
-LYX_USE_PACKAGING
 # fix the value of the prefixes.
 test "x$prefix" = xNONE && prefix=$default_prefix
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
index a399cb254eed8169fe1c231a7f78599b07d1fa07..4cf9cc87d1f0ebc753840b896742f17c4329326c 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-12  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * package.C.in (get_default_user_support_dir): do not play tricks
+       with PACKAGE value.
+
 2005-09-30  Angus Leeming  <leeming@lyx.org>
 
        * os_win32.h: new file, providing a public and portable interface
index 1ddcb1f4a45d7460a22be9ef9f2f845be1eca439..7c553006ed459d6c86c3966c79bb0d0a910a7d1a 100644 (file)
@@ -591,9 +591,8 @@ string const get_default_user_support_dir(string const & home_dir)
 #if defined (USE_WINDOWS_PACKAGING)
        (void)home_dir; // Silence warning about unused variable.
 
-       string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE;
        os::GetFolderPath win32_folder_path;
-       return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), user_dir);
+       return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE);
 
 #elif defined (USE_MACOSX_PACKAGING)
        (void)home_dir; // Silence warning about unused variable.
@@ -612,8 +611,7 @@ string const get_default_user_support_dir(string const & home_dir)
        if (status_code != 0)
                return string();
 
-       string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE;
-       return AddPath(reinterpret_cast<char const *>(store), user_dir);
+       return AddPath(reinterpret_cast<char const *>(store), PACKAGE);
 
 #else // USE_POSIX_PACKAGING
        return AddPath(home_dir, string(".") + PACKAGE);