]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/ede/project-am.el
Update copyright year to 2014 by running admin/update-copyright.
[gnu-emacs] / lisp / cedet / ede / project-am.el
index c4fd938f11ff5db43718bc0e4cdb5d9b2ea914aa..09c8ec0daf75536a5a13e05a42a1a6202c388eae 100644 (file)
@@ -1,7 +1,7 @@
 ;;; project-am.el --- A project management scheme based on automake files.
 
-;; Copyright (C) 1998, 1999, 2000, 2003, 2005, 2007, 2008, 2009, 2010, 2011
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1998-2000, 2003, 2005, 2007-2014 Free Software
+;; Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Version: 0.0.3
@@ -55,7 +55,7 @@
 (defcustom project-am-compile-project-command nil
   "*Default command used to compile a project."
   :group 'project-am
-  :type 'string)
+  :type '(choice (const nil) string))
 
 (defcustom project-am-compile-target-command (concat ede-make-command " -k %s")
   "*Default command used to compile a project."
@@ -205,7 +205,7 @@ OT is the object target.  DIR is the directory to start in."
                                                         (oref amf targets))
                                      nil t))))
         ;; The input target might be new.  See if we can find it.
-        (amf (ede-load-project-file (oref ot path)))
+        (amf (ede-target-parent ot))
         (ot (object-assoc target 'name (oref amf targets)))
         (ofn (file-name-nondirectory (buffer-file-name))))
     (if (not ot)
@@ -214,7 +214,6 @@ OT is the object target.  DIR is the directory to start in."
               target (project-am-preferred-target-type (buffer-file-name)))))
     (ede-with-projectfile ot
       (makefile-move-to-macro (project-am-macro ot))
-      (ede-maybe-checkout)
       (makefile-end-of-command)
       (insert " " ofn)
       (makefile-fill-paragraph nil)
@@ -226,10 +225,6 @@ OT is the object target.  DIR is the directory to start in."
   "Remove the current buffer from any project targets."
   (ede-with-projectfile ot
     (makefile-move-to-macro (project-am-macro ot))
-    (if (and buffer-read-only vc-mode
-            (y-or-n-p "Checkout Makefile.am from VC? "))
-       (vc-toggle-read-only t))
-    (ede-maybe-checkout)
     (makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd))))
     (replace-match "" t t nil 0)
     (makefile-fill-paragraph nil)
@@ -271,7 +266,6 @@ buffer being in order to provide a smart default target type."
     (if (not ot) (error "Error creating target object %S" ntype))
     (ede-with-projectfile ot
       (goto-char (point-min))
-      (ede-maybe-checkout)
       (makefile-next-dependency)
       (if (= (point) (point-min))
          (goto-char (point-max))
@@ -290,7 +284,7 @@ buffer being in order to provide a smart default target type."
                (progn (forward-line -1)
                       (end-of-line)
                       (insert "\n"))
-             ;; If the above search fails, thats ok.  We'd just want to be at
+             ;; If the above search fails, that's ok.  We'd just want to be at
              ;; point-min anyway.
              )
            (makefile-insert-macro (car (cdr (cdr ntype))))))
@@ -434,7 +428,7 @@ Argument COMMAND is the command to use for compiling the target."
 If a given set of projects has already been loaded, then do nothing
 but return the project for the directory given.
 Optional ROOTPROJ is the root EDE project."
-  (let* ((ede-constructiong t)
+  (let* ((ede-constructing t)
         (amo (object-assoc (expand-file-name "Makefile.am" directory)
                            'file ede-projects)))
     (when (not amo)
@@ -665,7 +659,7 @@ Strip out duplicates, and recurse on variables."
       ;; their object still exists!
       ;; FIGURE THIS OUT
       (project-am-expand-subdirlist 'csubprojexpanded csubproj)
-      ;; Ok, now lets look at all our sub-projects.
+      ;; Ok, now let's look at all our sub-projects.
       (mapc (lambda (sp)
              (let* ((subdir (file-name-as-directory
                              (expand-file-name
@@ -842,7 +836,7 @@ nil means that this buffer belongs to no-one."
   (oref this :name))
 
 (defmethod project-compile-target-command ((this project-am-texinfo))
-  "Default target t- use when compling a texinfo file."
+  "Default target t- use when compiling a texinfo file."
   (let ((n (oref this :name)))
     (if (string-match "\\.texi?\\(nfo\\)?" n)
        (setq n (replace-match ".info" t t n)))
@@ -902,10 +896,10 @@ files in the project."
     out))
 
 
-;;; Configure.in queries.
+;;; Configure.ac queries.
 ;;
 (defvar project-am-autoconf-file-options
-  '("configure.in" "configure.ac")
+  '("configure.ac" "configure.in")
   "List of possible configure files to look in for project info.")
 
 (defun project-am-autoconf-file (dir)
@@ -954,7 +948,7 @@ Kill the Configure buffer if it was not already in a buffer."
        (configfiles nil)
        )
     (cond
-     ;; Try configure.in or configure.ac
+     ;; Try configure.ac or configure.in
      (conf-in
       (project-am-with-config-current conf-in
        (let ((aci (autoconf-parameters-for-macro "AC_INIT"))
@@ -1020,4 +1014,8 @@ per file or in .dir-locals.el or similar."
 
 (provide 'ede/project-am)
 
+;; Local variables:
+;; generated-autoload-load-name: "ede/project-am"
+;; End:
+
 ;;; ede/project-am.el ends here