From 8db1ac1153f11fa39ca204976dc6061fcb3b6d7b Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 17 Feb 1999 09:58:36 +0000 Subject: [PATCH] * gnus.el (gnus-revision-number): Increment to 06. * 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 | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++- lisp/gnus.el | 2 +- 3 files changed, 125 insertions(+), 3 deletions(-) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 108c6fa..9edc426 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 = all total: rm -f *.elc ; $(EMACS) $(FLAGS) -f dgnushack-compile @@ -29,6 +30,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 d6bdd77..9111d58 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -60,7 +60,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) @@ -86,5 +86,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\\|emacs-mime\\|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 fef35bf..a942d92 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.058" "Version number for this version of gnus.") -(defconst gnus-revision-number "05" +(defconst gnus-revision-number "06" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.76" -- 1.7.10.4