From 58b92d6bdb854a16f3552a640a2c5b8d4b186dd8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 17 Feb 1999 10:05:12 +0000 Subject: [PATCH] * gnus.el (gnus-version-number): Update to 6.10.8. * Makefile.in (install-package, package): New targets. (PACKAGEDIR): New user option. * dgnushack.el (dgnushack-install-package): New function. (dgnushack-make-package): New function. (dgnushack-info-file-regexp): New constant. (dgnushack-compile): Remove "_pkg.el" from the list. --- lisp/Makefile.in | 9 ++++ lisp/dgnushack.el | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++-- lisp/gnus.el | 2 +- 3 files changed, 126 insertions(+), 4 deletions(-) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index d143e8f..8d6b803 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -11,6 +11,7 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ SHELL = /bin/sh VPATH = @srcdir@ +PACKAGEDIR = total: rm -f *.elc ; $(EMACS) $(FLAGS) -f dgnushack-compile @@ -34,6 +35,14 @@ install: clever $(INSTALL_DATA) $$p $(lispdir)/$$p; \ done +package: + $(EMACS) $(FLAGS) -f dgnushack-make-package + +install-package: clever + rm -f dgnushack.elc + $(EMACS) $(FLAGS) -f dgnushack-make-package \ + -f dgnushack-install-package $(PACKAGEDIR) + tags: etags *.el diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 73e457f..f796154 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -1,5 +1,5 @@ ;;; dgnushack.el --- a hack to set the load path for byte-compiling -;; Copyright (C) 1994,95,96,97,98 Free Software Foundation, Inc. +;; Copyright (C) 1994,95,96,97,98,99 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Version: 4.19 @@ -61,7 +61,7 @@ You also then need to add the following to the lisp/dgnushack.el file: (push \"~/lisp/custom\" load-path) Modify to suit your needs.")) - (let ((files (directory-files "." nil "^[^=].*\\.el$")) + (let ((files (delete "_pkg.el" (directory-files "." nil "^[^=].*\\.el$"))) (xemacs (string-match "XEmacs" emacs-version)) ;;(byte-compile-generate-call-tree t) file elc) @@ -87,5 +87,118 @@ Modify to suit your needs.")) (require 'gnus) (byte-recompile-directory "." 0)) -;;; dgnushack.el ends here + +;; Avoid byte-compile warnings. +(defvar gnus-revision-number) +(defvar gnus-version-number) +(defvar gnus-product-name) +(defvar configure-package-path) +(defvar package-path) + +(defconst dgnushack-info-file-regexp + "^\\(gnus\\|message\\|gnus-ja\\|message-ja\\)\\(-[0-9]+\\)?$") + +(defun dgnushack-make-package () + (mapcar + (lambda (file) + (condition-case nil + (delete-file file) + (error nil))) + '("auto-autoloads.el" "auto-autoloads.elc")) + + (require 'gnus) + (let ((version + (split-string + (if (boundp 'gnus-revision-number) + (concat gnus-version-number "." gnus-revision-number) + gnus-version-number) + "\\.")) + (product-name (downcase gnus-product-name)) + lisp-dir make-backup-files) + (setq version (apply 'concat (car version) "." (cdr version)) + lisp-dir (concat "lisp/" product-name "/")) + + (with-temp-buffer + (insert ";;;###autoload +;(package-provide '" product-name " + :version " version " + :type 'regular) +") + (write-file "_pkg.el")) + + (message "Updating autoloads for directory %s..." default-directory) + (let ((generated-autoload-file "auto-autoloads.el") + noninteractive) + (update-autoloads-from-directory default-directory)) + (byte-compile-file "auto-autoloads.el") + + (with-temp-buffer + (let ((standard-output (current-buffer))) + (Custom-make-dependencies ".")) + (message (buffer-string))) + (require 'cus-load) + (byte-compile-file "custom-load.el") + + (message "Generating MANIFEST.%s for the package..." product-name) + (with-temp-buffer + (insert "pkginfo/MANIFEST." product-name "\n" + lisp-dir + (mapconcat + 'identity + (sort (directory-files "." nil "\\.elc?$") + 'string-lessp) + (concat "\n" lisp-dir)) + "\ninfo/" + (mapconcat + 'identity + (sort (directory-files "../texi/" + nil dgnushack-info-file-regexp) + 'string-lessp) + "\ninfo/") + "\n") + (write-file (concat "../MANIFEST." product-name))))) + +(defun dgnushack-install-package () + (let* ((package-dir (file-name-as-directory + (or (car command-line-args-left) + (if (boundp 'configure-package-path) + (car configure-package-path) + (car package-path))))) + (info-dir (expand-file-name "info/" package-dir)) + (pkginfo-dir (expand-file-name "pkginfo/" package-dir)) + product-name lisp-dir manifest) + (require 'gnus) + (setq product-name (downcase gnus-product-name) + lisp-dir (expand-file-name (concat "lisp/" product-name "/") + package-dir) + manifest (concat "MANIFEST." product-name)) + + (unless (file-directory-p lisp-dir) + (make-directory lisp-dir t)) + (unless (file-directory-p info-dir) + (make-directory info-dir)) + (unless (file-directory-p pkginfo-dir) + (make-directory pkginfo-dir)) + + (mapcar + (lambda (file) + (message "Copying %s to %s..." file lisp-dir) + (copy-file file (expand-file-name file lisp-dir) t t)) + (sort (directory-files "." nil "\\.elc?$") 'string-lessp)) + + (mapcar + (lambda (file) + (message "Copying ../texi/%s to %s..." file info-dir) + (copy-file (expand-file-name file "../texi/") + (expand-file-name file info-dir) + t t)) + (sort (directory-files "../texi/" nil dgnushack-info-file-regexp) + 'string-lessp)) + + (message "Copying ../%s to %s..." manifest pkginfo-dir) + (copy-file (expand-file-name manifest "../") + (expand-file-name manifest pkginfo-dir) t t) + + (message "Done"))) +;;; dgnushack.el ends here diff --git a/lisp/gnus.el b/lisp/gnus.el index 248e0ad..5e6e199 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,7 +253,7 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "Semi-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.7" +(defconst gnus-version-number "6.10.8" "Version number for this version of gnus.") (defconst gnus-version -- 1.7.10.4