# Customize Makefile.maint. -*- makefile -*- # Copyright (C) 2003-2012 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Use alpha.gnu.org for alpha and beta releases. # Use ftp.gnu.org for major releases. gnu_ftp_host-alpha = alpha.gnu.org gnu_ftp_host-beta = alpha.gnu.org gnu_ftp_host-major = ftp.gnu.org gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) url_dir_list = \ ftp://$(gnu_rel_host)/gnu/coreutils # Exclude some filenames. exclude_file_name_regexp--sc_bindtextdomain = ^(daemon|erlang|examples|tests)/ exclude_file_name_regexp--sc_error_message_period = ^php/ exclude_file_name_regexp--sc_prohibit_always-defined_macros = ^examples/ exclude_file_name_regexp--sc_prohibit_doubled_word = ^po/ exclude_file_name_regexp--sc_prohibit_magic_number_exit = ^(po|po-docs)/|\.pod$ exclude_file_name_regexp--sc_prohibit_strcmp = ^examples/ exclude_file_name_regexp--sc_prohibit_strcmp_and_strncmp = ^examples/ exclude_file_name_regexp--sc_prohibit_strncpy = ^src/launch-.*\.c$ exclude_file_name_regexp--sc_require_config_h = ^examples/|^tests/c-api/test-just-header\.c$ # Tests not to run as part of "make distcheck". local-checks-to-skip = \ sc_po_check \ sc_GPL_version \ sc_error_exit_success \ sc_file_system \ sc_makefile_path_separator_check \ sc_obsolete_symbols \ sc_prohibit_atoi_atof \ sc_prohibit_quote_without_use \ sc_prohibit_quotearg_without_use \ sc_prohibit_stat_st_blocks \ sc_space_tab \ sc_two_space_separator_in_usage \ sc_error_message_uppercase \ sc_program_name \ $(disable_temporarily) \ sc_useless_cpp_parens \ sc_cast_of_argument_to_free disable_temporarily = \ sc_makefile_check \ sc_unmarked_diagnostics \ sc_prohibit_ctype_h \ sc_prohibit_asprintf \ sc_avoid_write # Avoid uses of write(2). Either switch to streams (fwrite), or use # the safewrite wrapper. sc_avoid_write: @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ grep '\&2; exit 1; } || :; \ else :; \ fi # Use STREQ rather than comparing strcmp == 0, or != 0. # Similarly, use STREQLEN or STRPREFIX rather than strncmp. sc_prohibit_strcmp_and_strncmp: @grep -nE '! *strn?cmp *\(|\&2; exit 1; } || : # Use virAsprintf rather than a'sprintf since *strp is undefined on error. sc_prohibit_asprintf: @re='\<[a]sprintf\>' \ msg='use virAsprintf, not a'sprintf \ $(_prohibit_regexp) # Prohibit the inclusion of . sc_prohibit_ctype_h: @grep -E '^# *include *' $$($(VC_LIST_EXCEPT)) && \ { echo "$(ME): don't use ctype.h; instead, use c-ctype.h" \ 1>&2; exit 1; } || : ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\ |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper sc_avoid_ctype_macros: @grep -E '\b($(ctype_re)) *\(' /dev/null \ $$($(VC_LIST_EXCEPT)) && \ { echo "$(ME): don't use ctype macros (use c-ctype.h)" \ 1>&2; exit 1; } || : sc_prohibit_virBufferAdd_with_string_literal: @prohibit='\