]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(header-check): New rule.
authorJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 20:03:59 +0000 (20:03 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 20:03:59 +0000 (20:03 +0000)
(local-check): Add header-check.

Makefile.maint

index c4a7594655b98000e66088b18bafc910c5bf3718..1b68a1bd29787c6091c229f2b6d34fc333c18b9c 100644 (file)
@@ -55,13 +55,23 @@ release_archive_dir ?= ../release
 # new ChangeLog entries.
 local-check = \
   ac-check po-check copyright-check writable-files m4-check author_mark_check \
-  changelog-check strftime-check
+  changelog-check strftime-check header-check
 .PHONY: $(local-check)
 
+# Make sure C source files in src/ don't include xalloc.h directly,
+# since they all already include it via sys2.h.
+# It's not a big deal -- just aesthetics.
+header-check:
+       if test -f $(srcdir)/src/sys2.h; then                           \
+         grep 'xalloc\.h' $(srcdir)/src/*.c || exit 1;                 \
+       fi
+
+# Ensure that date's --help output stays in sync with the info
+# documentation for GNU strftime.
 extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
 strftime-check:
-       if test -f $(srcdir)/date.c; then                               \
-         grep '^  %.  ' $(srcdir)/date.c | sort                        \
+       if test -f $(srcdir)/src/date.c; then                           \
+         grep '^  %.  ' $(srcdir)/src/date.c | sort                    \
            | $(extract_char) > $@-src;                                 \
          info libc date calendar format | sort | grep '^    `%.'\'     \
            | $(extract_char) > $@-info;                                \