1 ;;; ede-system.el --- EDE working with the system (VC, FTP, ETC)
3 ;; Copyright (C) 2001-2003, 2009-2012 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.
36 (defun ede-web-browse-home ()
37 "Browse the home page of the current project."
39 (if (not (ede-toplevel))
41 (let ((home (oref (ede-toplevel) web-site-url
)))
43 (error "Now URL is stored in this project"))
49 (defun ede-edit-web-page ()
50 "Edit the web site for this project."
52 (let* ((toplevel (ede-toplevel))
53 (dir (oref toplevel web-site-directory
))
54 (file (oref toplevel web-site-file
))
55 (endfile (concat (file-name-as-directory dir
) file
)))
56 (if (string-match "^/r[:@]" endfile
)
58 (when (not (file-exists-p endfile
))
60 (if (string-match "^/r[:@]" endfile
)
62 (if (not (file-exists-p endfile
))
63 (error "No project file found")))
67 (defun ede-upload-distribution ()
68 "Upload the current distribution to the correct location.
69 Use /user@ftp.site.com: file names for FTP sites.
70 Download tramp, and use /r:machine: for names on remote sites w/out FTP access."
72 (let* ((files (project-dist-files (ede-toplevel)))
73 (upload (if (string= (oref (ede-toplevel) ftp-upload-site
) "")
74 (oref (ede-toplevel) ftp-site
)
75 (oref (ede-toplevel) ftp-upload-site
))))
76 (when (or (string= upload
"")
77 (not (file-exists-p upload
)))
78 (error "Upload directory %S does not exist" upload
))
80 (let ((localfile (concat (file-name-directory (oref (ede-toplevel) file
))
82 (if (not (file-exists-p localfile
))
84 (message "File %s does not exist yet. Building a distribution"
87 (error "File %s does not exist yet. Building a distribution"
91 (concat (directory-file-name upload
)
93 (file-name-nondirectory localfile
)))
94 (copy-file localfile upload
)
95 (setq files
(cdr files
)))))
96 (message "Done uploading files...")
100 (defun ede-upload-html-documentation ()
101 "Upload the current distributions documentation as HTML.
102 Use /user@ftp.site.com: file names for FTP sites.
103 Download tramp, and use /r:machine: for names on remote sites w/out FTP access."
105 (let* ((files nil
) ;(ede-html-doc-files (ede-toplevel)))
106 (upload (if (string= (oref (ede-toplevel) ftp-upload-site
) "")
107 (oref (ede-toplevel) ftp-site
)
108 (oref (ede-toplevel) ftp-upload-site
))))
109 (when (or (string= upload
"")
110 (not (file-exists-p upload
)))
111 (error "Upload directory %S does not exist" upload
))
113 (let ((localfile (concat (file-name-directory (oref (ede-toplevel) file
))
115 (if (not (file-exists-p localfile
))
117 (message "File %s does not exist yet. Building a distribution"
119 ;;(project-compile-target ... )
120 (error "File %s does not exist yet. Building a distribution"
123 (copy-file localfile upload
)
124 (setq files
(cdr files
)))))
125 (message "Done uploading files...")
130 ;; Do a few nice things with Version control systems.
133 (defun ede-vc-project-directory ()
134 "Run `vc-dir' on the current project."
136 (let ((top (ede-toplevel-project-or-nil default-directory
)))
139 (provide 'ede
/system
)
142 ;; generated-autoload-file: "loaddefs.el"
143 ;; generated-autoload-load-name: "ede/system"
146 ;;; ede/system.el ends here