annotate top/maint.mk @ 11406:ae9bcb808cfd

maint.mk: really add $(AM_MAKEFLAGS) * top/maint.mk (init-coverage, build-coverage): `$(AM_MAKEFLAGS)' was inadvertently omitted in the last commit. Spotted by Bruno Haible. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
author Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
date Sat, 14 Mar 2009 18:28:47 +0100
parents 8afa6e20fba1
children 65ab7e6dcafe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
1 # -*-Makefile-*-
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
2 # This Makefile fragment is intended to be useful by any GNU-like project.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
3 # This file originate from coreutils, CPPI, Bison, and Autoconf.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
4
11405
8afa6e20fba1 maint.mk: use $(MAKE) $(AM_MAKEFLAGS) not make
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 10865
diff changeset
5 # Copyright (C) 2001-2009 Free Software Foundation, Inc.
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
6 #
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
7 # This program is free software; you can redistribute it and/or modify
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
9 # the Free Software Foundation; either version 3 of the License,
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
10 # or (at your option) any later version.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
11 #
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful,
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
15 # GNU General Public License for more details.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
16 #
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
19
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
20 ME := maint.mk
10865
4e1b88600ad7 fix sed script reading maint.mk
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 10828
diff changeset
21 MYSELF := $(srcdir)/$(ME)
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
22
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
23 # List of all C-like source code files that will be tested for
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 9811
diff changeset
24 # stylistic "errors". You may want to define this to something
10368
36c242cddd06 maint.mk: adjust to file name change
Jose E. Marchesi <jemarch@gnu.org>
parents: 10095
diff changeset
25 # more complex in cfg.mk.
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
26 C_SOURCES ?= $(shell find . -name '*.[chly]')
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
27
10368
36c242cddd06 maint.mk: adjust to file name change
Jose E. Marchesi <jemarch@gnu.org>
parents: 10095
diff changeset
28 # Add some more files to check, typically set in cfg.mk.
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
29 C_SOURCES += $(C_SOURCES_ADD)
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
30
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
31 # Do not save the original name or timestamp in the .tar.gz file.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
32 # Use --rsyncable if available.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
33 gzip_rsyncable := \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
34 $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
35 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
36
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
37 # Prevent programs like 'sort' from considering distinct strings to be equal.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
38 # Doing it here saves us from having to set LC_ALL elsewhere in this file.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
39 export LC_ALL = C
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
40
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
41 # Casting arguments to free is never necessary.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
42 sc_cast_of_argument_to_free:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
43 @grep -nE '\<free *\( *\(' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
44 { echo '$(ME): don'\''t cast free argument' 1>&2; \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
45 exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
46
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
47 sc_cast_of_x_alloc_return_value:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
48 @grep -nE '\*\) *x(m|c|re)alloc\>' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
49 { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
50 exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
51
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
52 sc_cast_of_alloca_return_value:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
53 @grep -nE '\*\) *alloca\>' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
54 { echo '$(ME): don'\''t cast alloca return value' 1>&2; \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
55 exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
56
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
57 sc_space_tab:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
58 @grep -n '[ ] ' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
59 { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
60 1>&2; exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
61
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
62 # Don't use the old ato* functions in `real' code.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
63 # They provide no error checking mechanism.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
64 # Instead, use strto* functions.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
65 sc_prohibit_atoi_atof:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
66 @grep -nE '\<ato([filq]|ll)\>' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
67 { echo '$(ME): do not use ato''f, ato''i, ato''l, ato''ll, or ato''q' \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
68 1>&2; exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
69
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
70 # Using EXIT_SUCCESS as the first argument to error is misleading,
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
71 # since when that parameter is 0, error does not exit. Use `0' instead.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
72 sc_error_exit_success:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
73 @grep -nF 'error (EXIT_SUCCESS,' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
74 { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
75 exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
76
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
77 # Stylistic, use #ifdef instead of #if
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
78 sc_no_if_have_config_h:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
79 @grep -n '^# *if HAVE_CONFIG_H' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
80 { echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
81 1>&2; exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
82
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
83 # Prohibit the inclusion of assert.h without an actual use of assert.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
84 sc_prohibit_assert_without_use:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
85 @files=$$(grep -l '# *include [<"]assert\.h[>"]' $(C_SOURCES) \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
86 | grep '\.[cy]$$') && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
87 grep -L '\<assert (' $$files \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
88 | grep . && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
89 { echo "$(ME): the above files include <assert.h> but don't use it" \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
90 1>&2; exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
91
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
92 sc_obsolete_symbols:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
93 @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' $(C_SOURCES) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
94 { echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
95 1>&2; exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
96
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
97 # Each nonempty line must start with a year number, or a TAB.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
98 sc_changelog:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
99 @grep -n '^[^12 ]' $$(find . -name ChangeLog) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
100 { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
101 exit 1; } || :
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
102
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
103 # Collect the names of rules starting with `sc_'.
10865
4e1b88600ad7 fix sed script reading maint.mk
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 10828
diff changeset
104 syntax-check-rules := \
4e1b88600ad7 fix sed script reading maint.mk
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 10828
diff changeset
105 $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(MYSELF))
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
106 .PHONY: $(syntax-check-rules)
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
107
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
108 syntax-check: $(syntax-check-rules)
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
109
10738
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
110 # Code Coverage
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
111
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
112 init-coverage:
11406
ae9bcb808cfd maint.mk: really add $(AM_MAKEFLAGS)
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11405
diff changeset
113 $(MAKE) $(AM_MAKEFLAGS) clean
10738
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
114 lcov --directory . --zerocounters
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
115
10757
0affc3e42aa9 maint.mk: Use --coverage.
Simon Josefsson <simon@josefsson.org>
parents: 10738
diff changeset
116 COVERAGE_CCOPTS ?= "-g --coverage"
10738
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
117 COVERAGE_OUT ?= doc/coverage
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
118
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
119 build-coverage:
11406
ae9bcb808cfd maint.mk: really add $(AM_MAKEFLAGS)
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11405
diff changeset
120 $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
ae9bcb808cfd maint.mk: really add $(AM_MAKEFLAGS)
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11405
diff changeset
121 $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
10738
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
122 mkdir -p $(COVERAGE_OUT)
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
123 lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
124 --capture
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
125
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
126 gen-coverage:
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
127 genhtml --output-directory $(COVERAGE_OUT) \
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
128 $(COVERAGE_OUT)/$(PACKAGE).info \
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
129 --highlight --frames --legend \
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
130 --title "$(PACKAGE_NAME)"
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
131
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
132 coverage: init-coverage build-coverage gen-coverage
af888e12d10d top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
Simon Josefsson <simon@josefsson.org>
parents: 10368
diff changeset
133
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
134 # Update gettext files.
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
135 PACKAGE ?= $(shell basename $(PWD))
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
136 POURL = http://translationproject.org/latest/$(PACKAGE)/
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
137 PODIR ?= po
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
138 refresh-po:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
139 rm -f $(PODIR)/*.po && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
140 echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
141 wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
142 echo 'en@boldquot' > $(PODIR)/LINGUAS && \
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
143 echo 'en@quot' >> $(PODIR)/LINGUAS && \
10828
45b8dcc40064 maintainer-makefile: Fix sed regexp.
Simon Josefsson <simon@josefsson.org>
parents: 10757
diff changeset
144 ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
9811
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
145
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
146 INDENT_SOURCES ?= $(C_SOURCES)
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
147 .PHONY: indent
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
148 indent:
5f79eb63c21e Alter GNUmakefile to install into top directory.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
149 indent $(INDENT_SOURCES)