fix mkincludes.ss, change arg order, fix uses

svn: r2983
This commit is contained in:
Eli Barzilay 2006-05-19 00:11:17 +00:00
parent 621ad09135
commit 4f8197b21b
4 changed files with 13 additions and 19 deletions

View File

@ -214,7 +214,7 @@ mark:
$(MAKE) $(srcdir)/src/mzmark.c
headers:
./mzscheme -qr $(srcdir)/mkincludes.ss "$(includepltdir)" . "$(srcdir)"
./mzscheme -qr $(srcdir)/mkincludes.ss "$(includepltdir)" "$(srcdir)" .
$(MAKE) $(srcdir)/../../collects/mzscheme/lib/mzdyn.c
# mzdyn.c, used for MacOS "library"

View File

@ -1,21 +1,15 @@
;; This is used to create the include directory.
;; Should be called with two to three command-line arguments:
;; 1. The directory where "include" should be created (plthome),
;; 2. The location of mzconfig,
;; 3. The location of the src/mzscheme directory, (defaults to src/mzscheme in
;; the first argument).
;; Should be called with three command-line arguments:
;; 1. The include directory that should be created,
;; 2. The location of the src/mzscheme directory,
;; 3. The location of mzconfig.
(define-values (incdir mzconfdir mzsrcdir)
(define-values (incdir mzsrcdir mzconfdir)
(let ([args (vector->list argv)])
(define (dir path)
(parameterize ([current-directory path])
(current-directory ".") (current-directory)))
(values (dir (car args))
(dir (cadr args))
(if (null? (cddr args))
(build-path (dir (car args)) "src" "mzscheme")
(dir (caddr args))))))
(define (dir path) (normal-case-path (simplify-path (expand-path path))))
(unless (= 3 (length args)) (error 'mkincludes "bad arguments"))
(apply values (map dir args))))
(printf "Making ~a\n" incdir)

View File

@ -50,7 +50,7 @@ if exist "$(TargetPath)" goto :MzOK
echo Error: did not find $(TargetPath)
exit 1
:MzOK
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..\..\mzscheme\src ..
if errorlevel 1 exit 1
cd ..\..\mzscheme\dynsrc
mkmzdynd.bat
@ -114,7 +114,7 @@ if exist "$(TargetPath)" goto :MzOK
echo Error: did not find $(TargetPath)
exit 1
:MzOK
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..\..\mzscheme\src ..
if errorlevel 1 exit 1
cd ..\..\mzscheme\dynsrc
mkmzdyn.bat

View File

@ -50,7 +50,7 @@ if exist "$(TargetPath)" goto :MzOK
echo Error: did not find $(TargetPath)
exit 1
:MzOK
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..\..\mzscheme\src ..
if errorlevel 1 exit 1
cd ..\..\mzscheme\dynsrc
mkmzdynd.bat
@ -120,7 +120,7 @@ if exist "$(TargetPath)" goto :MzOK
echo Error: did not find $(TargetPath)
exit 1
:MzOK
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..
"$(TargetPath)" -qr ..\..\mzscheme\mkincludes.ss "$(TargetDir)/" ..\..\mzscheme\src ..
if errorlevel 1 exit 1
cd ..\..\mzscheme\dynsrc
mkmzdyn.bat