Mercurial > gnulib
annotate Makefile @ 14078:1a37c270d62d
maint: update-copyright: exempt doc/INSTALL*
* Makefile (update-copyright): Also exclude doc/INSTALL*,
since they are generated. Suggested by Bruno Haible.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sat, 01 Jan 2011 22:09:12 +0100 |
parents | 4f7569e0b4ec |
children | 2330aac2ae54 |
rev | line source |
---|---|
7676
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 # 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 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
8 # 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
|
9 all: |
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
11 # Produce the documentation in readable form. |
11446 | 12 info html dvi pdf: |
13 cd doc && $(MAKE) $@ && $(MAKE) mostlyclean | |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
14 |
7676
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 # Perform some platform independent checks on the gnulib code. |
13629
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
16 check: \ |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
17 sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT \ |
13764
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
18 sc_pragma_columns \ |
13629
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
19 sc_prefer_ac_check_funcs_once |
12166
d943ffe46edc
use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
Jim Meyering <meyering@redhat.com>
parents:
11446
diff
changeset
|
20 |
d943ffe46edc
use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
Jim Meyering <meyering@redhat.com>
parents:
11446
diff
changeset
|
21 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
|
22 if test -d .git; then \ |
14072
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
23 git grep -w -l AC_CHECK_FUNCS modules \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
24 && { 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
|
25 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
|
26 else :; fi |
7676
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
13629
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
28 sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT: |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
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 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
|
31 git grep '^[ ]*TESTS_ENVIRONMENT += PATH=' modules \ |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
32 && { 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
|
33 " see <$$url>" 1>&2; exit 1; } || : \ |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
34 else :; fi |
978ed1b129fb
tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
Jim Meyering <meyering@redhat.com>
parents:
13270
diff
changeset
|
35 |
13764
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
36 sc_pragma_columns: |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
37 if test -d .git; then \ |
14072
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
38 git ls-files|grep '\.in\.h$$' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
39 | xargs grep -l '^@PRAGMA_SYSTEM_HEADER@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
40 | xargs grep -L '^@PRAGMA_COLUMNS@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
41 | grep . \ |
13764
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
42 && { printf '%s\n' \ |
14072
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
43 'the files listed above use @PRAGMA_SYSTEM_HEADER@' \ |
bf28887b2e63
maint: indent with TABs in Makefile
Jim Meyering <meyering@redhat.com>
parents:
13764
diff
changeset
|
44 '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
|
45 exit 1; } || :; \ |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
46 else :; fi |
700531ee17e0
tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
Jim Meyering <meyering@redhat.com>
parents:
13629
diff
changeset
|
47 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
48 # 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
|
49 regen: MODULES.html |
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 |
11445
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
51 # 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
|
52 # :ext:USER@cvs.savannah.gnu.org:/web/gnulib/gnulib/ |
66a365760f8b
Add targets for the documentation.
Bruno Haible <bruno@clisp.org>
parents:
7676
diff
changeset
|
53 # 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
|
54 MODULES.html: MODULES.html.sh |
13576b82f3d4
Beginnings of a Makefile for the gnulib maintainers.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 ./MODULES.html.sh > MODULES.html |
14073
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
56 |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
57 # 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
|
58 # 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
|
59 # 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
|
60 # 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
|
61 # 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
|
62 # 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
|
63 # 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
|
64 update-copyright: |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
65 exempt=$$(mktemp); \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
66 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
|
67 | while read src dst; do \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
68 test -f "$$dst" && { echo "$$dst"; continue; }; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
69 test -d "$$dst" || continue; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
70 echo "$$dst"/$$(basename "$$src"); \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
71 done > $$exempt; \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
72 git ls-files tests/unictype >> $$exempt; \ |
14078
1a37c270d62d
maint: update-copyright: exempt doc/INSTALL*
Jim Meyering <meyering@redhat.com>
parents:
14077
diff
changeset
|
73 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
|
74 git ls-files | grep -vFf $$exempt \ |
14077
4f7569e0b4ec
maint: refine the update-copyright rule
Jim Meyering <meyering@redhat.com>
parents:
14073
diff
changeset
|
75 | xargs grep -L '^/\*.*GENERATED AUTOMATICALLY' \ |
14073
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
76 | UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
77 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ |
79c76e53668c
maint: new rule to update copyright year ranges
Jim Meyering <meyering@redhat.com>
parents:
14072
diff
changeset
|
78 xargs build-aux/update-copyright |