[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fbe3879 3/6: Assert a precondition; improve d
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fbe3879 3/6: Assert a precondition; improve documentation |
Date: |
Wed, 22 May 2019 15:27:39 -0400 (EDT) |
branch: master
commit fbe3879978e6d19aae5deeccc7dd6605b0cebb9e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Assert a precondition; improve documentation
---
GNUmakefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/GNUmakefile b/GNUmakefile
index ef8d813..53450f5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -77,8 +77,14 @@ MAKEFLAGS := \
################################################################################
-# Remake this file to "source" a script that sets various crucial
+# Remake this makefile to "source" a script that sets various crucial
# environment variables.
+#
+# 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.
export LMI_ENV_FILE := env_$(shell date -u +'%s_%N').eraseme
@@ -130,6 +136,12 @@ htmldir := $(docdir)
# 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.
localbindir := $(prefix)/local/$(LMI_COMPILER)_$(LMI_TRIPLET)/bin
- [lmi-commits] [lmi] master updated (548812c -> 5451a41), Greg Chicares, 2019/05/22
- [lmi-commits] [lmi] master fbe3879 3/6: Assert a precondition; improve documentation,
Greg Chicares <=
- [lmi-commits] [lmi] master f2621cd 4/6: Apply 'e_script' coding rules to hash-bang files, Greg Chicares, 2019/05/22
- [lmi-commits] [lmi] master 5a7e4c1 5/6: Check concinnity of hooks/, Greg Chicares, 2019/05/22
- [lmi-commits] [lmi] master 4638d55 1/6: Fix defect committed 20190518T1712Z: script might not be in $PWD, Greg Chicares, 2019/05/22
- [lmi-commits] [lmi] master 0dfb9cb 2/6: Parameterize directory tested by 'make check_concinnity', Greg Chicares, 2019/05/22
- [lmi-commits] [lmi] master 5451a41 6/6: Improve documentation, Greg Chicares, 2019/05/22