Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Eric Timmons
asdf
Commits
b0b8a8bc
Commit
b0b8a8bc
authored
Jan 01, 2014
by
Francois-Rene Rideau
Browse files
Fix the default suffix and type of with-temporary-file.
Fix the the handling of :directory in run-program when using system.
parent
fde68061
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/test-sysdef-asdf.script
View file @
b0b8a8bc
...
...
@@ -13,15 +13,17 @@
(defun system-lisp-files (system)
(loop :for f :in (required-components system :keep-component 'cl-source-file)
:collect (
enough-
namestring (component-pathname f) *asdf-directory*)))
:collect (namestring
(enough-pathname
(component-pathname f) *asdf-directory*)))
)
(defun makefile-lisp-files (target)
(remove-if 'emptyp
(split-string
(split-string
;; NB: assumes GNU make
(run-program `("make" "--quiet" "--no-print-directory" ,target)
:output :string :error-output t :directory *asdf-directory*)
:separator #(#\space #\newline #\return #\tab))))
#+clisp (trace run-program reduce/strcat)
(defmacro compare-files (system target)
`(assert-equal (system-lisp-files ,system) (makefile-lisp-files ,target)))
...
...
uiop/run-program.lisp
View file @
b0b8a8bc
...
...
@@ -761,7 +761,8 @@ It returns a process-info plist with possible keys:
(
reduce/strcat
(
append
before
(
redirect
in
" <"
)
(
redirect
out
" >"
)
(
redirect
err
" 2>"
)
(
when
(
and
directory
(
os-unix-p
))
`
(
"cd "
(
escape-shell-token
directory
)
" ; "
))
(
when
(
and
directory
(
os-unix-p
))
`
(
" ; cd "
,
(
escape-shell-token
(
native-namestring
directory
))))
after
)))))
(
defun
%system
(
command
&rest
keys
...
...
uiop/stream.lisp
View file @
b0b8a8bc
...
...
@@ -535,14 +535,15 @@ If a string, repeatedly read and evaluate from it, returning the last values."
(
defun
call-with-temporary-file
(
thunk
&key
(
want-stream-p
t
)
(
want-pathname-p
t
)
(
direction
:io
)
keep
after
directory
prefix
suffix
(
type
"
.
tmp"
)
directory
(
type
"tmp"
typep
)
prefix
(
suffix
(
when
type
p
"
-
tmp"
)
)
(
element-type
*default-stream-element-type*
)
(
external-format
*utf-8-external-format*
))
"Call a THUNK with stream and/or pathname arguments identifying a temporary file.
The temporary file's pathname will be based on concatenating
PREFIX (defaults to \"uiop\"), a random alphanumeric string,
and optional SUFFIX and TYPE (defaults to \".tmp\"),
and optional SUFFIX (defaults to \"-tmp\" if a type was provided)
and TYPE (defaults to \"tmp\", using a dot as separator if not NIL),
within DIRECTORY (defaulting to the TEMPORARY-DIRECTORY) if the PREFIX isn't absolute.
The file will be open with specified DIRECTION (defaults to :IO),
...
...
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