regressions: Enable both tests for bug 576879 (not fixed).
[libguestfs.git] / cfg.mk
diff --git a/cfg.mk b/cfg.mk
index e92c34f..eb95dd3 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -27,52 +27,28 @@ url_dir_list = \
 # Tests not to run as part of "make distcheck".
 local-checks-to-skip =                 \
   sc_po_check                          \
-  changelog-check                      \
-  check-AUTHORS                                \
-  makefile-check                       \
-  makefile_path_separator_check                \
-  patch-check                          \
   sc_GPL_version                       \
-  sc_always_defined_macros             \
-  sc_cast_of_alloca_return_value       \
-  sc_dd_max_sym_length                 \
   sc_error_exit_success                        \
   sc_file_system                       \
-  sc_immutable_NEWS                    \
   sc_makefile_path_separator_check     \
   sc_obsolete_symbols                  \
-  sc_prohibit_S_IS_definition          \
   sc_prohibit_atoi_atof                        \
-  sc_prohibit_jm_in_m4                 \
   sc_prohibit_quote_without_use                \
   sc_prohibit_quotearg_without_use     \
   sc_prohibit_stat_st_blocks           \
-  sc_prohibit_strcmp_and_strncmp       \
-  sc_prohibit_strcmp                   \
-  sc_root_tests                                \
   sc_space_tab                         \
-  sc_sun_os_names                      \
-  sc_system_h_headers                  \
-  sc_tight_scope                       \
   sc_two_space_separator_in_usage      \
   sc_error_message_uppercase           \
   sc_program_name                      \
-  sc_require_test_exit_idiom           \
-  sc_makefile_check                    \
   $(disable_temporarily)               \
   sc_useless_cpp_parens
 
 disable_temporarily =                  \
-  sc_makefile_TAB_only_indentation     \
+  sc_makefile_check                    \
   sc_unmarked_diagnostics              \
-  sc_TAB_in_indentation                        \
   sc_prohibit_ctype_h                  \
   sc_prohibit_asprintf                 \
-  sc_m4_quote_check                    \
-  sc_prohibit_trailing_blank_lines     \
-  sc_avoid_ctype_macros                        \
-  sc_avoid_write                       \
-  sc_trailing_blank
+  sc_avoid_write
 
 # Avoid uses of write(2).  Either switch to streams (fwrite), or use
 # the safewrite wrapper.
@@ -107,10 +83,10 @@ sc_prohibit_ctype_h:
                1>&2; exit 1; } || :
 
 # Ensure that no C source file uses TABs for indentation.
+# Exclude some version-controlled symlinks.
 sc_TAB_in_indentation:
        @grep -lE '^ *  ' /dev/null                                     \
-            $$($(VC_LIST_EXCEPT)                                       \
-               | grep -E '\.[ch](\.in)?$$') &&                         \
+            $$($(VC_LIST_EXCEPT)) &&                                   \
          { echo '$(ME): found TAB(s) used for indentation in C sources;'\
              'use spaces' 1>&2; exit 1; } || :
 
@@ -124,21 +100,22 @@ sc_avoid_ctype_macros:
                1>&2; exit 1; } || :
 
 sc_prohibit_virBufferAdd_with_string_literal:
-       @re='\<virBufferAdd *\([^,]+, *"[^"]'                           \
-       msg='use virBufferAddLit, not virBufferAdd, with a string literal' \
-         $(_prohibit_regexp)
+       @prohibit='\<virBufferAdd *\([^,]+, *"[^"]'                     \
+       halt='use virBufferAddLit, not virBufferAdd, with a string literal' \
+         $(_sc_search_regexp)
 
 # Not only do they fail to deal well with ipv6, but the gethostby*
 # functions are also not thread-safe.
 sc_prohibit_gethostby:
-       @re='\<gethostby(addr|name2?) *\('                              \
-       msg='use getaddrinfo, not gethostby*'                           \
-         $(_prohibit_regexp)
+       @prohibit='\<gethostby(addr|name2?) *\('                        \
+       halt='use getaddrinfo, not gethostby*'                          \
+         $(_sc_search_regexp)
 
 # Disallow trailing blank lines.
 sc_prohibit_trailing_blank_lines:
-       @$(VC_LIST_EXCEPT) | xargs perl -ln -0777 -e                    \
-         '/\n\n+$$/ and print $$ARGV' > $@-t
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs perl -ln -0777 -e                                     \
+             '-f $$ARGV or next; /\n\n+$$/ and print $$ARGV' > $@-t
        @found=0; test -s $@-t && { found=1; cat $@-t 1>&2;             \
          echo '$(ME): found trailing blank line(s)' 1>&2; };           \
        rm -f $@-t;                                                     \
@@ -155,7 +132,9 @@ ifeq (0,$(MAKELEVEL))
   # submodule name.  Contrast these:
   # -b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib
   #  b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib (v0.0-2286-gb653eda)
-  _submodule_hash = sed 's/.//;s/ .*//'
+  # $ cat .git-module-status
+  # b653eda3ac4864de205419d9f41eec267cb89eeb
+  _submodule_hash = sed 's/^[ +-]//;s/ .*//'
   _update_required := $(shell                                          \
       actual=$$(git submodule status | $(_submodule_hash));            \
       stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)";      \