[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 09eae7d 04/11: Distinguish $exec_prefix from

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 09eae7d 04/11: Distinguish $exec_prefix from $prefix
Date: Wed, 8 May 2019 13:23:24 -0400 (EDT)

branch: master
commit 09eae7d41347e932dc4d5bcff16d1d5562c74c09
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Distinguish $exec_prefix from $prefix
    This commit is a reworked variant of odd/multiarch commit cd1b383b6e.
    That commit had been put aside because of the liblzma problem described
    It is reinstated now because liblzma is being removed from lmi:
    because it poses complex technical issues:
    and has never been found useful enough to deploy in production.
    It is noted in passing that changing PKG_CONFIG_PATH as suggested in
    the April 2019 email thread referenced above did not seem to resolve
    the libxml2+liblzma issue reported in that thread; the change to
    PKG_CONFIG_PATH is retained in this commit because it seems correct
    in itself, but libxml2 configuration now uses '--without-lzma', and
    liblzma will soon be eradicated in a separate commit.
    Here follows the original commit message for cd1b383b6e. It is
    reproduced here in relevant part because the branch on which it
    appeared may someday be deleted. Obsolete references to "$host_type"
    have not been updated, but the meaning should be clear enough.
    [quotation from cd1b383b6e commit message begins]
    In theory at least, $exec_prefix is separate from $prefix:
    | Generally, $(exec_prefix) is used for directories that contain
    | machine-specific files (such as executables and subroutine libraries),
    | while $(prefix) is used directly for other directories.
    | exec_prefix
    | The installation prefix for architecture-dependent files.
    and $exec_prefix needn't be identical to $prefix or even a subdirectory
    of $prefix--in theory at least.
    Thus, instead of building autotoolized libraries this way:
    it would seem better to build them this way [option X]:
    or even this way [option Y]:
    Attempting to use option Y failed in ways that seemed difficult to fix
    (wxWidgets built successfully with either X or Y, but liblzma and
    libxml2 didn't; perhaps their maintainers have blithely assumed that
    $exec_prefix is a subdirectory of $prefix), so this commit implements
    option X. And it's almost successful: lmi builds and works correctly
    except that lzma support for product files fails the test here:
    That failure is not unanticipated, because libxml2 configuration says
      "checking for LZMA...no"
    for option X, both with and without this change:
    -  --with-lzma=$(prefix) \
    +  --with-lzma=$(exec_prefix) \
    The difference is that without that change, compilation halts because
    lzma headers cannot be found, whereas with that change, the library
    appears to build despite the "LZMA...no" warning (yet fails to support
    Therefore, although this revision is committed because it's interesting,
    apparently it must be reverted because the autotoolization of libraries
    in widespread use is incompatible with the autotools vision, and the
    only reliable method is '--exec-prefix="$prefix"', which installs
    architecture-independent headers to an architecture-dependent directory.
    [quotation from cd1b383b6e commit message ends]
 GNUmakefile                  |  7 ++++---
 install_libxml2_libxslt.make | 15 +++++----------
 install_wx.sh                |  6 +++---
 install_wxpdfdoc.sh          |  6 +++---
 4 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 0c517c7..67cf563 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -121,9 +121,9 @@ srcdir          := $(CURDIR)
 # These directories are outside the scope of the GNU Coding Standards.
 # Therefore, their names may contain '_' for distinction and clarity.
-localbindir     := $(exec_prefix)/local/bin
-locallibdir     := $(exec_prefix)/local/lib
-localincludedir := $(exec_prefix)/local/include
+localbindir     := $(prefix)/local/$(LMI_COMPILER)_$(LMI_TRIPLET)/bin
+locallibdir     := $(prefix)/local/$(LMI_COMPILER)_$(LMI_TRIPLET)/lib
+localincludedir := $(prefix)/local/include
 winebindir      := $(prefix)/third_party/bin
 test_dir        := $(prefix)/test
 touchstone_dir  := $(prefix)/touchstone
@@ -367,6 +367,7 @@ raze: source_clean
 .PHONY: eviscerate
 eviscerate: source_clean
+       -$(RM) --force --recursive $(prefix)/local
        -$(RM) --force --recursive $(prefix)/third_party
        -$(RM) --force --recursive $(prefix)/gcc_i686-w64-mingw32
        -$(RM) --force --recursive $(prefix)/gcc_x86_64-w64-mingw32
diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index e5574bd..5ed3795 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -51,17 +51,12 @@ mingw_dir     := /opt/lmi/mingw
 LMI_TRIPLET   ?= i686-w64-mingw32
-# It would be cleaner to use the "LMI_*" components in $exec_prefix
-# (arch-dependent libraries) rather than in $prefix (arch-independent
-# headers, e.g.). However, libxml2's '--with-lzma' option assumes that
-# $prefix and $exec_prefix are the same directory--see:
-#   https://lists.nongnu.org/archive/html/lmi/2019-04/msg00018.html
-prefix        := /opt/lmi/$(LMI_COMPILER)_$(LMI_TRIPLET)/local
-exec_prefix   := $(prefix)
+prefix        := /opt/lmi/local
+exec_prefix   := $(prefix)/$(LMI_COMPILER)_$(LMI_TRIPLET)
 cache_dir     := /cache_for_lmi/downloads
-build_dir     := $(prefix)/../xml-ad_hoc
+build_dir     := $(exec_prefix)/xml-ad_hoc
 # Variables that normally should be left alone 
@@ -135,7 +130,7 @@ $(libxml2_version)_options := \
   --build=`$(build_dir)/$(libxml2_version)/config.guess` \
   --host=$(LMI_TRIPLET) \
   $(xmlsoft_common_options) \
-  --with-lzma=$(prefix) \
+  --without-lzma \
   --with-schemas \
   --without-iconv \
   --without-modules \
@@ -220,7 +215,7 @@ $(libraries):
        -[ -e address@hidden ] && $(PATCH) --directory=$(build_dir) --strip=1 
        cd $(build_dir)/$@ \
          && export PATH="$(mingw_bin_dir):${PATH}" \
-         && PKG_CONFIG_PATH="$(prefix)/lib/pkgconfig" \
+         && PKG_CONFIG_PATH="$(exec_prefix)/lib/pkgconfig" \
            $(address@hidden) ./configure $(address@hidden) \
          && $(MAKE) \
          && $(MAKE) install \
diff --git a/install_wx.sh b/install_wx.sh
index ab8f54b..fba77be 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -48,8 +48,8 @@ LMI_TRIPLET=${LMI_TRIPLET:-"i686-w64-mingw32"}
@@ -135,7 +135,7 @@ config_options="
 [ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
 if [ "$wx_skip_clean" != 1 ]
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index b58ec1c..fd5ed6a 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -48,8 +48,8 @@ LMI_TRIPLET=${LMI_TRIPLET:-"i686-w64-mingw32"}
@@ -105,7 +105,7 @@ config_options="
 cd "$proxy_wxpdfdoc_dir"
 autoreconf --verbose
 if [ "$wxpdfdoc_skip_clean" != 1 ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]