Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame^] | 1 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- |
| 2 | ## Configure input file for elfutils. |
| 3 | ## |
| 4 | ## Copyright (C) 2004, 2005 Red Hat, Inc. |
| 5 | ## |
| 6 | ## This program is free software; you can redistribute it and/or modify |
| 7 | ## it under the terms of the GNU General Public License as published by |
| 8 | ## the Free Software Foundation, version 2. |
| 9 | ## |
| 10 | ## This program is distributed in the hope that it will be useful, |
| 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | ## GNU General Public License for more details. |
| 14 | ## |
| 15 | ## You should have received a copy of the GNU General Public License |
| 16 | ## along with this program; if not, write to the Free Software Foundation, |
| 17 | ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | ## |
| 19 | EXTRA_DIST = elfutils.spec.in |
| 20 | |
| 21 | $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS |
| 22 | @tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \ |
| 23 | date +'* %a %b %e %Y' | tr '[\n]' '[ ]' > $$tmpname; \ |
| 24 | getent passwd "$$(whoami)" | \ |
| 25 | awk 'BEGIN {FS=":"} { printf $$5; exit 0}' >> $$tmpname; \ |
| 26 | echo -n " <$(whoami)@redhat.com> " >> $$tmpname; \ |
| 27 | sed 's/Version \(.*\):$$/\1-1/;q' $(top_srcdir)/NEWS >> $$tmpname; \ |
| 28 | sed '2,/^Version /p;d' $(top_srcdir)/NEWS | \ |
| 29 | head -n -1 | \ |
| 30 | awk '{ if ($$0 == "") { if (line != "") { printf "- "; fflush(); system("echo \"" line "\" | fold -w 70"); line=""; } } else { line=line $$0; }} END { if (line != "") { printf "- "; system("echo \"" line "\" | fold -w 70")}}' >> $$tmpname; \ |
| 31 | echo >> $$tmpname; \ |
| 32 | sed "/^%changelog/r $$tmpname" $@ > $@.new; \ |
| 33 | rm -f $$tmpname; \ |
| 34 | mv -f $@.new $@ |
| 35 | -@if [ -d $(srcdir)/CVS ]; then \ |
| 36 | cd $(srcdir); \ |
| 37 | cvs ci -m "Added changelog." $(@F); \ |
| 38 | fi |