+ (let ((clog (expand-file-name "ChangeLog" root)))
+ (if (file-exists-p clog)
+ ;; Basic check that a ChangeLog that exists is not your personal one.
+ ;; TODO Perhaps we should move any existing file and unconditionally
+ ;; call make ChangeLog? Or make ChangeLog CHANGELOG=temp and compare
+ ;; with the existing?
+ (with-temp-buffer
+ (insert-file-contents clog)
+ (or (re-search-forward "^[ \t]*Copyright.*Free Software" nil t)
+ (user-error "ChangeLog looks like a personal one - remove it?")))
+ (or
+ (zerop (call-process "make" nil nil nil "-C" root "ChangeLog"))
+ (error "Problem generating ChangeLog"))))