Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
asdf
asdf
Commits
b5a78bcb
Commit
b5a78bcb
authored
May 20, 2014
by
Francois-Rene Rideau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better document parameter passing between make and asdf-tools
Count (values) as returning code 0 (success) for main.
parent
2fd31ee0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
12 deletions
+33
-12
Makefile
Makefile
+19
-1
tools/git.lisp
tools/git.lisp
+2
-2
tools/main.lisp
tools/main.lisp
+3
-4
tools/test-environment.lisp
tools/test-environment.lisp
+9
-5
No files found.
Makefile
View file @
b5a78bcb
...
...
@@ -38,8 +38,26 @@ Makefile:
@
:
### Default fall back rule: delegate to asdf-tools.
# Note that the l= L= etc. are the only way I (Faré) have found to
# pass arguments from the Makefile to the underlying script:
# l= overrides $ASDF_TEST_LISPS to specify which lisp implementations to use
# L= overrides $ASDF_UPGRADE_TEST_LISPS (defaults to the former) to lisps during upgrade
# s= overrides $ASDF_TEST_SYSTEMS to specify systems with which to test ASDF
# t= overrides $ASDF_TESTS to specify test script patterns to use (default to *.script)
# u= overrides $ASDF_UPGRADE_TEST_TAGS to specify versions to upgrade from (e.g. 3.0.3 or REQUIRE)
# U= overrides $ASDF_UPGRADE_TEST_METHODS to specify upgrade methods
# v= overrides the default next version for bump-version or bump.
# see in tools/test-environment.lisp for details.
# To have a list of commands, see make help or ./tools/asdf-tools help
# Note that when you call ./tools/asdf-tools directly,
# you may have to use positional parameters instead (unless you use env as below), as in
# ./tools/asdf-tools bump 3.2.1
# instead of
# make bump v=3.2.1
# or
# ./tools/asdf-tools env v=3.2.1 bump
%
:
build/asdf.lisp
@
echo
"Delegating
$@
to asdf-tools"
;
\
./tools/asdf-tools
make-target
$@
l
=
"
$l
"
L
=
"
$L
"
u
=
"
$u
"
U
=
"
$u
"
v
=
"
$v
"
s
=
"
$s
"
t
=
"
$t
"
./tools/asdf-tools
env
l
=
"
$l
"
L
=
"
$L
"
u
=
"
$u
"
U
=
"
$u
"
v
=
"
$v
"
s
=
"
$s
"
t
=
"
$t
"
$@
.PHONY
:
all driver-files defsystem-files
tools/git.lisp
View file @
b5a78bcb
...
...
@@ -44,12 +44,12 @@
(
defun
fix-local-git-tags
()
"delete wrongful tags from local git repository"
(
dolist
(
tag
*wrongful-tags*
)
(
git
`
(
tag
-d
,
tag
)
:on-error
t
)))
(
git
`
(
tag
-d
,
tag
)
:on-error
nil
)))
(
defun
fix-remote-git-tags
(
&optional
(
remote
"origin"
))
"delete wrongful tags from remote git repository"
(
dolist
(
tag
*wrongful-tags*
)
(
git
`
(
push
,
remote
(
:refs/tags/,tag
))
:on-error
t
)))
(
git
`
(
push
,
remote
(
:refs/tags/,tag
))
:on-error
nil
)))
(
defun
git-all-committed-p
()
"is your checkout clean, with all files committed?"
...
...
tools/main.lisp
View file @
b5a78bcb
;;;; Generic code to interface a Lisp script to the shell command-line.
(
in-package
:asdf-tools
)
(
defun
re
(
arg
)
...
...
@@ -58,7 +57,7 @@
(
loop
:for
x
:in
(
sort
(
public-commands
)
'string<
:key
'command-name
)
:do
(
format
t
"~(~27A~)~@[ ~A~]~%"
(
command-name
x
)
(
short-function-description
x
)))
t
)
(
values
)
)
(
t
(
let
((
x
(
find-command
x
)))
(
when
x
...
...
@@ -66,7 +65,7 @@
(
command-name
x
)
(
or
())
;; TODO: remember the arguments to deftestcmd, translate to v=, etc
(
documentation
x
'function
))
t
)))))
(
values
)
)))))
;;; Main entry point.
;;; NB: For access control, you could check that only exported symbols are used as entry points.
...
...
@@ -80,7 +79,7 @@
(
multiple-value-list
(
apply
fun
(
rest
args
)))))
(
when
results
(
format
t
"~&~{~S~%~}"
results
))
(
return
(
first
results
))))
(
return
(
or
(
null
results
)
(
first
results
)))))
;; Trick: (values) counts as T, not NIL.
(
format
t
"Command ~A not found~%"
(
first
args
))
(
return
)))
...
...
tools/test-environment.lisp
View file @
b5a78bcb
...
...
@@ -72,18 +72,22 @@
(
declare
(
ignore
r
))
(
unless
(
emptyp
val
)
(
setf
(
symbol-value
sym
)
(
funcall
transformer
val
)))
(
return
))
(
return
t
))
(
error
"Unknown variable ~A"
var
)))
(
error
"Unrecognized argument ~A"
def
)
))
nil
))
(
defun
show-environment
()
(
loop
:for
(
v
)
:in
*environment-variable-specs*
:do
(
format
t
"~A = ~S~%"
v
(
symbol-value
v
)))
t
)
(
defun
make-target
(
target
&rest
env
)
(
map
()
'test-definition
env
)
(
shell-boolean-exit
(
main
(
list
target
))))
(
defun
env
(
&rest
env
)
(
loop
:for
(
first
.
rest
)
:on
env
:unless
(
test-definition
first
)
:return
(
if-let
(
c
(
find-command
first
))
(
apply
c
rest
)
(
progn
(
format
t
"Command ~A not found~%"
first
)
nil
))
:finally
(
progn
(
format
t
"No command provided~%"
)
(
return
))))
(
eval-when
(
:compile-toplevel
:load-toplevel
:execute
)
(
defun
decl-or-docstring-p
(
form
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment