[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d5474d7 5/5: Reorder makefile, preferring $(s
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d5474d7 5/5: Reorder makefile, preferring $(srcdir) to $(CURDIR) |
Date: |
Thu, 2 Apr 2020 19:47:21 -0400 (EDT) |
branch: master
commit d5474d7cf64acd083257c193ce05c140b6523a13
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Reorder makefile, preferring $(srcdir) to $(CURDIR)
There's no longer a nonempty recipe for remaking GNUmakefile, so its
rule has been moved back with other such rules, making the order more
logical.
---
GNUmakefile | 50 ++++++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 28 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index d9a1c71..dffe339 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -82,32 +82,30 @@ MAKEFLAGS := \
################################################################################
-# Remake this makefile.
-#
-# For similar usage elsewhere, $(srcdir) is generally preferred to
-# $(CURDIR), especially in submakefiles made in other directories,
-# where $(CURDIR) would be wrong. In this particular case, however,
-# $(srcdir) has not yet been assigned, and it's best to remake this
-# makefile early.
+# Directories (and toolchain selection on which they depend).
-GNUmakefile $(CURDIR)/GNUmakefile:: ;
+# 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.
-# "Source" various crucial environment variables.
+# source files (GNU Coding Standards don't suggest any default value)
+srcdir := $(CURDIR)
+
+# $(srcdir) really shouldn't be overridden. A noisy assertion is more
+# helpful than a silent 'override' directive.
+ifneq ($(srcdir),$(CURDIR))
+ $(error Assertion failure: source directory misconfigured)
+endif
+
+# "Source" various crucial environment variables that are used in the
+# definitions below.
LMI_ENV_FILE := /tmp/lmi_env_$(shell date -u +'%s_%N').eraseme
-$(shell $(CURDIR)/transume_toolchain.sh > $(LMI_ENV_FILE))
+$(shell $(srcdir)/transume_toolchain.sh > $(LMI_ENV_FILE))
include $(LMI_ENV_FILE)
$(LMI_ENV_FILE):: ;
-################################################################################
-
-# Directories.
-
-# 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)/$(LMI_COMPILER)_$(LMI_TRIPLET)
@@ -137,14 +135,6 @@ datadir := $(prefix)/data
docdir := $(datarootdir)/doc/lmi
htmldir := $(docdir)
#libdir := $(exec_prefix)/lib
-# source files (GNU Coding Standards don't suggest any default value)
-srcdir := $(CURDIR)
-
-# $(srcdir) really shouldn't be overridden. A noisy assertion is more
-# helpful than a silent 'override' directive.
-ifneq ($(srcdir),$(CURDIR))
- $(error Assertion failure: source directory misconfigured)
-endif
# These directories are outside the scope of the GNU Coding Standards.
# Therefore, their names may contain '_' for distinction and clarity.
@@ -157,7 +147,7 @@ touchstone_dir := $(prefix)/touchstone
################################################################################
# Other makefiles included; makefiles not to be remade.
-#
+
# Included files that don't need to be remade are given explicit empty
# commands, which significantly reduces the number of lines emitted by
# 'make -d', making debug output easier to read.
@@ -176,6 +166,10 @@ touchstone_dir := $(prefix)/touchstone
# a poor practice, but empty commands ought to be excused from that
# inline comment, and perhaps even from that diagnostic.
+# Don't remake this makefile.
+
+GNUmakefile $(srcdir)/GNUmakefile:: ;
+
# Configuration.
include $(srcdir)/configuration.make
- [lmi-commits] [lmi] master updated (6425b3b -> d5474d7), Greg Chicares, 2020/04/02
- [lmi-commits] [lmi] master e2db549 1/5: Resolve gratuitous differences, Greg Chicares, 2020/04/02
- [lmi-commits] [lmi] master 8b8a660 3/5: Augment 'show_env' makefile target, exposing a defect, Greg Chicares, 2020/04/02
- [lmi-commits] [lmi] master a034d7f 4/5: Fix defect exposed 20200402T1125Z: 'make' subtlety, Greg Chicares, 2020/04/02
- [lmi-commits] [lmi] master 77626be 2/5: Streamline temporary instrumentation, Greg Chicares, 2020/04/02
- [lmi-commits] [lmi] master d5474d7 5/5: Reorder makefile, preferring $(srcdir) to $(CURDIR),
Greg Chicares <=