Mercurial > gnulib
annotate Makefile @ 16296:daedf702e83c
maint: add framework to run syntax-check rules against gnulib sources
* cfg.mk: New file, to disable all currently-failing tests.
We'll enable them one by one, as they are made to pass.
* Makefile (sc_maint): New rule.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 17 Jan 2012 17:51:40 +0100 |
parents | 18a38c9615f0 |
children | 607ec89b7d97 |
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. |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
16086
diff
changeset
|
2 # Copyright (C) 2006, 2009-2012 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 | 18 info html dvi pdf: |
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: |
13270
f36dcb5c4dae
build: avoid "make check" failure without .git/ directory
Ian Beckwith <ianb@erislabs.net>
parents:
12559
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: |
03e2cd1cbbe8
maint: indent with spaces, not TABs, and add a rule to check this
Jim Meyering <meyering@redhat.com>
parents:
15320
diff
changeset
|
36 if test -d .git; then \ |
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: |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
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 |
16296
daedf702e83c
maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents:
16235
diff
changeset
|
52 # 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
|
53 sc_maint: |
daedf702e83c
maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents:
16235
diff
changeset
|
54 rm -f maint.mk; ln -s top/maint.mk maint.mk |
daedf702e83c
maint: add framework to run syntax-check rules against gnulib sources
Jim Meyering <meyering@redhat.com>
parents:
16235
diff
changeset
|
55 $(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
|
56 -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
|
57 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
|
58 |
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
|
59 # 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
|
60 # 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
|
61 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
|
62 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
|
63 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
|
64 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
|
65 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
|
66 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
|
67 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
|
68 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
|
69 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
|
70 open \ |
15264 | 71 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
|
72 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
|
73 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
|
74 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
|
75 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
|
76 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
|
77 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
|
78 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
|
79 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
|
80 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
|
81 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
|
82 |
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
|
83 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
|
84 |
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 sc_prohibit_AC_LIBOBJ_in_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
|
86 url=http://article.gmane.org/gmane.comp.lib.gnulib.bugs/26995; \ |
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 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
|
88 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
|
89 | 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
|
90 | 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
|
91 && { 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
|
92 "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
|
93 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
|
94 |
13764
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
95 sc_pragma_columns: |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
96 if test -d .git; then \ |
14072
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
97 git ls-files|grep '\.in\.h$$' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
98 | xargs grep -l '^@PRAGMA_SYSTEM_HEADER@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
99 | xargs grep -L '^@PRAGMA_COLUMNS@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
100 | grep . \ |
13764
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
101 && { printf '%s\n' \ |
14072
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
102 'the files listed above use @PRAGMA_SYSTEM_HEADER@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
103 '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
|
104 exit 1; } || :; \ |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
105 else :; fi |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
106 |
14381
6359f8b57ad2
maint: avoid any CDPATH issue
Eric Blake <eblake@redhat.com>
parents:
14380
diff
changeset
|
107 # 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
|
108 # *.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
|
109 sc_cpp_indent_check: |
14380
5cee7a3cd6ca
maint: adjust cpp indentation for my modules, as well
Eric Blake <eblake@redhat.com>
parents:
14379
diff
changeset
|
110 ./gnulib-tool --extract-filelist \ |
16086
a018273bd5a8
Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents:
16085
diff
changeset
|
111 $$(cd ./modules; grep -ilrE '(meyering|blake)' .) \ |
a018273bd5a8
Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents:
16085
diff
changeset
|
112 | sort -u \ |
a018273bd5a8
Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents:
16085
diff
changeset
|
113 | grep '\.c$$' \ |
a018273bd5a8
Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents:
16085
diff
changeset
|
114 | grep -vE '/(stdio-(read|write)|getloadavg)\.c$$' \ |
a018273bd5a8
Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents:
16085
diff
changeset
|
115 | xargs cppi -c |
14379
2330aac2ae54
maint: adjust cpp indentation to reflect nesting depth
Jim Meyering <meyering@redhat.com>
parents:
14078
diff
changeset
|
116 |
15320
15f2ff83a46c
syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents:
15264
diff
changeset
|
117 # 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
|
118 # 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
|
119 # 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
|
120 # 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
|
121 sc_check_sym_list: |
15f2ff83a46c
syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents:
15264
diff
changeset
|
122 i=lib/intprops.h; \ |
15f2ff83a46c
syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents:
15264
diff
changeset
|
123 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
|
124 <(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
|
125 |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
|
126 |
16085
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
15377
diff
changeset
|
127 # 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
|
128 # are consistent. |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
15377
diff
changeset
|
129 sc_check_copyright: |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
15377
diff
changeset
|
130 ./check-copyright |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
15377
diff
changeset
|
131 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
132 # 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
|
133 regen: MODULES.html |
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
134 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
135 # 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
|
136 # :ext:USER@cvs.savannah.gnu.org:/web/gnulib/gnulib/ |
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
137 # 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
|
138 MODULES.html: MODULES.html.sh |
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
139 ./MODULES.html.sh > MODULES.html |
14073
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
140 |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
141 # 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
|
142 # 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
|
143 # 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
|
144 # 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
|
145 # 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
|
146 # 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
|
147 # 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
|
148 update-copyright: |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
149 exempt=$$(mktemp); \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
150 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
|
151 | while read src dst; do \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
152 test -f "$$dst" && { echo "$$dst"; continue; }; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
153 test -d "$$dst" || continue; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
154 echo "$$dst"/$$(basename "$$src"); \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
155 done > $$exempt; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
156 git ls-files tests/unictype >> $$exempt; \ |
14078
1a37c270d62d
maint: update-copyright: exempt doc/INSTALL*
Jim Meyering <meyering@redhat.com>
parents:
14077
diff
changeset
|
157 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
|
158 git ls-files | grep -vFf $$exempt \ |
14077
4f7569e0b4ec
maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents:
14073
diff
changeset
|
159 | xargs grep -L '^/\*.*GENERATED AUTOMATICALLY' \ |
14073
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
160 | UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
161 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
162 xargs build-aux/update-copyright |