2 # This Makefile fragment is intended to be useful by any GNU-like project.
3 # This file originate from coreutils, CPPI, Bison, and Autoconf.
5 ## Copyright (C) 2001-2006 Free Software Foundation, Inc.
7 ## This program is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2, or (at your option)
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program; if not, write to the Free Software
19 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # List of all C-like source code files that will be tested for
23 # stylistic "errors". You may want to define this to something
24 # more complex in Makefile.cfg.
25 C_SOURCES ?= $(shell find . -name '*.[chly]')
27 # Add some more files to check, typically set in Makefile.cfg.
28 C_SOURCES += $(C_SOURCES_ADD)
30 # Do not save the original name or timestamp in the .tar.gz file.
31 # Use --rsyncable if available.
33 $(shell gzip --help|grep rsyncable >/dev/null && echo --rsyncable)
34 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
36 # Prevent programs like 'sort' from considering distinct strings to be equal.
37 # Doing it here saves us from having to set LC_ALL elsewhere in this file.
40 # Casting arguments to free is never necessary.
41 sc_cast_of_argument_to_free:
42 @grep -nE '\<free *\( *\(' $(C_SOURCES) && \
43 { echo '$(ME): don'\''t cast free argument' 1>&2; \