blob: 6e61b778424d5baeb1ba182f355f4076374009e8 [file] [log] [blame]
Ben Cheng25b3c042013-11-20 14:45:36 -08001## Process this file with automake to produce Makefile.in -*-Makefile-*-
2## Configure input file for elfutils.
3##
4## Copyright (C) 2004, 2005, 2008, 2009, 2011 Red Hat, Inc.
Elliott Hughes03333822015-02-18 22:19:45 -08005## This file is part of elfutils.
Ben Cheng25b3c042013-11-20 14:45:36 -08006##
Elliott Hughes03333822015-02-18 22:19:45 -08007## This file is free software; you can redistribute it and/or modify
8## it under the terms of either
Ben Cheng25b3c042013-11-20 14:45:36 -08009##
Elliott Hughes03333822015-02-18 22:19:45 -080010## * the GNU Lesser General Public License as published by the Free
11## Software Foundation; either version 3 of the License, or (at
12## your option) any later version
13##
14## or
15##
16## * the GNU General Public License as published by the Free
17## Software Foundation; either version 2 of the License, or (at
18## your option) any later version
19##
20## or both in parallel, as here.
21##
22## elfutils is distributed in the hope that it will be useful, but
Ben Cheng25b3c042013-11-20 14:45:36 -080023## WITHOUT ANY WARRANTY; without even the implied warranty of
24## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25## General Public License for more details.
26##
Elliott Hughes03333822015-02-18 22:19:45 -080027## You should have received copies of the GNU General Public License and
28## the GNU Lesser General Public License along with this program. If
29## not, see <http://www.gnu.org/licenses/>.
Ben Cheng25b3c042013-11-20 14:45:36 -080030##
31EXTRA_DIST = elfutils.spec.in known-dwarf.awk
32
33if MAINTAINER_MODE
34$(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS
35 @tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \
36 date +'* %a %b %e %Y' | tr '[\n]' '[ ]' > $$tmpname; \
37 getent passwd "$$(whoami)" | \
38 awk 'BEGIN {FS=":"} { printf $$5; exit 0}' >> $$tmpname; \
39 echo -n " <$$(whoami)@gmail.com> " >> $$tmpname; \
40 awk '\
41 $$1 == "Version" && started { exit } \
42 $$1 == "Version" { started=1; line=""; sub(/:/,"",$$2); \
43 print $$2 "-1"; next } \
44 NF > 0 { line = (line != "") ? (line " " $$0) : ("- " $$0) } \
45 NF == 0 && line != "" { print line; line="" } \
46 END { if (line != "") print line; print "" }' $< \
47 | fold -s -w 70 | sed '1!s/^[^-]/ &/' >> $$tmpname; \
48 sed "/^%changelog/r $$tmpname" $@ > $@.new; \
49 rm -f $$tmpname; \
50 mv -f $@.new $@
51endif