lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Mon, 13 Jun 2016 23:47:43 +0000 (UTC)

branch: master
commit f1f4c60ab319f3006ff5d6efcc9d8011a19ebb0b
Author: Gregory W. Chicares <address@hidden>
Date:   Mon Jun 13 16:45:35 2016 +0000

    Partially revert changes to determination of wx-dependent objects
    
    Partially revert commit ee6c0230a33cbf23da6c56faac72254281804a09 for
    'workhorse.make'. See:
      http://lists.nongnu.org/archive/html/lmi/2016-06/msg00065.html
    | BTW, in commit ee6c0230a33cbf23da6c56faac72254281804a09 I changed the
    | way 'workhorse.make' determined which objects depend on wx (for the
    | purpose of suppressing '-Wcast-qual'). It seemed that inclusion of
    | the wx-specific PCH header was a better way of determining that. Now,
    | however, we're including that PCH header in some files that actually
    | don't depend on wx, and those files shouldn't be exempted from that
    | extra warning--so I'll revert that modification.
    
    Combine multiple patterns in a single $(filter-out) call.
    
    Use $(sort) to make it easier to compare results before and after this
    change.
---
 workhorse.make |   60 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/workhorse.make b/workhorse.make
index d932d3a..cd64fe8 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -338,13 +338,14 @@ vpath quoted_gpl_html $(src_dir)
 # Only files in the source directory are tested. Files that reside
 # elsewhere (e.g., headers accompanying libraries) are not tested.
 
-# Exclude headers named 'config_*.hpp' and 'pchlist*': they are
-# designed to signal errors if they are used separately.
+# Exclude headers named 'config_*.hpp' or 'pchlist*.hpp': they are
+# designed to signal errors if they are used separately. $(sort) is
+# used here to remove duplicates, which are harmless but inefficient.
 
 physical_closure_files := \
-  $(addsuffix .physical_closure,\
-    $(filter-out config_%.hpp,\
-      $(filter-out pchlist%.hpp,\
+  $(sort \
+    $(addsuffix .physical_closure,\
+      $(filter-out config_%.hpp pchlist%.hpp,\
         $(notdir \
           $(wildcard \
             $(addprefix $(src_dir)/,*.h *.hpp *.tpp *.xpp \
@@ -353,46 +354,47 @@ physical_closure_files := \
         ) \
       ) \
     ) \
-  )
+  ) \
 
 
################################################################################
 
 # Files that depend on wx, which can't use the strictest gcc warnings.
 
-# '.cpp' files are deemed to depend on wx iff they include lmi's
-# wx-specific PCH file.
+# Files are deemed to depend on wx iff they contain 'include *<wx/'.
+# This heuristic isn't foolproof because wx headers might be included
+# indirectly. Include an innocuous header like <wx/version.h> in files
+# for which it fails.
 
 wx_dependent_objects := \
-  $(addsuffix .o,\
-    $(basename \
-      $(notdir \
-        $(shell $(GREP) \
-          --files-with-matches \
-          '\#include "pchfile_wx.hpp"' \
-          $(src_dir)/*.cpp \
+  $(sort \
+    $(addsuffix .o,\
+      $(basename \
+        $(notdir \
+          $(shell $(GREP) \
+            --files-with-matches \
+            'include *<wx/' \
+            $(src_dir)/*.?pp \
+          ) \
         ) \
       ) \
     ) \
-  )
-
-# Other files are deemed to depend on wx iff they obviously include a
-# wx header. This heuristic isn't foolproof because wx headers might
-# be included indirectly. An innocuous header like <wx/version.h> can
-# be included in files for which it fails.
+  ) \
 
 wx_dependent_physical_closure_files := \
-  $(addsuffix .physical_closure,\
-    $(notdir \
-      $(shell $(GREP) \
-        --files-with-matches \
-        '\#include *<wx/' \
-        $(wildcard \
-          $(addprefix $(src_dir)/,*.h *.hpp *.tpp *.xpp \
+  $(sort \
+    $(addsuffix .physical_closure,\
+      $(notdir \
+        $(shell $(GREP) \
+          --files-with-matches \
+          'include *<wx/' \
+          $(wildcard \
+            $(addprefix $(src_dir)/,*.h *.hpp *.tpp *.xpp \
+            ) \
           ) \
         ) \
       ) \
     ) \
-  )
+  ) \
 
 
################################################################################
 



reply via email to

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