annotate Makefile @ 16157:2f911f94bb4f

bootstrap: detect tools required by gnulib-tool List tools needed by gnulib-tool, whether or not the project also requires the tools in cfg.mk $buildreq. In particular, detect if the project uses gnulib-local diffs, in which case patch is a prerequisite. * build-aux/bootstrap (buildreq): Provide minimum implicit dependencies. * DEPENDENCIES: Mention patch as a prereq. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Wed, 07 Dec 2011 09:51:21 -0700
parents a018273bd5a8
children 8250f2777afc
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.
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
2 # Copyright (C) 2006, 2009-2011 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
14422
e29883807ecf Makefile: rely on GNU make; derive syntax-check rule names
Jim Meyering <meyering@redhat.com>
parents: 14382
diff changeset
21 # Collect the names of rules starting with `sc_'.
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
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
52 # 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
53 # 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
54 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
55 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
56 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
57 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
58 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
59 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
60 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
61 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
62 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
63 open \
15264
df803aaa6922 syntax-check: Fix typo.
Bruno Haible <bruno@clisp.org>
parents: 15263
diff changeset
64 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
65 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
66 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
67 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
68 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
69 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
70 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
71 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
72 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
73 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
74 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
75
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 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
77
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 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
79 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
80 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
81 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
82 | 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
83 | 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
84 && { 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
85 "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
86 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
87
13764
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
88 sc_pragma_columns:
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
89 if test -d .git; then \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
90 git ls-files|grep '\.in\.h$$' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
91 | xargs grep -l '^@PRAGMA_SYSTEM_HEADER@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
92 | xargs grep -L '^@PRAGMA_COLUMNS@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
93 | grep . \
13764
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
94 && { printf '%s\n' \
14072
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
95 'the files listed above use @PRAGMA_SYSTEM_HEADER@' \
bf28887b2e63 maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents: 13764
diff changeset
96 '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
97 exit 1; } || :; \
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
98 else :; fi
700531ee17e0 tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents: 13629
diff changeset
99
14381
6359f8b57ad2 maint: avoid any CDPATH issue
Eric Blake <eblake@redhat.com>
parents: 14380
diff changeset
100 # 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
101 # *.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
102 sc_cpp_indent_check:
14380
5cee7a3cd6ca maint: adjust cpp indentation for my modules, as well
Eric Blake <eblake@redhat.com>
parents: 14379
diff changeset
103 ./gnulib-tool --extract-filelist \
16086
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
104 $$(cd ./modules; grep -ilrE '(meyering|blake)' .) \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
105 | sort -u \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
106 | grep '\.c$$' \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
107 | grep -vE '/(stdio-(read|write)|getloadavg)\.c$$' \
a018273bd5a8 Makefile: Tweak indentation.
Bruno Haible <bruno@clisp.org>
parents: 16085
diff changeset
108 | xargs cppi -c
14379
2330aac2ae54 maint: adjust cpp indentation to reflect nesting depth
Jim Meyering <meyering@redhat.com>
parents: 14078
diff changeset
109
15320
15f2ff83a46c syntax-check: keep one maint.mk rule in sync with its header
Jim Meyering <meyering@redhat.com>
parents: 15264
diff changeset
110 # 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
111 # 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
112 # 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
113 # 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
114 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
115 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
116 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
117 <(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
118 |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
119
16085
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
120 # 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
121 # are consistent.
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
122 sc_check_copyright:
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
123 ./check-copyright
a4c68ff22172 Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents: 15377
diff changeset
124
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
125 # 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
126 regen: MODULES.html
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127
11445
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
128 # 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
129 # :ext:USER@cvs.savannah.gnu.org:/web/gnulib/gnulib/
66a365760f8b Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents: 7676
diff changeset
130 # 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
131 MODULES.html: MODULES.html.sh
13576b82f3d4 Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 ./MODULES.html.sh > MODULES.html
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
133
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
134 # 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
135 # 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
136 # 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
137 # 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
138 # 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
139 # 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
140 # 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
141 update-copyright:
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
142 exempt=$$(mktemp); \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
143 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
144 | while read src dst; do \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
145 test -f "$$dst" && { echo "$$dst"; continue; }; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
146 test -d "$$dst" || continue; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
147 echo "$$dst"/$$(basename "$$src"); \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
148 done > $$exempt; \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
149 git ls-files tests/unictype >> $$exempt; \
14078
1a37c270d62d maint: update-copyright: exempt doc/INSTALL*
Jim Meyering <meyering@redhat.com>
parents: 14077
diff changeset
150 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
151 git ls-files | grep -vFf $$exempt \
14077
4f7569e0b4ec maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents: 14073
diff changeset
152 | xargs grep -L '^/\*.*GENERATED AUTOMATICALLY' \
14073
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
153 | UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
154 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
79c76e53668c maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents: 14072
diff changeset
155 xargs build-aux/update-copyright