Initial Commit
[packages] / xemacs-packages / ede / ede-proj-archive.el
1 ;;; ede-proj-archive.el --- EDE Generic Project archive support
2
3 ;;;  Copyright (C) 1998, 1999, 2000, 2001  Eric M. Ludlam
4
5 ;; Author: Eric M. Ludlam <zappo@gnu.org>
6 ;; Keywords: project, make
7 ;; RCS: $Id: ede-proj-archive.el,v 1.1 2007-11-26 15:22:07 michaels Exp $
8
9 ;; This software is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
13
14 ;; This software is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
23
24 ;;; Commentary:
25 ;;
26 ;; Handle object code archives in and EDE Project file.
27
28 (require 'ede-pmake)
29 (require 'ede-proj-obj)
30
31 ;;; Code:
32 (defclass ede-proj-target-makefile-archive
33   (ede-proj-target-makefile-objectcode)
34   ()
35   "This target generates an object code archive.")
36
37 (defvar ede-gcc-archive-compiler
38   (clone ede-gcc-compiler
39          "ede-c-archive-compiler"
40          :name "ar"
41          :commands '("$(AR) $@ $^")
42          :autoconf '(("AC_CHECK_PROGS" . "RANLIB, ranlib"))
43          )
44   "Create an archive of C code.")
45
46 (defmethod ede-proj-makefile-insert-source-variables :BEFORE
47   ((this ede-proj-target-makefile-archive))
48   "Insert bin_PROGRAMS variables needed by target THIS.
49 We aren't acutally inserting SOURCE details, but this is used by the
50 Makefile.am generator, so use it to add this important bin program."
51   (ede-pmake-insert-variable-shared
52       (concat "lib" (ede-name this) "_a_LIBRARIES")
53     (insert (concat "lib" (ede-name this) ".a"))))
54
55 (defmethod ede-proj-makefile-insert-rules
56   ((this ede-proj-target-makefile-archive))
57   "Create the make rule needed to create an archive for THIS."
58   (call-next-method)
59   (insert "# Sorry, rule for making archive " (ede-name this)
60           "has not yet been implemented.\n\n")
61   )
62
63
64 (provide 'ede-proj-archive)
65
66 ;;; ede-proj-archive.el ends here