Function: ede-proj-load

ede-proj-load is a byte-compiled function defined in proj.el.gz.

Signature

(ede-proj-load PROJECT &optional ROOTPROJ)

Documentation

Load a project file from PROJECT directory.

If optional ROOTPROJ is provided then ROOTPROJ is the root project for the tree being read in. If ROOTPROJ is nil, then assume that the PROJECT being read in is the root project.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/proj.el.gz
;;; Code:
(defun ede-proj-load (project &optional rootproj)
  "Load a project file from PROJECT directory.
If optional ROOTPROJ is provided then ROOTPROJ is the root project
for the tree being read in.  If ROOTPROJ is nil, then assume that
the PROJECT being read in is the root project."
  (save-excursion
    (let ((ret (eieio-persistent-read (concat project "Project.ede")
				      'ede-proj-project))
	  (subdirs (directory-files project nil "[^.].*" nil)))
      (if (not (object-of-class-p ret 'ede-proj-project))
	  (error "Corrupt project file"))
      (oset ret directory project)
      (oset ret rootproject rootproj)

      ;; Load the project file of each subdirectory containing a
      ;; loadable Project.ede.
      (while subdirs
	(let ((sd (file-name-as-directory
		   (expand-file-name (car subdirs) project))))
	  (if (and (file-directory-p sd)
		   (file-exists-p (expand-file-name "Project.ede" sd)))
	      (oset ret subproj
		    (cons (ede-proj-load sd (or rootproj ret))
			  (oref ret subproj))))
	  (setq subdirs (cdr subdirs))))
      ret)))