diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-27 16:32:40 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-04-27 16:41:08 +0200 |
commit | 411e141164861435385bb9bbb10012da28a077c0 (patch) | |
tree | 70b76446c69d248e8c7c490a5094ba1244c8076b /top | |
parent | f1a5e51859e28d9ff71107007d32b7c6aaa1fa02 (diff) | |
download | gnulib-411e141164861435385bb9bbb10012da28a077c0.tar.gz |
maint.mk: avoid side-effect in latest syntax-check
* top/maint.mk (sc_prohibit_always_true_header_tests): Rework not
to run commands via $(shell...), and hence to incur cost only when
the new rule is actually run.
Diffstat (limited to 'top')
-rw-r--r-- | top/maint.mk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/top/maint.mk b/top/maint.mk index 159fe8310e..8d9a522330 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -649,20 +649,21 @@ sc_useless_cpp_parens: # using the appropriate gnulib module. CAUTION: for each "unnecessary" # #if HAVE_HEADER_H that you remove, be sure that your project explicitly # requires the gnulib module that guarantees the usability of that header. -gl_assured_headers_ := \ - $(shell cd $(gnulib_dir)/lib && ls -1 *.in.h|sed 's/\.in\.h$$/ \\/') +gl_assured_headers_ = \ + cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//' # Convert the list of names to upper case, and replace each space with "|". az_ = abcdefghijklmnopqrstuvwxyz AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ -gl_header_upper_case_or_ := \ - $(shell echo $(gl_assured_headers_) \ +gl_header_upper_case_or_ = \ + $$($(gl_assured_headers_) \ | tr $(az_)/.- $(AZ_)___ \ | tr -s ' ' '|' \ - ) -gl_have_header_regex_ = HAVE_($(gl_header_upper_case_or_))_H + ) sc_prohibit_always_true_header_tests: - @prohibit='\<$(gl_have_header_regex_)\>' \ + @or=$(gl_header_upper_case_or_); \ + re="HAVE_($$or)_H"; \ + prohibit='\<'"$$re"'\>' \ halt='do not test the above HAVE_<header>_H symbol(s);\n'\ ' with the corresponding gnulib module, they are always true' \ $(_sc_search_regexp) |