dist/update-copyright.scm: Translate last-copyright-year.
authorMatt Birkholz <puck@birchwood-abbey.net>
Thu, 26 Nov 2015 05:17:37 +0000 (22:17 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Thu, 26 Nov 2015 07:59:17 +0000 (00:59 -0700)
dist/update-copyright.scm
src/runtime/version.scm

index 9c32aa8d1e4b91500582bcd9f072c061e8336396..cb58204f5d65b00dd60ba691e2d3e6e91c9aa26d 100644 (file)
@@ -196,8 +196,25 @@ USA.
                                "Massachusetts" "Institute" "of" "Technology"))
                             #f)
                       results))))
-           (and (pair? results)
-                (reverse results)))))))
+           (translate-suffix leader start end results))))))
+
+(define (translate-suffix leader start end results)
+  (let ((regs (re-substring-search-forward
+              "^[(]define last-copyright-year [0-9]+ *[)].*$\n"
+              leader start end)))
+    (if regs
+       (reverse
+        (cons
+         (list (re-match-start-index 0 regs)
+               (re-match-end-index 0 regs)
+               "" "" (list
+                      (list
+                       "(define" "last-copyright-year"
+                       (number->string (this-year)) ")"))
+               #f)
+         results))
+       (and (pair? results)
+            (reverse results)))))
 
 (define (match-copyright leader start end)
   (let ((regs
index 4d37e8227ef3206764a71f6a4379638e1e933a68..af93bbcd9e6066603753558371f094b2f2383356 100644 (file)
@@ -31,10 +31,12 @@ USA.
 
 (define copyright-years)
 
+(define last-copyright-year 2014 )
+
 (add-boot-init!
  (lambda ()
    (set! copyright-years
-        (let ((now 2014)
+        (let ((now last-copyright-year)
               (then 1986))
           (iota (+ (- now then) 1) then)))
    (add-subsystem-identification! "Release" '(9 2))