[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
here:
https://lists.nongnu.org/archive/html/lmi/2019-04/msg00018.html
It is reinstated now because liblzma is being removed from lmi:
https://lists.nongnu.org/archive/html/lmi/2019-05/msg00019.html
because it poses complex technical issues:
https://lists.nongnu.org/archive/html/lmi/2019-05/msg00017.html
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:
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
| 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.
https://www.gnu.org/software/autoconf/manual/autoconf.html
| 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:
--prefix=/opt/lmi/"$host_type"/local
--exec-prefix="$prefix"
it would seem better to build them this way [option X]:
--prefix=/opt/lmi/local
--exec-prefix="$prefix"/"$host_type"
or even this way [option Y]:
--prefix=/opt/lmi/local
--exec-prefix=/opt/lmi/"$host_type"/local
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:
https://lists.nongnu.org/archive/html/lmi/2017-08/msg00061.html
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
liblzma).
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_COMPILER ?= gcc
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
<address@hidden
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"}
mingw_dir=/opt/lmi/mingw
-prefix=/opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/local
-exec_prefix="$prefix"
+prefix=/opt/lmi/local
+exec_prefix="$prefix"/"${LMI_COMPILER}_${LMI_TRIPLET}"
repo_name="wxWidgets"
@@ -135,7 +135,7 @@ config_options="
[ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
-build_dir="$prefix"/../wx-ad_hoc/lmi-$LMI_COMPILER-$gcc_version
+build_dir="$exec_prefix"/wx-ad_hoc/lmi-$LMI_COMPILER-$gcc_version
if [ "$wx_skip_clean" != 1 ]
then
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"}
mingw_dir=/opt/lmi/mingw
-prefix=/opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/local
-exec_prefix="$prefix"
+prefix=/opt/lmi/local
+exec_prefix="$prefix"/"${LMI_COMPILER}_${LMI_TRIPLET}"
repo_name="wxpdfdoc"
@@ -105,7 +105,7 @@ config_options="
cd "$proxy_wxpdfdoc_dir"
autoreconf --verbose
-build_dir="$prefix"/../wxpdfdoc-ad_hoc/wxpdfdoc-$wxpdfdoc_commit_sha
+build_dir="$exec_prefix"/wxpdfdoc-ad_hoc/wxpdfdoc-$wxpdfdoc_commit_sha
if [ "$wxpdfdoc_skip_clean" != 1 ]
then
- [lmi-commits] [lmi] master updated (caf6f55 -> 42d072d), Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master db13831 02/11: Copy a directory's contents instead of the directory as such, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master 081657d 06/11: Update to a working URL for msw md5sum binary, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master 2817a1b 07/11: Make sure data directory exists before writing to it, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master c4e2286 03/11: No longer treat pthread DLL as a compiler runtime file, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master d8c273d 09/11: Let xsltproc be found (by cygwin), Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master a6fb202 01/11: Replace literal "gcc" with $LMI_COMPILER, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master 785ff4e 08/11: Remove undesirable quotes in scripts, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master aee9f4d 10/11: For cygwin, add msw system directory to minimal path, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master 6107ab7 05/11: Expunge liblzma, Greg Chicares, 2019/05/08
- [lmi-commits] [lmi] master 09eae7d 04/11: Distinguish $exec_prefix from $prefix,
Greg Chicares <=
- [lmi-commits] [lmi] master 42d072d 11/11: Improve shell quoting, Greg Chicares, 2019/05/08