aboutsummaryrefslogtreecommitdiff
path: root/build-aux/git2chg.awk
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-13 23:43:07 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-13 23:43:07 +0300
commit3b336240d9ac05bac621568b95086dbff2371acd (patch)
treec4a1f208ce8f33300f7e31811b79aa921f9e357e /build-aux/git2chg.awk
parent4c1056b45580fcb687cac656834f42dd9fba4ae8 (diff)
downloadgrecs-3b336240d9ac05bac621568b95086dbff2371acd.tar.gz
grecs-3b336240d9ac05bac621568b95086dbff2371acd.tar.bz2
Improvements in git2chg.awk and grecs setup sequence.
* build-aux/git2chg.awk: New configuration variables: since=YYYY-MM-DD, to cut off entries earlier than the given date, and append=FILE, to append FILE to the generated ChangeLog. * am/grecs.m4 (GRECS_HOST_PROJECT_INCLUDES): New substitution variable. * src/Make.am (INCLUDES): Expand GRECS_HOST_PROJECT_INCLUDES. * tests/Makefile.am: Likewise.
Diffstat (limited to 'build-aux/git2chg.awk')
-rw-r--r--build-aux/git2chg.awk30
1 files changed, 30 insertions, 0 deletions
diff --git a/build-aux/git2chg.awk b/build-aux/git2chg.awk
index 1ddf698..11e2f1c 100644
--- a/build-aux/git2chg.awk
+++ b/build-aux/git2chg.awk
@@ -14,8 +14,30 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with Grecs. If not, see <http://www.gnu.org/licenses/>. 15# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16 16
17BEGIN {
18 if (since)
19 split(since,since_a,"-")
20}
21
22function timeok(t, a) {
23 if (!since)
24 return 1
25 split(t,a,"-")
26 if (a[1] < since_a[1])
27 return 0
28 if (a[1] > since_a[1])
29 return 1
30 if (a[2] < since_a[2])
31 return 0
32 if (a[2] > since_a[2])
33 return 1
34 return a[3] > since_a[3]
35}
36
17/^[0-9]+ .* +<[^>]+>/ { 37/^[0-9]+ .* +<[^>]+>/ {
18 s = strftime("%F", $1) 38 s = strftime("%F", $1)
39 if (!timeok(s))
40 exit
19 sub(/^[0-9]+ +/,"") 41 sub(/^[0-9]+ +/,"")
20 if (s == datestr && author == $0) 42 if (s == datestr && author == $0)
21 next 43 next
@@ -35,6 +57,14 @@ NF==0 {
35 print "\t" $0 } 57 print "\t" $0 }
36 58
37END { 59END {
60 if (append) {
61 print ""
62 while ((getline < append) > 0) {
63 if (match($0, /^Local *Variables:/))
64 break
65 print
66 }
67 }
38 print "\f" 68 print "\f"
39 # Make sure Emacs won't recognize this line: 69 # Make sure Emacs won't recognize this line:
40 print "Local", "Variables:" 70 print "Local", "Variables:"

Return to:

Send suggestions and report system problems to the System administrator.