|
Packit |
a07778 |
# Customize Makefile.maint. -*- makefile -*-
|
|
Packit |
a07778 |
# Copyright (C) 2008-2011 Red Hat, Inc.
|
|
Packit |
a07778 |
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# This program is free software: you can redistribute it and/or modify
|
|
Packit |
a07778 |
# it under the terms of the GNU General Public License as published by
|
|
Packit |
a07778 |
# the Free Software Foundation, either version 3 of the License, or
|
|
Packit |
a07778 |
# (at your option) any later version.
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# This program is distributed in the hope that it will be useful,
|
|
Packit |
a07778 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
a07778 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
a07778 |
# GNU General Public License for more details.
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# You should have received a copy of the GNU General Public License
|
|
Packit |
a07778 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# Tests not to run as part of "make distcheck".
|
|
Packit |
a07778 |
local-checks-to-skip = \
|
|
Packit |
a07778 |
changelog-check \
|
|
Packit |
a07778 |
makefile-check \
|
|
Packit |
a07778 |
makefile_path_separator_check \
|
|
Packit |
a07778 |
patch-check \
|
|
Packit |
a07778 |
sc_GPL_version \
|
|
Packit |
a07778 |
sc_always_defined_macros \
|
|
Packit |
a07778 |
sc_cast_of_alloca_return_value \
|
|
Packit |
a07778 |
sc_cross_check_PATH_usage_in_tests \
|
|
Packit |
a07778 |
sc_dd_max_sym_length \
|
|
Packit |
a07778 |
sc_error_exit_success \
|
|
Packit |
a07778 |
sc_file_system \
|
|
Packit |
a07778 |
sc_immutable_NEWS \
|
|
Packit |
a07778 |
sc_makefile_path_separator_check \
|
|
Packit |
a07778 |
sc_obsolete_symbols \
|
|
Packit |
a07778 |
sc_prohibit_always_true_header_tests \
|
|
Packit |
a07778 |
sc_prohibit_S_IS_definition \
|
|
Packit |
a07778 |
sc_prohibit_atoi_atof \
|
|
Packit |
a07778 |
sc_prohibit_hash_without_use \
|
|
Packit |
a07778 |
sc_prohibit_jm_in_m4 \
|
|
Packit |
a07778 |
sc_prohibit_quote_without_use \
|
|
Packit |
a07778 |
sc_prohibit_quotearg_without_use \
|
|
Packit |
a07778 |
sc_prohibit_stat_st_blocks \
|
|
Packit |
a07778 |
sc_root_tests \
|
|
Packit |
a07778 |
sc_space_tab \
|
|
Packit |
a07778 |
sc_sun_os_names \
|
|
Packit |
a07778 |
sc_system_h_headers \
|
|
Packit |
a07778 |
sc_texinfo_acronym \
|
|
Packit |
a07778 |
sc_tight_scope \
|
|
Packit |
a07778 |
sc_two_space_separator_in_usage \
|
|
Packit |
a07778 |
sc_error_message_uppercase \
|
|
Packit |
a07778 |
sc_program_name \
|
|
Packit |
a07778 |
sc_require_test_exit_idiom \
|
|
Packit |
a07778 |
sc_makefile_check \
|
|
Packit |
a07778 |
sc_useless_cpp_parens
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# Files that should never cause syntax check failures.
|
|
Packit |
a07778 |
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
|
Packit |
a07778 |
(^HACKING|\.po|maint.mk)$$
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# Functions like free() that are no-ops on NULL arguments.
|
|
Packit |
a07778 |
useless_free_options = \
|
|
Packit |
a07778 |
--name=g_free \
|
|
Packit |
a07778 |
--name=xmlBufferFree \
|
|
Packit |
a07778 |
--name=xmlFree \
|
|
Packit |
a07778 |
--name=xmlFreeDoc \
|
|
Packit |
a07778 |
--name=xmlXPathFreeContext \
|
|
Packit |
a07778 |
--name=xmlXPathFreeObject
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# Ensure that no C source file, docs, or rng schema uses TABs for
|
|
Packit |
a07778 |
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
|
|
Packit |
a07778 |
# files in gnulib, since they're imported.
|
|
Packit |
a07778 |
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)
|
|
Packit |
a07778 |
sc_TAB_in_indentation:
|
|
Packit |
a07778 |
@prohibit='^ * ' \
|
|
Packit |
a07778 |
in_vc_files='$(space_indent_files)$$' \
|
|
Packit |
a07778 |
halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
|
|
Packit |
a07778 |
$(_sc_search_regexp)
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# G_GNUC_UNUSED should only be applied in implementations, not
|
|
Packit |
a07778 |
# header declarations
|
|
Packit |
a07778 |
sc_avoid_attribute_unused_in_header:
|
|
Packit |
a07778 |
@prohibit='^[^#]*G_GNUC_UNUSED([^:]|$$)' \
|
|
Packit |
a07778 |
in_vc_files='\.h$$' \
|
|
Packit |
a07778 |
halt='use G_GNUC_UNUSED in .c rather than .h files' \
|
|
Packit |
a07778 |
$(_sc_search_regexp)
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# Enforce recommended preprocessor indentation style.
|
|
Packit |
a07778 |
sc_preprocessor_indentation:
|
|
Packit |
a07778 |
@if cppi --version >/dev/null 2>&1; then \
|
|
Packit |
a07778 |
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|
|
Packit |
a07778 |
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
|
Packit |
a07778 |
exit 1; }; \
|
|
Packit |
a07778 |
else \
|
|
Packit |
a07778 |
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
|
Packit |
a07778 |
fi
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
sc_copyright_format:
|
|
Packit |
a07778 |
@require='Copyright .*Red 'Hat', Inc\.' \
|
|
Packit |
a07778 |
containing='Copyright .*Red 'Hat \
|
|
Packit |
a07778 |
halt='Red Hat copyright is missing Inc.' \
|
|
Packit |
a07778 |
$(_sc_search_regexp)
|
|
Packit |
a07778 |
@prohibit='Copyright [^(].*Red 'Hat \
|
|
Packit |
a07778 |
halt='consistently use (C) in Red Hat copyright' \
|
|
Packit |
a07778 |
$(_sc_search_regexp)
|
|
Packit |
a07778 |
@prohibit='\<Red''Hat\>' \
|
|
Packit |
a07778 |
halt='spell Red Hat as two words' \
|
|
Packit |
a07778 |
$(_sc_search_regexp)
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# We don't use this feature of maint.mk.
|
|
Packit |
a07778 |
prev_version_file = /dev/null
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
exclude_file_name_regexp--sc_bindtextdomain = ^(libvirt-gconfig/tests|examples)/|libvirt-glib/libvirt-glib-event.c|libvirt-glib/libvirt-glib-main.c|tests/
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
exclude_file_name_regexp--sc_preprocessor_indentation = ^*/*.[ch]
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
exclude_file_name_regexp--sc_prohibit_strcmp = ^*/*.[ch]
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
# XXX we shouldn't really ignore this, but the horrible enum rules...
|
|
Packit |
a07778 |
exclude_file_name_regexp--sc_makefile_at_at_check = libvirt-gobject/Makefile.am
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
exclude_file_name_regexp--sc_unmarked_diagnostics = tap-driver\.sh
|