annotate Makefile @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14422
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
1 # GNU Makefile for gnulib central.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16991
diff changeset
2 # Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 #
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 # Copying and distribution of this file, with or without modification,
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 # in any medium, are permitted without royalty provided the copyright
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 # notice and this notice are preserved.
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7
14422
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
8 # This Makefile requires the use of GNU make. Some targets require
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
9 # that you have tools like git, makeinfo and cppi installed.
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
10
15320
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
11 # Required for the use of <(...) below.
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
12 SHELL=/bin/bash
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
13
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
14 # Produce some files that are not stored in the repository.
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 all:
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
17 # Produce the documentation in readable form.
11446
6d0f0ffb7658 Combine 4 Makefile rules.
Bruno Haible <bruno@clisp.org>
parents: 11445
diff changeset
18 info html dvi pdf:
6d0f0ffb7658 Combine 4 Makefile rules.
Bruno Haible <bruno@clisp.org>
parents: 11445
diff changeset
19 cd doc && $(MAKE) $@ && $(MAKE) mostlyclean
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
20
16235
18a38c9615f0 In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
21 # Collect the names of rules starting with 'sc_'.
14422
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
22 syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p'\
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
23 Makefile))
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
24
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 # Perform some platform independent checks on the gnulib code.
14422
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
26 check: $(syntax-check-rules)
12166
d943ffe46edc use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
Jim Meyering <meyering@redhat.com>
parents: 11446
diff changeset
27
d943ffe46edc use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
Jim Meyering <meyering@redhat.com>
parents: 11446
diff changeset
28 sc_prefer_ac_check_funcs_once:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
29 @if test -d .git; then \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
30 git grep -w -l AC_CHECK_FUNCS modules \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
31 && { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
32 in modules/ 1>&2; exit 1; } || : \
13270
f36dcb5c4dae build: avoid "make check" failure without .git/ directory
Ian Beckwith <ianb@erislabs.net>
parents: 12559
diff changeset
33 else :; fi
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
35 sc_prohibit_leading_TABs:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
36 @if test -d .git; then \
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
37 git grep -l '^ * ' lib m4 tests \
16086
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
38 | grep -Ev '^lib/reg|Makefile|test-update-copyright' \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
39 | grep . \
15338
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
40 && { printf '*** %s\n' 'indent with spaces, not TABs;' \
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
41 1>&2; exit 1; } || : \
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
42 else :; fi
03e2cd1cbbe8 maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents: 15320
diff changeset
43
13629
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
44 sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
45 @if test -d .git; then \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
46 url=http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/22874; \
13629
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
47 git grep '^[ ]*TESTS_ENVIRONMENT += PATH=' modules \
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
48 && { printf '%s\n' 'Do not augment PATH via TESTS_ENVIRONMENT;' \
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
49 " see <$$url>" 1>&2; exit 1; } || : \
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
50 else :; fi
978ed1b129fb tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents: 13270
diff changeset
51
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
52 # It's easy to forget the noise-suppressing "@" at the beginning
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
53 # of each sc_ rule. Check for it both in maint.mk and in this file.
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
54 sc_prohibit_sc_omitted_at:
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
55 @if test -d .git; then \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
56 git grep -n -A1 '^sc_[[:alnum:]_-]*:' top/maint.mk Makefile \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
57 | grep -vE ':sc_|[0-9][-] @|--$$' \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
58 | sed 's/-\([0-9][0-9]*\)-/:\1:/' \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
59 | grep . \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
60 && { printf '*** %s\n' 'oops; missing "@"' \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
61 1>&2; exit 1; } || : \
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
62 else :; fi
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
63
16296
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
64 # Run all maint.mk syntax-check tests on gnulib's sources.
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
65 sc_maint:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
66 @rm -f maint.mk; ln -s top/maint.mk maint.mk
16296
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
67 $(MAKE) -s srcdir=. gnulib_dir=. _build-aux=build-aux \
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
68 -f cfg.mk -f maint.mk syntax-check
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
69 rm -f maint.mk
daedf702e83c maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents: 16235
diff changeset
70
15263
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
71 # Files in m4/ that (exceptionally) may use AC_LIBOBJ.
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
72 # Do not include their ".m4" suffix.
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
73 allow_AC_LIBOBJ = \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
74 close \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
75 dprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
76 dup2 \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
77 faccessat \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
78 fchdir \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
79 fclose \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
80 fcntl \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
81 fprintf-posix \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
82 open \
15264
df803aaa6922 syntax-check: Fix typo.
Bruno Haible <bruno@clisp.org>
parents: 15263
diff changeset
83 printf-posix-rpl \
15263
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
84 snprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
85 sprintf-posix \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
86 stdio_h \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
87 vasnprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
88 vasprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
89 vdprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
90 vfprintf-posix \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
91 vprintf-posix \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
92 vsnprintf \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
93 vsprintf-posix
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
94
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
95 allow_AC_LIBOBJ_or := $(shell echo $(allow_AC_LIBOBJ) | tr -s ' ' '|')
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
96
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
97 sc_prohibit_AC_LIBOBJ_in_m4:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
98 @url=http://article.gmane.org/gmane.comp.lib.gnulib.bugs/26995; \
15263
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
99 if test -d .git; then \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
100 git ls-files m4 \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
101 | grep -Ev '^m4/($(allow_AC_LIBOBJ_or))\.m4$$' \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
102 | xargs grep '^ *AC_LIBOBJ(' \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
103 && { printf '%s\n' 'Do not use AC_LIBOBJ in m4/*.m4;' \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
104 "see <$$url>"; exit 1; } || :; \
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
105 else :; fi
a003200eb24e syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
Jim Meyering <meyering@redhat.com>
parents: 14422
diff changeset
106
13764
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
107 sc_pragma_columns:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
108 @if test -d .git; then \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
109 git ls-files|grep '\.in\.h$$' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
110 | xargs grep -l '^@PRAGMA_SYSTEM_HEADER@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
111 | xargs grep -L '^@PRAGMA_COLUMNS@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
112 | grep . \
13764
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
113 && { printf '%s\n' \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
114 'the files listed above use @PRAGMA_SYSTEM_HEADER@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
115 'without also using @PRAGMA_COLUMNS@' 1>&2; \
13764
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
116 exit 1; } || :; \
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
117 else :; fi
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
118
14381
6359f8b57ad2 maint: avoid any CDPATH issue
Eric Blake <eblake@redhat.com>
parents: 14380
diff changeset
119 # Verify that certain (for now, only Jim Meyering and Eric Blake's)
14382
c19d2aef45e7 maint: sc_cpp_indent_check: remove the "only in lib/" restriction
Jim Meyering <meyering@redhat.com>
parents: 14381
diff changeset
120 # *.c files are consistently cpp indented.
14379
2330aac2ae54 maint: adjust cpp indentation to reflect nesting depth
Jim Meyering <meyering@redhat.com>
parents: 14078
diff changeset
121 sc_cpp_indent_check:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
122 @./gnulib-tool --extract-filelist \
16086
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
123 $$(cd ./modules; grep -ilrE '(meyering|blake)' .) \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
124 | sort -u \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
125 | grep '\.c$$' \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
126 | grep -vE '/(stdio-(read|write)|getloadavg)\.c$$' \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
127 | xargs cppi -c
14379
2330aac2ae54 maint: adjust cpp indentation to reflect nesting depth
Jim Meyering <meyering@redhat.com>
parents: 14078
diff changeset
128
15320
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
129 # Ensure that the list of symbols checked for by the
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
130 # sc_prohibit_intprops_without_use rule match those in the actual file.
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
131 # Extract the symbols from the .h file and compare with the list of
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
132 # symbols extracted from the rule in maint.mk.
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
133 sc_check_sym_list:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
134 @i=lib/intprops.h; \
15320
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
135 diff -u <(perl -lne '/^# *define ([A-Z]\w+)\(/ and print $$1' $$i|fmt) \
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
136 <(sed -n /^_intprops_name/,/^_intprops_syms_re/p top/maint.mk \
16086
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
137 |sed '/^_/d;s/^ //;s/ *\\$$//')
15320
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
138
16085
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
139 # Ensure that the copyright statements in files and in the module descriptions
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
140 # are consistent.
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
141 sc_check_copyright:
16991
607ec89b7d97 maint: require that each sc_... command start with "@"
Jim Meyering <meyering@redhat.com>
parents: 16296
diff changeset
142 @./check-copyright
16085
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
143
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
144 # Regenerate some files that are stored in the repository.
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 regen: MODULES.html
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
146
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
147 # MODULES.html is periodically being generated and copied to the web pages at
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
148 # :ext:USER@cvs.savannah.gnu.org:/web/gnulib/gnulib/
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
149 # where it then appears at <http://www.gnu.org/software/gnulib/MODULES.html>.
7676
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 MODULES.html: MODULES.html.sh
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
151 ./MODULES.html.sh > MODULES.html
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
152
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
153 # Run this rule once per year (usually early in January)
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
154 # to update all FSF copyright year lists here.
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
155 # We exclude the files listed in srclist.txt (maintained elsewhere)
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
156 # as well as those in tests/unictype (generated).
14077
4f7569e0b4ec maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents: 14073
diff changeset
157 # Also exclude any file that includes the "GENERATED AUTOMATICALLY" comment,
4f7569e0b4ec maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents: 14073
diff changeset
158 # being careful not to exclude code that merely generates the comment.
14078
1a37c270d62d maint: update-copyright: exempt doc/INSTALL*
Jim Meyering <meyering@redhat.com>
parents: 14077
diff changeset
159 # Also exclude doc/INSTALL*, since they too are generated.
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
160 update-copyright:
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
161 exempt=$$(mktemp); \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
162 grep -v '^#' config/srclist.txt|grep -v '^$$' \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
163 | while read src dst; do \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
164 test -f "$$dst" && { echo "$$dst"; continue; }; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
165 test -d "$$dst" || continue; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
166 echo "$$dst"/$$(basename "$$src"); \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
167 done > $$exempt; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
168 git ls-files tests/unictype >> $$exempt; \
14078
1a37c270d62d maint: update-copyright: exempt doc/INSTALL*
Jim Meyering <meyering@redhat.com>
parents: 14077
diff changeset
169 git ls-files doc/INSTALL* >> $$exempt; \
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
170 git ls-files | grep -vFf $$exempt \
14077
4f7569e0b4ec maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents: 14073
diff changeset
171 | xargs grep -L '^/\*.*GENERATED AUTOMATICALLY' \
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
172 | UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
173 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
174 xargs build-aux/update-copyright