/[auctex]/auctex/preview/prv-install.el
ViewVC logotype

Diff of /auctex/preview/prv-install.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by dakas, Thu Mar 3 17:50:48 2005 UTC revision 1.9 by dak, Mon Apr 11 09:01:31 2005 UTC
# Line 38  Takes arguments on the comamnd line: the Line 38  Takes arguments on the comamnd line: the
38  number of Lisp files to generate autoloads from.  number of Lisp files to generate autoloads from.
39    
40  Does nothing in Emacsen that do not support a package system."  Does nothing in Emacsen that do not support a package system."
41    (if (string-match "XEmacs" (emacs-version))    (if (featurep 'xemacs)
42        (preview-make-package-xemacs))        (preview-make-package-xemacs))
43    (setq command-line-args-left nil))    (setq command-line-args-left nil))
44    
# Line 46  Does nothing in Emacsen that do not supp Line 46  Does nothing in Emacsen that do not supp
46    "Do anything required to make a package in XEmacs,    "Do anything required to make a package in XEmacs,
47  other than actually copying the Lisp files.  other than actually copying the Lisp files.
48    
49  Generates auto-autoloads, custom-loads, a manifest, and a package  Generates auto-autoloads, custom-loads, and package metadata file
50  metadata file in the right locations.  in the right locations.  Takes from the command line the package directory,
51    and the package name."
 Takes arguments on the comamnd line: the package directory and any  
 number of Lisp files to generate autoloads from."  
52    (let* ((package-dir (pop command-line-args-left))    (let* ((package-dir (pop command-line-args-left))
53           (lisp-dir (expand-file-name "lisp/preview/" package-dir))           (package-name (pop command-line-args-left))
54             (lisp-dir (expand-file-name (format "lisp/%s/" package-name)
55                                         package-dir))
56           (metadata (expand-file-name "_pkg.el" lisp-dir))           (metadata (expand-file-name "_pkg.el" lisp-dir))
57           (custom-load (expand-file-name "custom-load.el" lisp-dir))           (custom-load (expand-file-name "custom-load.el" lisp-dir))
58           (generated-autoload-file (expand-file-name "auto-autoloads.el"           (generated-autoload-file (expand-file-name "auto-autoloads.el"
59                                                      lisp-dir))                                                      lisp-dir))
          (els command-line-args-left)  
          (icons (directory-files (expand-file-name "images/") nil nil nil t))  
60           (si:message (symbol-function 'message))           (si:message (symbol-function 'message))
61              manifest make-backup-files noninteractive)           make-backup-files noninteractive)
62      ; Delete and regenerate the custom-load file.      ;; Delete and regenerate the custom-load file.
63      (when (file-exists-p custom-load)      (when (file-exists-p custom-load)
64        (delete-file custom-load))        (delete-file custom-load))
65      (when (file-exists-p (concat custom-load "c"))      (when (file-exists-p (concat custom-load "c"))
# Line 69  number of Lisp files to generate autoloa Line 67  number of Lisp files to generate autoloa
67      (Custom-make-dependencies lisp-dir)      (Custom-make-dependencies lisp-dir)
68      (when (file-exists-p custom-load)      (when (file-exists-p custom-load)
69        (require 'cus-load)        (require 'cus-load)
70        (byte-compile-file custom-load)        (byte-compile-file custom-load))
       (push "custom-load.el" els))  
71      ; Delete and regenerate the package metadata file.      ; Delete and regenerate the package metadata file.
72      ; There is no compiled form of this file.      ; There is no compiled form of this file.
73      (message "Updating metadata for the directory %s..." lisp-dir)      (message "Updating metadata for the directory %s..." lisp-dir)
74      (with-temp-file metadata      (with-temp-file metadata
75        (insert        (insert
76         (concat ";;;###autoload\n"         (concat ";;;###autoload\n"
77                 "(package-provide 'preview\n"                 "(package-provide '" package-name "\n"
78                 "                 :version "                 "                 :version "
79                 preview-release-date "\n"                 preview-release-date "\n"
80                 "                 :type 'regular)\n")))                 "                 :type 'regular)\n")))
# Line 103  number of Lisp files to generate autoloa Line 100  number of Lisp files to generate autoloa
100        (with-temp-buffer (insert-file "auto.el")        (with-temp-buffer (insert-file "auto.el")
101                          (append-to-file (point-min) (point-max)                          (append-to-file (point-min) (point-max)
102                                          generated-autoload-file))                                          generated-autoload-file))
103        (byte-compile-file generated-autoload-file)        (byte-compile-file generated-autoload-file))))
104        (push "auto-autoloads.el" els))  
     ; Some people delete the pkginfo directory; this should not break  
     ; anything other than package autoupgrading, so cater for that.  
     (when (file-directory-p (expand-file-name "pkginfo/" package-dir))  
       (setq manifest (expand-file-name "pkginfo/MANIFEST.preview" package-dir))  
       (message "Generating %s..." manifest)  
       (with-temp-file manifest  
         (insert "pkginfo/MANIFEST.preview\n")  
         (insert "lisp/preview/ChangeLog\n")  
         (dolist (el els)  
           (insert "lisp/preview/" el "\n")  
           (insert "lisp/preview/" el "c\n"))  
         (dolist (icon icons)  
           (insert "etc/preview/" icon "\n"))))  
     (message "Generating %s...done" manifest)))  
105    
106  ;;; prv-install.el ends here  ;;; prv-install.el ends here

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26