From: Mark Wooding Date: Mon, 17 Aug 2015 16:41:58 +0000 (+0100) Subject: src/: Split the frontend out into its own separate system. X-Git-Tag: 0.2.0~73 X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/7bfe3a370a6a56a0f097fc1e357ca8ac798d9d4b?hp=4aae7df085804dfce0e0f0c5fe82a9568fccfc1a src/: Split the frontend out into its own separate system. It has additional dependencies, which is rather less than ideal. --- diff --git a/src/frontend.lisp b/src/frontend.lisp index 8138a5a..e7b515a 100644 --- a/src/frontend.lisp +++ b/src/frontend.lisp @@ -23,7 +23,11 @@ ;;; along with SOD; if not, write to the Free Software Foundation, ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -(cl:in-package #:sod) +(cl:defpackage #:sod-frontend + (:use #:common-lisp #:optparse #:sod #:sod-parser) + (:shadowing-import-from #:optparse "INT")) + +(cl:in-package #:sod-frontend) ;;;-------------------------------------------------------------------------- ;;; The main program. diff --git a/src/package.lisp b/src/package.lisp index 75dc7fd..60da8ea 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -26,7 +26,6 @@ (cl:defpackage #:sod (:use #:common-lisp #:sod-utilities - #:optparse #:sod-parser)) ;;;----- That's all, folks -------------------------------------------------- diff --git a/src/sod-frontend.asd b/src/sod-frontend.asd new file mode 100644 index 0000000..348c4be --- /dev/null +++ b/src/sod-frontend.asd @@ -0,0 +1,58 @@ +;;; -*-lisp-*- +;;; +;;; System definition for the Sensible Object Design front end +;;; +;;; (c) 2015 Straylight/Edgeware +;;; + +;;;----- Licensing notice --------------------------------------------------- +;;; +;;; This file is part of the Sensble Object Design, an object system for C. +;;; +;;; SOD is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 2 of the License, or +;;; (at your option) any later version. +;;; +;;; SOD is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with SOD; if not, write to the Free Software Foundation, +;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +(cl:defpackage #:sod-sysdef + (:use #:common-lisp #:asdf)) + +(cl:in-package #:sod-sysdef) + +;;;-------------------------------------------------------------------------- +;;; Definition. + +(defsystem sod-frontend + + ;; Boring copyright stuff. + :version "1.0.0" + :author "Mark Wooding" + :license "GNU General Public License, version 2 or later" + + ;; Documentation. + :description "A Sensible Object Design for C, command-line frontend." + + :long-description + "The Sensible Object Design (SOD) is a fairly simple, yet powerful object + system for plain old C. + + This system provides a command-line interface to the SOD translator. It's + a separate system because it has additional dependencies and + Lisp-system-specific code." + + :depends-on ("sod") + + :components + ((:file "optparse") + (:file "frontend" :depends-on ("optparse")))) + +;;;----- That's all, folks -------------------------------------------------- diff --git a/src/sod.asd b/src/sod.asd index d1791a3..c819725 100644 --- a/src/sod.asd +++ b/src/sod.asd @@ -63,7 +63,6 @@ :components ((:file "utilities") - (:file "optparse" :depends-on ("utilities")) ;; Parser equipment. This is way more elaborate than it needs to be, but ;; it was interesting, and it may well get split off into a separate @@ -98,7 +97,7 @@ (:file "scanner-context-impl" :depends-on ("parser-proto" "scanner-proto")))) - (:file "package" :depends-on ("utilities" "optparse" "parser")) + (:file "package" :depends-on ("utilities" "parser")) ;; Lexical analysis. (:file "lexer-proto" :depends-on ("package" "parser")) @@ -163,11 +162,7 @@ ;; Class output. (:file "class-output" :depends-on ("classes" "class-layout-proto" "class-layout-impl" - "method-proto" "method-impl" "output-proto")) - - ;; User interface. - (:file "frontend" :depends-on - ("optparse" "module-proto" "module-parse")))) + "method-proto" "method-impl" "output-proto")))) ;;;-------------------------------------------------------------------------- ;;; Testing.