Skip to content

Commit

Permalink
Add *LICENSE* and *AUTHOR* special variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
xach committed Mar 10, 2012
1 parent 6fb7e91 commit 1d85ddd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.lisp
@@ -1,9 +1,12 @@
;;;; package.lisp

(defpackage #:quickproject
(:docuemntation "The Quickproject package.")
(:use #:cl)
(:export #:make-project
#:*after-make-project-hooks*))
#:*after-make-project-hooks*
#:*author*
#:*license*))

(in-package #:quickproject)

13 changes: 13 additions & 0 deletions quickproject.lisp
Expand Up @@ -2,6 +2,13 @@

(in-package #:quickproject)

(defvar *author*
"Your Name <your.name@example.com>"
"Set this variable to your contact information.")

(defvar *license*
"Specify license here")

(defun uninterned-symbolize (name)
"Return an uninterned symbol named after NAME, which is treated as a
string designator and upcased."
Expand All @@ -12,6 +19,10 @@ string designator and upcased."
(let ((*print-case* :downcase))
(format stream "(asdf:defsystem ~S~%" (uninterned-symbolize name))
(format stream " :serial t~%")
(format stream " :description \"Describe ~A here\"~%"
name)
(format stream " :author ~S~%" *author*)
(format stream " :license ~S~%" *license*)
(when depends-on
(format stream " :depends-on (~{~S~^~%~15T~})~%"
(mapcar #'uninterned-symbolize depends-on)))
Expand Down Expand Up @@ -69,6 +80,8 @@ not already exist."

(defun make-project (pathname &key
depends-on
((:author *author*) *author*)
((:license *license*) *license*)
(name (pathname-project-name pathname) name-provided-p))
"Create a project skeleton for NAME in PATHNAME. If DEPENDS-ON is provided,
it is used as the asdf defsystem depends-on list."
Expand Down

0 comments on commit 1d85ddd

Please sign in to comment.