Squashed 'third_party/lisp/asdf-flv/' content from commit fc5b739
git-subtree-dir: third_party/lisp/asdf-flv git-subtree-split: fc5b7399767ca35bfb420bbeb9e08494e441dc69
This commit is contained in:
commit
45fea96d8d
7 changed files with 224 additions and 0 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
sbcl-*/
|
||||
cmu-*/
|
||||
openmcl-*/
|
77
Makefile
Normal file
77
Makefile
Normal file
|
@ -0,0 +1,77 @@
|
|||
### Makefile --- Toplevel directory
|
||||
|
||||
## Copyright (C) 2011, 2015 Didier Verna
|
||||
|
||||
## Author: Didier Verna <didier@didierverna.net>
|
||||
|
||||
## This file is part of ASDF-FLV.
|
||||
|
||||
## Copying and distribution of this file, with or without modification,
|
||||
## are permitted in any medium without royalty provided the copyright
|
||||
## notice and this notice are preserved. This file is offered as-is,
|
||||
## without any warranty.
|
||||
|
||||
|
||||
### Commentary:
|
||||
|
||||
## Contents management by FCM version 0.1.
|
||||
|
||||
|
||||
### Code:
|
||||
|
||||
PROJECT := asdf-flv
|
||||
VERSION := 2.1
|
||||
|
||||
W3DIR := $(HOME)/www/software/lisp/$(PROJECT)
|
||||
|
||||
DIST_NAME := $(PROJECT)-$(VERSION)
|
||||
TARBALL := $(DIST_NAME).tar.gz
|
||||
SIGNATURE := $(TARBALL).asc
|
||||
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
-rm *~
|
||||
|
||||
distclean: clean
|
||||
-rm *.tar.gz *.tar.gz.asc
|
||||
|
||||
tag:
|
||||
git tag -a -m 'Version $(VERSION)' 'version-$(VERSION)'
|
||||
|
||||
tar: $(TARBALL)
|
||||
gpg: $(SIGNATURE)
|
||||
dist: tar gpg
|
||||
|
||||
install-www: dist
|
||||
-install -m 644 $(TARBALL) "$(W3DIR)/attic/"
|
||||
-install -m 644 $(SIGNATURE) "$(W3DIR)/attic/"
|
||||
echo "\
|
||||
<? lref (\"$(PROJECT)/attic/$(PROJECT)-$(VERSION).tar.gz\", \
|
||||
contents (\"Dernière version\", \"Latest version\")); ?> \
|
||||
| \
|
||||
<? lref (\"$(PROJECT)/attic/$(PROJECT)-$(VERSION).tar.gz.asc\", \
|
||||
contents (\"Signature GPG\", \"GPG Signature\")); ?>" \
|
||||
> "$(W3DIR)/latest.txt"
|
||||
chmod 644 "$(W3DIR)/latest.txt"
|
||||
cd "$(W3DIR)" \
|
||||
&& ln -fs attic/$(TARBALL) latest.tar.gz \
|
||||
&& ln -fs attic/$(SIGNATURE) latest.tar.gz.asc
|
||||
|
||||
update-version:
|
||||
perl -pi -e 's/:version ".*"/:version "$(VERSION)"/' \
|
||||
net.didierverna.$(PROJECT).asd
|
||||
|
||||
$(TARBALL):
|
||||
git archive --format=tar --prefix=$(DIST_NAME)/ \
|
||||
--worktree-attributes HEAD \
|
||||
| gzip -c > $@
|
||||
|
||||
$(SIGNATURE): $(TARBALL)
|
||||
gpg -b -a $<
|
||||
|
||||
|
||||
.PHONY: all clean distclean tag tar gpg dist install-www update-version
|
||||
|
||||
### Makefile ends here
|
7
README.md
Normal file
7
README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
ASDF-FLV provides support for file-local variables through ASDF. A file-local
|
||||
variable behaves like `*PACKAGE*` and `*READTABLE*` with respect to `LOAD` and
|
||||
`COMPILE-FILE`: a new dynamic binding is created before processing the file,
|
||||
so that any modification to the variable essentially becomes file-local.
|
||||
|
||||
In order to make one or several variables file-local, use the macros
|
||||
`SET-FILE-LOCAL-VARIABLE(S)`.
|
64
asdf-flv.lisp
Normal file
64
asdf-flv.lisp
Normal file
|
@ -0,0 +1,64 @@
|
|||
;;; asdf-flv.lisp --- Implementation
|
||||
|
||||
;; Copyright (C) 2011, 2015 Didier Verna
|
||||
|
||||
;; Author: Didier Verna <didier@didierverna.net>
|
||||
|
||||
;; This file is part of ASDF-FLV.
|
||||
|
||||
;; Copying and distribution of this file, with or without modification,
|
||||
;; are permitted in any medium without royalty provided the copyright
|
||||
;; notice and this notice are preserved. This file is offered as-is,
|
||||
;; without any warranty.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Contents management by FCM version 0.1.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(in-package :net.didierverna.asdf-flv)
|
||||
|
||||
|
||||
(defvar *file-local-variables* ()
|
||||
"List of file-local special variables.")
|
||||
|
||||
|
||||
(defun make-variable-file-local (symbol)
|
||||
"Make special variable named by SYMBOL have a file-local value."
|
||||
(pushnew symbol *file-local-variables*))
|
||||
|
||||
(defmacro set-file-local-variable (symbol)
|
||||
"Set special variable named by SYMBOL as file-local.
|
||||
SYMBOL need not be quoted."
|
||||
`(make-variable-file-local ',symbol))
|
||||
|
||||
(defun make-variables-file-local (&rest symbols)
|
||||
"Make special variables named by SYMBOLS have a file-local value."
|
||||
(dolist (symbol symbols)
|
||||
(pushnew symbol *file-local-variables*)))
|
||||
|
||||
(defmacro set-file-local-variables (&rest symbols)
|
||||
"Set special variables named by SYMBOLS as file-local.
|
||||
SYMBOLS need not be quoted."
|
||||
`(make-variables-file-local ,@(mapcar (lambda (symbol) (list 'quote symbol))
|
||||
symbols)))
|
||||
|
||||
|
||||
(defmethod asdf:perform :around
|
||||
((operation asdf:load-op) (file asdf:cl-source-file))
|
||||
"Establish new dynamic bindings for file-local variables."
|
||||
(progv *file-local-variables*
|
||||
(mapcar #'symbol-value *file-local-variables*)
|
||||
(call-next-method)))
|
||||
|
||||
(defmethod asdf:perform :around
|
||||
((operation asdf:compile-op) (file asdf:cl-source-file))
|
||||
"Establish new dynamic bindings for file-local variables."
|
||||
(progv *file-local-variables*
|
||||
(mapcar #'symbol-value *file-local-variables*)
|
||||
(call-next-method)))
|
||||
|
||||
;;; asdf-flv.lisp ends here
|
43
net.didierverna.asdf-flv.asd
Normal file
43
net.didierverna.asdf-flv.asd
Normal file
|
@ -0,0 +1,43 @@
|
|||
;;; net.didierverna.asdf-flv.asd --- ASDF system definition
|
||||
|
||||
;; Copyright (C) 2011, 2015 Didier Verna
|
||||
|
||||
;; Author: Didier Verna <didier@didierverna.net>
|
||||
|
||||
;; This file is part of ASDF-FLV.
|
||||
|
||||
;; Copying and distribution of this file, with or without modification,
|
||||
;; are permitted in any medium without royalty provided the copyright
|
||||
;; notice and this notice are preserved. This file is offered as-is,
|
||||
;; without any warranty.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Contents management by FCM version 0.1.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(asdf:defsystem :net.didierverna.asdf-flv
|
||||
:long-name "ASDF File Local Variables"
|
||||
:description "ASDF extension to provide support for file-local variables."
|
||||
:long-description "\
|
||||
ASDF-FLV provides support for file-local variables through ASDF. A file-local
|
||||
variable behaves like *PACKAGE* and *READTABLE* with respect to LOAD and
|
||||
COMPILE-FILE: a new dynamic binding is created before processing the file, so
|
||||
that any modification to the variable becomes essentially file-local.
|
||||
|
||||
In order to make one or several variables file-local, use the macros
|
||||
SET-FILE-LOCAL-VARIABLE(S)."
|
||||
:author "Didier Verna"
|
||||
:mailto "didier@didierverna.net"
|
||||
:homepage "http://www.lrde.epita.fr/~didier/software/lisp/misc.php#asdf-flv"
|
||||
:source-control "https://github.com/didierverna/asdf-flv"
|
||||
:license "GNU All Permissive"
|
||||
:version "2.1"
|
||||
:serial t
|
||||
:components ((:file "package")
|
||||
(:file "asdf-flv")))
|
||||
|
||||
;;; net.didierverna.asdf-flv.asd ends here
|
28
package.lisp
Normal file
28
package.lisp
Normal file
|
@ -0,0 +1,28 @@
|
|||
;;; package.lisp --- Package definition
|
||||
|
||||
;; Copyright (C) 2011, 2015 Didier Verna
|
||||
|
||||
;; Author: Didier Verna <didier@didierverna.net>
|
||||
|
||||
;; This file is part of ASDF-FLV.
|
||||
|
||||
;; Copying and distribution of this file, with or without modification,
|
||||
;; are permitted in any medium without royalty provided the copyright
|
||||
;; notice and this notice are preserved. This file is offered as-is,
|
||||
;; without any warranty.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Contents management by FCM version 0.1.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(in-package :cl-user)
|
||||
|
||||
(defpackage :net.didierverna.asdf-flv
|
||||
(:use :cl)
|
||||
(:export :set-file-local-variable :set-file-local-variables))
|
||||
|
||||
;;; package.lisp ends here
|
Loading…
Reference in a new issue