[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master ee4f623 4/4: Rework the 'install' target to s
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master ee4f623 4/4: Rework the 'install' target to support multiple architectures [351] |
Date: |
Fri, 26 Apr 2019 14:59:15 -0400 (EDT) |
branch: master
commit ee4f6236231a0245da91272990dd2cd5347a8f12
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Rework the 'install' target to support multiple architectures [351]
See:
https://lists.nongnu.org/archive/html/lmi/2019-04/msg00023.html
| [Supporting] multiple installation directories would be
| difficult with today's 'install' target, which simply
| - copies lmi's own binaries to $INSTALL/bin
| - copies (or generates) data in $INSTALL/data
| and relies on $PATH and $WINEPATH to find libraries for the
| appropriate architecture. [To make] an $INSTALL directory
| configurable, and [permit] multiple independent installations:
...
| Copy all required libraries as well as lmi's own binaries, so that
| each $INSTALL directory would have a complete set and there'd be no
| need to alter any path variable in the environment.
Also see:
https://lists.nongnu.org/archive/html/lmi/2019-04/msg00042.html
---
workhorse.make | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/workhorse.make b/workhorse.make
index f89fe50..d54f6ef 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1043,12 +1043,9 @@ lmi_msw_res.o: lmi.ico
################################################################################
# Install.
-
-# TODO ?? This line
-# $(CP) --preserve --update $^
-# isn't quite right: running 'make install build_type=[...]' with
-# different build_types and picking the latest version of each
-# component can produce a mismatched set.
+#
+# Architecture-independent files are copied with 'cp --update'.
+# Architecture-dependent files are copied without '--update'.
data_files := \
$(wildcard $(addprefix $(srcdir)/,*.ico *.png *.xml *.xrc *.xsd *.xsl)) \
@@ -1056,6 +1053,12 @@ data_files := \
help_files := \
$(wildcard $(addprefix $(srcdir)/,*.html)) \
+installable_binaries := \
+ $(default_targets) \
+ $(wildcard $(localbindir)/*$(SHREXT)) \
+ $(wildcard $(locallibdir)/*$(SHREXT)) \
+ $(wildcard $(prefix)/third_party/bin/*$(EXEEXT)) \
+
.PHONY: install
install: $(default_targets)
address@hidden -d $(exec_prefix) ] || $(MKDIR) --parents
$(exec_prefix)
@@ -1063,7 +1066,7 @@ install: $(default_targets)
address@hidden -d $(datadir) ] || $(MKDIR) --parents $(datadir)
address@hidden -d $(test_dir) ] || $(MKDIR) --parents $(test_dir)
address@hidden -d $(touchstone_dir) ] || $(MKDIR) --parents
$(touchstone_dir)
- @$(CP) --preserve --update $^ $(bindir)
+ @$(CP) --preserve $(installable_binaries) $(bindir)
@$(CP) --preserve --update $(data_files) $(datadir)
@$(CP) --preserve --update $(help_files) $(datadir)
@datadir=$(datadir) srcdir=$(srcdir) $(srcdir)/mst_to_xst.sh