Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 67f6ec8fcd7823f51263833e9273c37df5f5c60b Sean Bryant committed Oct 2, 2011
Showing with 129 additions and 0 deletions.
  1. 0 .gitignore
  2. +25 −0 Makefile
  3. +3 −0 README
  4. +7 −0 clcss.asd
  5. +1 −0 src/clcss.lisp
  6. +10 −0 src/make/00-sys.mk
  7. +6 −0 src/make/01-lisp.mk
  8. +35 −0 src/make/02-quicklisp.mk
  9. +20 −0 src/make/03-asdf.mk
  10. +10 −0 src/make/04-help.mk
  11. +4 −0 src/package.lisp
  12. +6 −0 tests/test.lisp
  13. +2 −0 vendor/README.txt
No changes.
@@ -0,0 +1,25 @@
+#-*- mode:makefile-gmake; -*-
+ROOT ?= $(shell pwd)
+TARGET ?= clcss
+include $(ROOT)/src/make/*.mk
+
+README ?= README.txt
+define HELP
+ if [ "$(VERBOSITY)" -gt "1" ]; then \
+ echo "$(README)"; \
+ echo "---------"; \
+ cat $(ROOT)/$(README); \
+ echo "---------"; \
+ echo; \
+ fi
+
+ echo "Interesting targets:"
+ echo "--------------------"
+ echo "make help"
+ echo " This noise"
+ echo
+ echo "make init"
+ echo " Configures the submodules, vendor packages, user lisp dependencies"
+ echo " and anything else needed to actually boot the package"
+ echo
+endef
3 README
@@ -0,0 +1,3 @@
+clcss
+
+crappy css parsing.
@@ -0,0 +1,7 @@
+(defsystem clcss
+ :name "clcss"
+ :depends-on ()
+ ;; :in-order-to ((test-op (load-op clcss-test)))
+ :components ((:module "src"
+ :components ((:file "package")
+ (:file "clcss" :depends-on ("package"))))))
@@ -0,0 +1 @@
+(in-package :clcss)
@@ -0,0 +1,10 @@
+.DEFAULT_GOAL=help
+VERBOSITY ?= 2 # [0, 3]
+
+# Helper
+SHUTUP = > /dev/null 2> /dev/null
+
+init: sanity-check quicklisp asdf
+
+sanity-check: $(ROOT)/$(TARGET).asd $(LISP) $(QL_SETUP)
+ @echo "!> Environment looks sane. I'll allow this."
@@ -0,0 +1,6 @@
+# Lithp thtuff
+LISP ?= $(shell which sbcl || echo /sbcl/does/not/exist)
+
+# Asdf configuration
+REGISTRYD ?= $(HOME)/.config/common-lisp/source-registry.conf.d
+
@@ -0,0 +1,35 @@
+#Quicklisp
+QL_ROOT_NAME ?= quicklisp
+QL_URL ?= "https://github.com/quicklisp/quicklisp-bootstrap/raw/master/quicklisp.lisp"
+QL_ROOT_PATH = $(HOME)/$(QL_ROOT_NAME)
+QL_SETUP = $(QL_ROOT_PATH)/setup.lisp
+
+quicklisp: $(LISP) $(QL_SETUP) quicklisp-test
+
+quicklisp-test:
+ @echo "=> Verifying Quicklisp load ...\c"
+ @$(LISP) --eval '(sb-ext:disable-debugger)' \
+ --load $(QL_SETUP) \
+ --eval '(quit :unix-status (if (find-package :ql) 0 1))' $(SHUTUP) \
+ || { E=$$?; echo " [ERROR]"; exit $$E; }
+ @echo " [OK]"
+
+$(QL_SETUP):
+ @echo "=> Installing quicklisp"
+ @curl -L $(QL_URL) > /tmp/quicklisp.lisp; \
+ $(LISP) --eval '(sb-ext:disable-debugger)' --load /tmp/quicklisp.lisp \
+ --eval '(quicklisp-quickstart:install :path "$(QL_ROOT_PATH)/")' \
+ --eval '(quit)';
+
+quicklisp-rc:
+ @$(LISP) --eval '(sb-ext:disable-debugger)' \
+ --eval '(quit :unix-status (if (find-package :ql) 0 1))' $(SHUTUP) \
+ && { echo "[error] You already have Quicklisp in your rc"; exit 1; } \
+ || { $(MAKE) quicklisp-rc-install; }
+
+quicklisp-rc-install: $(QL_SETUP)
+ @echo "=> Installing quicklisp into your RC file"
+ @$(LISP) --eval '(sb-ext:disable-debugger)' \
+ --load $(QL_SETUP) \
+ --eval '(ql-util:without-prompting (ql:add-to-init-file))' \
+ --eval '(quit)' $(SHUTUP)
@@ -0,0 +1,20 @@
+ASDF_CONF = (:directory \"$(ROOT)/\")
+ASDF_CONF_NAME = $(REGISTRYD)/"$(TARGET)-02.conf"
+
+VENDOR_ASDF_CONF = (:tree \"$(ROOT)/vendor/\")
+VENDOR_ASDF_CONF_NAME = $(REGISTRYD)/"$(TARGET)-01.conf"
+
+asdf: | $(REGISTRYD) $(ASDF_CONF_NAME) $(VENDOR_ASDF_CONF_NAME)
+ @echo "Added $(TARGET) in $(ROOT) to ASDF registry"
+
+$(REGISTRYD):
+ @echo "=> Creating ASDF registry configuration directory"
+ mkdir -p $(REGISTRYD)
+
+$(ASDF_CONF_NAME):
+ @echo "=> Installing: $(ASDF_CONF_NAME)"
+ echo "$(ASDF_CONF)" > $(ASDF_CONF_NAME)
+
+$(VENDOR_ASDF_CONF_NAME):
+ @echo "=> Installing: $(VENDOR_ASDF_CONF_NAME)"
+ echo "$(VENDOR_ASDF_CONF)" > $(VENDOR_ASDF_CONF_NAME)
@@ -0,0 +1,10 @@
+help:
+ @$(HELP)
+
+info:
+ @echo "Root: $(ROOT)"
+ @echo "Target: $(TARGET)"
+ @echo "Lisp: $(LISP)"
+ @echo "Quicklisp: $(QL_SETUP)"
+ @echo "Verbosity: $(VERBOSITY)"
+
@@ -0,0 +1,4 @@
+(defpackage :clcss
+ (:use :cl))
+
+(in-package :clcss)
@@ -0,0 +1,6 @@
+(defpackage :clcss-tests
+ (:use :cl :clcss))
+
+(in-package :clcss-tests)
+
+(defparameter *css* `("h1" "#my-id" ".my-class" "div#body" "div.my-class" ".indent p"))
@@ -0,0 +1,2 @@
+Put git submodules of other systems here, if you do so, add a git init call to the `init' target or
+document that one must be done.

0 comments on commit 67f6ec8

Please sign in to comment.