1 ;;; ede-system.el --- EDE working with the system (VC, FTP, ETC)
3 ;;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
5 ;; Author: Eric M. Ludlam <zappo@gnu.org>
6 ;; Keywords: project, make, vc
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;; EDE system contains some routines to work with EDE projects saved in
26 ;; CVS repositories, and services such as sourceforge which lets you
27 ;; perform releases via FTP.
33 ;;; Web/FTP site node.
35 (defun ede-web-browse-home ()
36 "Browse the home page of the current project."
38 (if (not (ede-toplevel))
40 (let ((home (oref (ede-toplevel) web-site-url
)))
42 (error "Now URL is stored in this project"))
48 (defun ede-edit-web-page ()
49 "Edit the web site for this project."
51 (let* ((toplevel (ede-toplevel))
52 (dir (oref toplevel web-site-directory
))
53 (file (oref toplevel web-site-file
))
54 (endfile (concat (file-name-as-directory dir
) file
)))
55 (if (string-match "^/r[:@]" endfile
)
57 (when (not (file-exists-p endfile
))
59 (if (string-match "^/r[:@]" endfile
)
61 (if (not (file-exists-p endfile
))
62 (error "No project file found")))
66 (defun ede-upload-distribution ()
67 "Upload the current distribution to the correct location.
68 Use /user@ftp.site.com: file names for FTP sites.
69 Download tramp, and use /r:machine: for names on remote sites w/out FTP access."
71 (let* ((files (project-dist-files (ede-toplevel)))
72 (upload (if (string= (oref (ede-toplevel) ftp-upload-site
) "")
73 (oref (ede-toplevel) ftp-site
)
74 (oref (ede-toplevel) ftp-upload-site
))))
75 (when (or (string= upload
"")
76 (not (file-exists-p upload
)))
77 (error "Upload directory %S does not exist" upload
))
79 (let ((localfile (concat (file-name-directory (oref (ede-toplevel) file
))
81 (if (not (file-exists-p localfile
))
83 (message "File %s does not exist yet. Building a distribution"
86 (error "File %s does not exist yet. Building a distribution"
90 (concat (directory-file-name upload
)
92 (file-name-nondirectory localfile
)))
93 (copy-file localfile upload
)
94 (setq files
(cdr files
)))))
95 (message "Done uploading files...")
98 (defun ede-upload-html-documentation ()
99 "Upload the current distributions documentation as HTML.
100 Use /user@ftp.site.com: file names for FTP sites.
101 Download tramp, and use /r:machine: for names on remote sites w/out FTP access."
103 (let* ((files nil
) ;(ede-html-doc-files (ede-toplevel)))
104 (upload (if (string= (oref (ede-toplevel) ftp-upload-site
) "")
105 (oref (ede-toplevel) ftp-site
)
106 (oref (ede-toplevel) ftp-upload-site
))))
107 (when (or (string= upload
"")
108 (not (file-exists-p upload
)))
109 (error "Upload directory %S does not exist" upload
))
111 (let ((localfile (concat (file-name-directory (oref (ede-toplevel) file
))
113 (if (not (file-exists-p localfile
))
115 (message "File %s does not exist yet. Building a distribution"
117 ;;(project-compile-target ... )
118 (error "File %s does not exist yet. Building a distribution"
121 (copy-file localfile upload
)
122 (setq files
(cdr files
)))))
123 (message "Done uploading files...")
128 ;; Do a few nice things with Version control systems.
129 (defun ede-vc-project-directory ()
130 "Run `vc-dir' on the current project."
132 (let ((top (ede-toplevel-project-or-nil default-directory
)))
135 (provide 'ede
/system
)
137 ;;; ede/system.el ends here