mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(ME): Don't use trick suggested in Make manual.
It doesn't work for make-3.79.1. Reported by Christian Krackowizer. (sc_system_h_headers): Another syntax check. (syntax-check-rules): Add it to the list.
This commit is contained in:
1 parent
bf7cca9996
commit
97d00fe836
1 file changed
+36
-2
+36
-2
@@ -19,7 +19,9 @@
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
# This is reported not to work with make-3.79.1
|
||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
ME := Makefile.maint
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
GZIP_ENV = '--no-name --best'
|
||||
@@ -67,7 +69,8 @@ syntax-check-rules = \
|
||||
sc_space_tab \
|
||||
sc_error_exit_success \
|
||||
sc_xalloc_h_in_src \
|
||||
sc_changelog
|
||||
sc_changelog \
|
||||
sc_system_h_headers
|
||||
|
||||
syntax-check: $(syntax-check-rules)
|
||||
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \
|
||||
@@ -132,6 +135,37 @@ sc_changelog:
|
||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
header_regexp = \
|
||||
alloca\
|
||||
|closeout\
|
||||
|ctype\
|
||||
|dirent\
|
||||
|errno\
|
||||
|fcntl\
|
||||
|inttypes\
|
||||
|limits\
|
||||
|locale\
|
||||
|pathmax\
|
||||
|std(lib|bool)\
|
||||
|string\
|
||||
|sys/(stat|dir|time)\
|
||||
|time\
|
||||
|unistd\
|
||||
|utime\
|
||||
|version-etc\
|
||||
|xalloc
|
||||
h_re := $(shell echo '$(header_regexp)'|tr -d ' ')
|
||||
|
||||
# Files in src/ should not include directly any of
|
||||
# the headers already included via system.h.
|
||||
# Get list of candidates with this:
|
||||
# grep -h include src/sys*.h|sed 's/.*include //'|sort -
|
||||
sc_system_h_headers:
|
||||
@grep -E '^# *include ["<]($(h_re))\.h[">]' \
|
||||
$(srcdir)/src/*.c && \
|
||||
{ echo '$(ME): the above are already included via system.h' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Ensure that date's --help output stays in sync with the info
|
||||
# documentation for GNU strftime. The only exception is %N,
|
||||
# which date accepts but GNU strftime does not.
|
||||
|
||||
Reference in new issue
Block a user