lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 10dfe448 03/13: Prepare to refactor


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 10dfe448 03/13: Prepare to refactor
Date: Tue, 7 Jun 2022 16:39:09 -0400 (EDT)

branch: master
commit 10dfe448c61180062aefde55560b19c5e6827eb5
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prepare to refactor
    
    It is necessary to determine which targets can be built in any given
    context (e.g., build_type, architecture). As the tangled conditionals
    demonstrate, it is difficult to build this list additively. Experience
    with unit-test targets in 'objects.make' shows that it is easier to
    build a list of conditional exclusions. Accordingly, adapted that
    exclusionary framework, intending to replace "add-unless" conditionals
    with "exclude-if" ones in later commits--one by one, because a single
    big-bang revision might easily introduce new defects, and also because
    the present conditionals are not free of defects themselves.
---
 workhorse.make | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/workhorse.make b/workhorse.make
index 77153a2b..095f5ef6 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -79,6 +79,12 @@ $(srcdir)/objects.make:: ;
 
 
################################################################################
 
+# Override this variable to exclude targets that are inappropriate in
+# context--e.g., targets that don't even compile with a particular
+# $(build_type).
+
+excluded_default_targets :=
+
 # Effective default target (described above under "Default target").
 
 default_targets := \
@@ -132,6 +138,10 @@ ifeq (,$(USE_SO_ATTRIBUTES))
   endif
 endif
 
+default_targets := \
+  $(filter-out $(excluded_default_targets), $(default_targets) \
+  ) \
+
 .PHONY: effective_default_target
 effective_default_target: $(default_targets)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]