2 # This Makefile fragment tries to be general-purpose enough to be
3 # used by at least coreutils, idutils, CPPI, Bison, and Autoconf.
5 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
6 ## Free Software Foundation, Inc.
8 ## This program is free software: you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation, either version 3 of the License, or
11 ## (at your option) any later version.
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
21 # This is reported not to work with make-3.79.1
22 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
25 # Override this in cfg.mk if you use a non-standard build-aux directory.
26 build_aux ?
= $(srcdir)/build-aux
28 # Do not save the original name or timestamp in the .tar.gz file.
29 # Use --rsyncable if available.
31 $(shell gzip
--help
2>/dev
/null|grep rsyncable
>/dev
/null
&& echo
--rsyncable
)
32 GZIP_ENV
= '--no-name --best $(gzip_rsyncable)'
36 VC-tag
= git tag
-s
-m
'$(VERSION)'
38 VC_LIST
= $(build_aux
)/vc-list-files
-C
$(srcdir)
41 $(VC_LIST
) | if
test -f
$(srcdir)/.x-
$@
; then \
42 grep
-vEf
$(srcdir)/.x-
$@
; \
47 ifeq ($(origin prev_version_file
), undefined
)
48 prev_version_file
= $(srcdir)/.prev-version
51 PREV_VERSION
:= $(shell cat
$(prev_version_file
))
52 VERSION_REGEXP
= $(subst .
,\.
,$(VERSION
))
54 this-vc-tag
= v
$(VERSION
)
55 this-vc-tag-regexp
= v
$(VERSION_REGEXP
)
56 my_distdir
= $(PACKAGE
)-$(VERSION
)
58 # Old releases are stored here.
60 release_archive_dir ?
= ..
/release
62 # Prevent programs like 'sort' from considering distinct strings to be equal.
63 # Doing it here saves us from having to set LC_ALL elsewhere in this file.
72 # Collect the names of rules starting with `sc_'.
73 syntax-check-rules
:= $(shell sed
-n
's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
75 .PHONY
: $(syntax-check-rules
)
77 local-checks-available
= \
78 po-check copyright-check writable-files m4-check author_mark_check \
79 changelog-check patch-check strftime-check
$(syntax-check-rules
) \
80 makefile_path_separator_check \
81 makefile-check check-AUTHORS
82 .PHONY
: $(local-checks-available
)
84 local-check
:= $(filter-out $(local-checks-to-skip
), $(local-checks-available
))
86 syntax-check
: $(local-check
)
87 # @shopt -s nullglob; \
88 # grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
89 # $$(find -type f -name '*.[chly]') /dev/null && \
90 # { echo '$(ME): found conditional include' 1>&2; \
93 # grep -nE '^# *include <(string|stdlib)\.h>' \
94 # $(srcdir)/{lib,src}/*.[chly] /dev/null && \
95 # { echo '$(ME): FIXME' 1>&2; \
97 # FIXME: don't allow `#include .strings\.h' anywhere
99 sc_cast_of_argument_to_free
:
100 @shopt
-s nullglob
; \
101 grep
-nE
'\<free \(\(' \
102 $(srcdir)/{lib
,src
}/*.
[chly
] /dev
/null
&& \
103 { echo
'$(ME): don'\''t cast free argument' 1>&2; \
106 sc_cast_of_x_alloc_return_value
:
107 @shopt
-s nullglob
; \
108 grep
-nE
--exclude
=$(srcdir)/lib
/regex.c \
109 '\*\) *x(m|c|re)alloc\>' \
110 $(srcdir)/{lib
,src
}/*.
[chly
] /dev
/null
&& \
111 { echo
'$(ME): don'\''t cast x*alloc return value' 1>&2; \
114 sc_cast_of_alloca_return_value
:
115 @shopt
-s nullglob
; \
116 grep
-nE
'\*\) *alloca\>' \
117 $(srcdir)/src
/*.
[chly
] /dev
/null
&& \
118 { echo
'$(ME): don'\''t cast alloca return value' 1>&2; \
122 @grep
-n
'[ ] ' $$($(VC_LIST_EXCEPT
)) && \
123 { echo
'$(ME): found SPACE-TAB sequence; remove the SPACE' \
126 # Don't use *scanf or the old ato* functions in `real' code.
127 # They provide no error checking mechanism.
128 # Instead, use strto* functions.
129 sc_prohibit_atoi_atof
:
130 @grep
-nE
'\<([fs]?scanf|ato([filq]|ll))\>' $$($(VC_LIST_EXCEPT
)) && \
131 { echo
'$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \
134 # Using EXIT_SUCCESS as the first argument to error is misleading,
135 # since when that parameter is 0, error does not exit. Use `0' instead.
136 sc_error_exit_success
:
137 @grep
-nF
'error (EXIT_SUCCESS,' \
138 $$(find
-type f
-name
'*.[chly]') /dev
/null
&& \
139 { echo
'$(ME): found error (EXIT_SUCCESS' 1>&2; \
143 @grep
-ni
'file''system' $$($(VC_LIST_EXCEPT
)) \
144 | grep
-v
'File''system Hierarchy Standard' && \
145 { echo
'$(ME): found use of "file''system";' \
146 'rewrite to use "file system"' 1>&2; \
150 @grep
-n
'^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT
)) && \
151 { echo
'$(ME): found use of HAVE''_CONFIG_H; remove' \
154 # Nearly all .c files must include <config.h>.
156 @if
$(VC_LIST_EXCEPT
) | grep
'\.c$$' > /dev
/null
; then \
157 grep
-L
'^# *include <config\.h>' \
158 $$($(VC_LIST_EXCEPT
) | grep
'\.c$$') \
160 { echo
'$(ME): the above files do not include <config.h>' \
161 1>&2; exit
1; } ||
:; \
165 # To use this "command" macro, you must first define two shell variables:
166 # h: the header, enclosed in <> or ""
167 # re: a regular expression that matches IFF something provided by $h is used.
168 define _header_without_use
169 h_esc
=`echo "$$h"|sed 's/\./\\./'`; \
170 if
$(VC_LIST_EXCEPT
) | grep
'\.c$$' > /dev
/null
; then \
171 files
=$$(grep
-l
'^# *include '"$$h_esc" \
172 $$($(VC_LIST_EXCEPT
) | grep
'\.c$$')) && \
173 grep
-LE
"$$re" $$files | grep .
&& \
174 { echo
"$(ME): the above files include $$h but don't use it" \
175 1>&2; exit
1; } ||
:; \
180 # Prohibit the inclusion of assert.h without an actual use of assert.
181 sc_prohibit_assert_without_use
:
182 @h
='<assert.h>' re
='\<assert *\(' $(_header_without_use
)
184 # Prohibit the inclusion of getopt.h without an actual use.
185 sc_prohibit_getopt_without_use
:
186 @h
='<getopt.h>' re
='\<getopt(_long)? *\(' $(_header_without_use
)
188 # Don't include quotearg.h unless you use one of its functions.
189 sc_prohibit_quotearg_without_use
:
190 @h
='"quotearg.h"' re
='\<quotearg(_[^ ]+)? *\(' $(_header_without_use
)
192 # Don't include quote.h unless you use one of its functions.
193 sc_prohibit_quote_without_use
:
194 @h
='"quote.h"' re
='\<quote(_n)? *\(' $(_header_without_use
)
196 # Don't include this header unless you use one of its functions.
197 sc_prohibit_long_options_without_use
:
198 @h
='"long-options.h"' re
='\<parse_long_options *\(' \
199 $(_header_without_use
)
201 # Don't include this header unless you use one of its functions.
202 sc_prohibit_inttostr_without_use
:
203 @h
='"inttostr.h"' re
='\<(off|[iu]max|uint)tostr *\(' \
204 $(_header_without_use
)
206 # Don't include this header unless you use one of its functions.
207 sc_prohibit_error_without_use
:
209 re
='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
210 $(_header_without_use
)
212 sc_prohibit_safe_read_without_use
:
213 @h
='"safe-read.h"' re
='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
214 $(_header_without_use
)
216 sc_prohibit_argmatch_without_use
:
218 re
='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
219 $(_header_without_use
)
221 sc_prohibit_root_dev_ino_without_use
:
222 @h
='"root-dev-ino.h"' \
223 re
='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
224 $(_header_without_use
)
227 @grep
-nE
'\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
228 $$($(VC_LIST_EXCEPT
)) && \
229 { echo
'$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
232 # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
234 # Each nonempty line must start with a year number, or a TAB.
236 @grep
-n
'^[^12 ]' $$(find
$(srcdir) -maxdepth
2 -name ChangeLog
) && \
237 { echo
'$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
240 # Ensure that dd's definition of LONGEST_SYMBOL stays in sync
241 # with the strings from the two affected variables.
242 dd_c
= $(srcdir)/src
/dd.c
243 sc_dd_max_sym_length
:
244 ifneq ($(wildcard $(dd_c
)),)
245 @len
=$$( (sed
-n
'/conversions\[\] =$$/,/^};/p' $(dd_c
);\
246 sed
-n
'/flags\[\] =$$/,/^};/p' $(dd_c
) ) \
247 |sed
-n
'/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
248 | wc
--max-line-length
); \
249 max
=$$(sed
-n
'/^#define LONGEST_SYMBOL /s///p' $(dd_c
) \
250 |tr
-d
'"' | wc
--max-line-length
); \
251 if
test "$$len" = "$$max"; then
:; else \
252 echo
'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
257 # Many m4 macros names once began with `jm_'.
258 # On 2004-04-13, they were all changed to start with gl_ instead.
259 # Make sure that none are inadvertently reintroduced.
260 sc_prohibit_jm_in_m4
:
261 @grep
-nE
'jm_[A-Z]' \
262 $$($(VC_LIST
) m4 |grep
'\.m4$$') && \
263 { echo
'$(ME): do not use jm_ in m4 macro names' \
267 @t1
=sc-root.expected
; t2
=sc-root.actual
; \
268 grep
-nl
'^PRIV_CHECK_ARG=require-root' \
269 $$($(VC_LIST
) tests
) |sed s
/tests
/.
/ |
sort > $$t1; \
270 sed
-n
's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
271 $(srcdir)/tests
/Makefile.am |
sort > $$t2; \
272 diff
-u
$$t1 $$t2 || diff
=1; \
275 && { echo
'tests/Makefile.am: missing check-root action'>&2; \
278 # Files in src/ should not include directly any of
279 # the headers already included via system.h.
281 @if
test -f
$(srcdir)/src
/system.h
; then \
283 sed
-n
'/^# *include /s///p' $(srcdir)/src
/system.h
/dev
/null \
284 | grep
-Ev
'sys/(param|file)\.h' \
285 | sed
's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
288 $$($(VC_LIST
) src | \
289 grep
-Ev
'((copy|system)\.h|parse-gram\.c)$$') \
290 && { echo
'$(ME): the above are already included via system.h'\
291 1>&2; exit
1; } ||
:; \
296 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
297 $$($(VC_LIST_EXCEPT
)) && \
298 { echo
'$(ME): found misuse of Sun OS version numbers' 1>&2; \
302 @grep
-ni
'\<the ''the\>' $$($(VC_LIST_EXCEPT
)) && \
303 { echo
'$(ME): found use of "the ''the";' 1>&2; \
307 test ! -d src ||
$(MAKE
) -C src
$@
310 @grep
-n
'[ ]$$' $$($(VC_LIST_EXCEPT
)) && \
311 { echo
'$(ME): found trailing blank(s)' \
314 # Match lines like the following, but where there is only one space
315 # between the options and the description:
316 # -D, --all-repeated[=delimit-method] print all duplicate lines\n
317 longopt_re
= --[a-z
][0-9A-Za-z-
]*(\
[?
=[0-9A-Za-z-
]*\
]?
)?
318 sc_two_space_separator_in_usage
:
319 @grep
-nE
'^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
320 $$($(VC_LIST_EXCEPT
)) && \
321 { echo
"$(ME): help2man requires at least two spaces between"; \
322 echo
"$(ME): an option and its description"; \
325 # Look for diagnostics that aren't marked for translation.
326 # This won't find any for which error's format string is on a separate line.
327 sc_unmarked_diagnostics
:
329 '\<error \([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT
)) \
330 | grep
-v
'_''(' && \
331 { echo
'$(ME): found unmarked diagnostic(s)' 1>&2; \
334 # Avoid useless parentheses like those in this example:
335 # #if defined (SYMBOL) || defined (SYM2)
336 sc_useless_cpp_parens
:
337 @grep
-n
'^# *if .*defined *(' $$($(VC_LIST_EXCEPT
)) && \
338 { echo
'$(ME): found useless parentheses in cpp directive' \
341 # Ensure that the c99-to-c89 patch applies cleanly.
343 if
test -f src
/c99-to-c89.diff
; then \
344 rm -rf src-c89
$@
.1 $@
.2 && \
345 cp
-a src src-c89
&& \
346 (cd src-c89
; patch
-V never
--fuzz
=0) < src
/c99-to-c89.diff \
348 { grep
-v
'^patching file ' $@
.1 > $@
.2 ||
:; } && \
350 rm -rf src-c89
$@
.1 $@
.2; \
353 # Ensure that date's --help output stays in sync with the info
354 # documentation for GNU strftime. The only exception is %N,
355 # which date accepts but GNU strftime does not.
356 extract_char
= sed
's/^[^%][^%]*%\(.\).*/\1/'
358 if
test -f
$(srcdir)/src
/date.c
; then \
359 grep
'^ %. ' $(srcdir)/src
/date.c |
sort \
360 |
$(extract_char
) > $@
-src
; \
362 info libc date calendar format | grep
'^ `%.'\' \
363 |
$(extract_char
); } |
sort > $@
-info; \
364 diff
-u
$@
-src
$@
-info || exit
1; \
365 rm -f
$@
-src
$@
-info; \
369 test ! -d src ||
$(MAKE
) -C src
$@
371 # Ensure that we use only the standard $(VAR) notation,
372 # not @...@ in Makefile.am, now that we can rely on automake
373 # to emit a definition for each substituted variable.
375 grep
-nE
'@[A-Z_0-9]+@' `find $(srcdir) -name Makefile.am` \
376 && { echo
'$(ME): use $$(...), not @...@' 1>&2; exit
1; } ||
:
378 news-date-check
: NEWS
379 today
=`date +%Y-%m-%d`; \
380 if head NEWS | grep
'^\*.* $(VERSION_REGEXP) ('$$today')' \
384 echo
"version or today's date is not in NEWS" 1>&2; \
389 if head ChangeLog | grep
'Version $(VERSION_REGEXP)\.$$' \
393 echo
"$(VERSION) not in ChangeLog" 1>&2; \
398 @shopt
-s nullglob
; \
399 grep
'AC_DEFUN([^[]' m4
/*.m4
/dev
/null \
400 && { echo
'$(ME): quote the first arg to AC_DEFUN' 1>&2; \
403 # Verify that all source files using _() are listed in po/POTFILES.in.
404 # FIXME: don't hard-code file names below; use a more general mechanism.
406 if
test -f po
/POTFILES.in
; then \
407 grep
-E
-v
'^(#|$$)' po
/POTFILES.in \
408 | grep
-v
'^src/false\.c$$' |
sort > $@
-1; \
410 for file in
$$($(VC_LIST_EXCEPT
)) lib
/*.
[ch
]; do \
412 djgpp
/* | man
/*) continue
;; \
413 */c99-to-c89.diff
) continue
;; \
417 base
=`expr " $$file" : ' \(.*\)\..'`; \
418 { test -f
$$base.l ||
test -f
$$base.y
; } && continue
;; \
420 files
="$$files $$file"; \
422 grep
-E
-l
'\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
424 diff
-u
$@
-1 $@
-2 || exit
1; \
428 # In a definition of #define AUTHORS "... and ..." where the RHS contains
429 # the English word `and', the string must be marked with `N_ (...)' so that
430 # gettext recognizes it as a string requiring translation.
432 @shopt
-s nullglob
; \
433 grep
-n
'^# *define AUTHORS "[^"]* and ' src
/*.c
/dev
/null \
434 | grep
-v
' N_ (' && \
435 { echo
'$(ME): enclose the above strings in N_ (...)' 1>&2; \
438 # Sometimes it is useful to change the PATH environment variable
439 # in Makefiles. When doing so, it's better not to use the Unix-centric
440 # path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
441 # It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
442 # and there probably aren't many projects with so many Makefile.am files
443 # that we'd have to worry about limits on command line length.
444 msg
= '$(ME): Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
445 makefile_path_separator_check
:
446 @grep
-n
'PATH=.*:' `find $(srcdir) -name Makefile.am` \
447 && { echo
$(msg
) 1>&2; exit
1; } ||
:
449 # Check that `make alpha' will not fail at the end of the process.
451 if
test -d
$(release_archive_dir
); then
:; else \
452 mkdir
$(release_archive_dir
); \
454 for file in
$(distdir
).
tar.gz
$(xd-delta
) \
455 $(release_archive_dir
)/$(distdir
).
tar.gz \
456 $(release_archive_dir
)/$(xd-delta
); do \
457 test -e
$$file || continue
; \
459 ||
{ echo ERROR
: $$file is not writable
; fail
=1; }; \
461 test "$$fail" && exit
1 ||
:
463 v_etc_file
= lib
/version-etc.c
464 # Make sure that the copyright date in $(v_etc_file) is up to date.
466 @if
test -f
$(v_etc_file
); then \
467 grep
'enum { COPYRIGHT_YEAR = '$$(date
+%Y
)' };' $(v_etc_file
) \
469 ||
{ echo
'out of date copyright in $(v_etc_file); update it' 1>&2; \
474 (CDPATH
=; cd
$(srcdir) && $(VC
) diff
) > vc-diffs ||
:
475 if
test -s vc-diffs
; then \
477 echo
"Some files are locally modified:" 1>&2; \
483 cvs-check
: vc-diff-check
485 maintainer-distcheck
:
487 $(MAKE
) -C tests
$(AM_MAKEFLAGS
) maintainer-check
490 # Don't make a distribution if checks fail.
491 # Also, make sure the NEWS file is up-to-date.
492 vc-dist
: $(local-check
) cvs-check maintainer-distcheck
495 # Use this to make sure we don't run these programs when building
496 # from a virgin tgz file, below.
497 null_AM_MAKEFLAGS
= \
504 # Detect format-string/arg-list mismatches that would normally be obscured
505 # by the use of _(). The --disable-nls effectively defines away that macro,
506 # and building with CFLAGS='-Wformat -Werror' causes any format warning to be
507 # treated as a failure. Also, check for shadowing problems with -Wshadow,
508 # and for pointer arithmetic problems with -Wpointer-arith.
509 # These CFLAGS are pretty strict. If you build this target, you probably
510 # have to have a recent version of gcc and glibc headers.
512 t
=$(TMPDIR
)/$(PACKAGE
)/test
513 my-distcheck
: $(local-check
) $(release_archive_dir
)/$(prev-tgz
)
516 GZIP
=$(GZIP_ENV
) $(AMTAR
) -C
$(t
) -zxf
$(distdir
).
tar.gz
518 && .
/configure
--disable-nls \
519 && $(MAKE
) CFLAGS
='-Werror -Wall -Wformat -Wshadow -Wpointer-arith' \
520 AM_MAKEFLAGS
='$(null_AM_MAKEFLAGS)' \
524 (cd
$(t
) && mv
$(distdir
) $(distdir
).old \
525 && $(AMTAR
) -zxf
- ) < $(distdir
).
tar.gz
526 diff
-ur
$(t
)/$(distdir
).old
$(t
)/$(distdir
)
528 @echo
"========================"; \
529 echo
"$(distdir).tar.gz is ready for distribution"; \
530 echo
"========================"
532 prev-tgz
= $(PACKAGE
)-$(PREV_VERSION
).
tar.gz
534 rel-files
= $(DIST_ARCHIVES
)
535 announcement
: NEWS ChangeLog
$(rel-files
)
537 --release-type
=$(RELEASE_TYPE
) \
538 --package
=$(PACKAGE
) \
539 --prev
=$(PREV_VERSION
) \
541 --gpg-key-id
=$(gpg_key_ID
) \
542 --news
=$(srcdir)/NEWS \
543 --bootstrap-tools
=automake \
544 $(addprefix --url-dir
=, $(url_dir_list
))
546 ## ---------------- ##
547 ## Updating files. ##
548 ## ---------------- ##
550 ftp-gnu
= ftp
://ftp.gnu.org
/gnu
551 www-gnu
= http
://www.gnu.org
553 # Use mv, if you don't have/want move-if-change.
554 move_if_change ?
= move-if-change
556 emit_upload_commands
:
557 @echo
=====================================
558 @echo
=====================================
559 @echo
"$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
560 @echo
" --to $(gnu_rel_host):$(PACKAGE) \\"
561 @echo
" $(rel-files)"
562 @echo
'# send the /tmp/announcement e-mail'
563 @echo
=====================================
564 @echo
=====================================
566 .PHONY
: alpha beta major
567 alpha beta major
: news-date-check changelog-check
$(local-check
)
569 && { echo
$(VERSION
) | grep
-E
'^[0-9]+(\.[0-9]+)+$$' \
570 ||
{ echo
"invalid version string: $(VERSION)" 1>&2; exit
1;};}\
574 $(MAKE
) -s announcement RELEASE_TYPE
=$@
> /tmp
/announce-
$(my_distdir
)
575 ln
$(rel-files
) $(release_archive_dir
)
576 chmod a-w
$(rel-files
)
577 $(MAKE
) -s emit_upload_commands RELEASE_TYPE
=$@
578 echo
$(VERSION
) > $(prev_version_file
)
580 '$(prev_version_file): Record previous version: $(VERSION).' \
586 @
test -z
"$(manual_title)" \
587 && { echo
define manual_title in cfg.mk
1>&2; exit
1; } ||
:
588 @cd
'$(srcdir)/doc'; \
589 $(SHELL
) ..
/build-aux
/gendocs.sh
-o
'$(abs_builddir)/doc/manual' \
590 --email
$(PACKAGE_BUGREPORT
) $(PACKAGE
) \
591 "$(PACKAGE_NAME) - $(manual_title)"
592 @echo
" *** Upload the doc/manual directory to web-cvs."
594 # If you want to set UPDATE_COPYRIGHT_* environment variables,
595 # put the assignments in this variable.
596 update-copyright-env ?
=
598 # Run this rule once per year (usually early in January)
599 # to update all FSF copyright year lists in your project.
600 # If you have an additional project-specific rule,
601 # add it in cfg.mk along with a line 'update-copyright: prereq'.
602 # By default, exclude all variants of COPYING; you can also
603 # add exemptions (such as ChangeLog..* for rotated change logs)
604 # in the file .x-update-copyright.
605 .PHONY
: update-copyright
607 grep
-l
-w Copyright
$$($(VC_LIST_EXCEPT
)) \
608 $(srcdir)/ChangeLog | grep
-v COPYING \
609 |
$(update-copyright-env
) xargs
$(build_aux
)/$@