[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1e02b2d 2/7: Refactor: specify makefile direc
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1e02b2d 2/7: Refactor: specify makefile directories at a lower level |
Date: |
Wed, 27 Mar 2019 11:06:44 -0400 (EDT) |
branch: master
commit 1e02b2d0fac1b20141aa34d64ddbb43929569edf
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Refactor: specify makefile directories at a lower level
The goal is to replace literal occurrences of /opt/lmi/local with a
flexible directory structure for multiple-architecture builds--see:
https://lists.nongnu.org/archive/html/lmi/2017-05/msg00034.html
This commit is just a preliminary step. Specifying all standard (and
some nonstandard) directories in a low-level makefile just makes sense,
and it's desirable for the particular reason that 'GNUmakefile' already
uses what is now named $localbindir.
It is laudable that git's '--color-moved=plain' option finds blocks
moved between files.
---
GNUmakefile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
workhorse.make | 41 -----------------------------------------
2 files changed, 56 insertions(+), 43 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 28b07a9..6cb18d9 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -79,7 +79,49 @@ MAKEFLAGS := \
# Directories.
-srcdir := $(CURDIR)
+# SOMEDAY !! Follow the GNU Coding Standards
+# https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+# more closely, changing the value of $(datadir), and perhaps using
+# some other standard directories that are commented out for now.
+
+prefix := /opt/lmi
+# parent directory for machine-specific binaries
+exec_prefix := $(prefix)
+# binaries that users can run
+bindir := $(exec_prefix)/bin
+# binaries that administrators can run
+#sbindir := $(exec_prefix)/sbin
+# binaries run by programs
+#libexecdir := $(exec_prefix)/libexec
+# parent directory for read-only architecture-independent data files
+datarootdir := $(prefix)/share
+# idiosyncratic read-only architecture-independent data files
+# GNU standard default:
+# datadir := $(datarootdir)
+# nonstandard value used for now:
+datadir := $(exec_prefix)/data
+# read-only data files that pertain to a single machine
+#sysconfdir := $(prefix)/etc
+# architecture-independent data files which the programs modify while they run
+#sharedstatedir := $(prefix)/com
+# data files which the programs modify while they run
+#localstatedir := $(prefix)/var
+# data files which the programs modify while they run, persisting until reboot
+#runstatedir := $(localstatedir)/run
+# headers
+#includedir := $(prefix)/include
+docdir := $(datarootdir)/doc/lmi
+htmldir := $(docdir)
+#libdir := $(exec_prefix)/lib
+# source files (GNU Coding Standards don't suggest any default value)
+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
+test_dir := $(exec_prefix)/test
+touchstone_dir := $(exec_prefix)/touchstone
################################################################################
@@ -148,8 +190,20 @@ MAKETARGET = \
--directory=$@ \
--file=$(srcdir)/workhorse.make \
--no-print-directory \
- $(local_options) $(MAKEOVERRIDES) \
+ $(local_options) \
+ $(MAKEOVERRIDES) \
+ prefix='$(prefix)' \
+ exec_prefix='$(exec_prefix)' \
+ bindir='$(bindir)' \
+ datarootdir='$(datarootdir)' \
+ datadir='$(datadir)' \
+ docdir='$(docdir)' \
+ htmldir='$(htmldir)' \
srcdir='$(srcdir)' \
+ localbindir='$(localbindir)' \
+ locallibdir='$(locallibdir)' \
+ test_dir='$(test_dir)' \
+ touchstone_dir='$(touchstone_dir)' \
toolset='$(toolset)' \
build_type='$(build_type)' \
platform-makefile='$(platform-makefile)' \
diff --git a/workhorse.make b/workhorse.make
index 5d5c3f4..ad43988 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1042,47 +1042,6 @@ lmi_msw_res.o: lmi.ico
# different build_types and picking the latest version of each
# component can produce a mismatched set.
-# SOMEDAY !! Follow the GNU Coding Standards
-# https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
-# more closely, changing the value of $(datadir), and perhaps using
-# some other standard directories that are commented out for now.
-
-prefix := /opt/lmi
-# parent directory for machine-specific binaries
-exec_prefix := $(prefix)
-# binaries that users can run
-bindir := $(exec_prefix)/bin
-# binaries that administrators can run
-#sbindir := $(exec_prefix)/sbin
-# binaries run by programs
-#libexecdir := $(exec_prefix)/libexec
-# parent directory for read-only architecture-independent data files
-datarootdir := $(prefix)/share
-# idiosyncratic read-only architecture-independent data files
-# GNU standard default:
-# datadir := $(datarootdir)
-# nonstandard value used for now:
-datadir := $(exec_prefix)/data
-# read-only data files that pertain to a single machine
-#sysconfdir := $(prefix)/etc
-# architecture-independent data files which the programs modify while they run
-#sharedstatedir := $(prefix)/com
-# data files which the programs modify while they run
-#localstatedir := $(prefix)/var
-# data files which the programs modify while they run, persisting until reboot
-#runstatedir := $(localstatedir)/run
-# headers
-#includedir := $(prefix)/include
-docdir := $(datarootdir)/doc/lmi
-htmldir := $(docdir)
-#libdir := $(exec_prefix)/lib
-# srcdir: set to $(CURDIR) upstream; no GNU default value
-
-# no GNU standard for 'test' or 'touchstone': directory names therefore
-# contain '_' for distinction and clarity
-test_dir := $(exec_prefix)/test
-touchstone_dir := $(exec_prefix)/touchstone
-
data_files := \
$(wildcard $(addprefix $(srcdir)/,*.ico *.png *.xml *.xrc *.xsd *.xsl)) \
- [lmi-commits] [lmi] master updated (63529b4 -> fd8809d), Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 2879c8e 1/7: Vaporize 'java', Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 1f46780 3/7: Add an include directory for architecture-dependent packages, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master fd8809d 7/7: Resolve all 'XMLWRAPP !!' markers but one, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 232ae5d 4/7: Expunge obsolete documentation, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 1e02b2d 2/7: Refactor: specify makefile directories at a lower level,
Greg Chicares <=
- [lmi-commits] [lmi] master dc3854e 5/7: Replace literal '/opt/lmi/local' with makefile variables set OAOO, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master d969290 6/7: Use $LMI_HOST more flexibly in makefiles and scripts, Greg Chicares, 2019/03/27