From 4f8197b21ba7793b100682e051792e44de9e1843 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 19 May 2006 00:11:17 +0000 Subject: [PATCH] fix mkincludes.ss, change arg order, fix uses svn: r2983 --- src/mzscheme/Makefile.in | 2 +- src/mzscheme/mkincludes.ss | 22 ++++++++-------------- src/worksp-vc70/mzscheme/mzscheme.vcproj | 4 ++-- src/worksp/mzscheme/mzscheme.vcproj | 4 ++-- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/mzscheme/Makefile.in b/src/mzscheme/Makefile.in index 71572f1f60..f8f8f187bf 100644 --- a/src/mzscheme/Makefile.in +++ b/src/mzscheme/Makefile.in @@ -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" diff --git a/src/mzscheme/mkincludes.ss b/src/mzscheme/mkincludes.ss index b70e37e2a1..69df067f67 100644 --- a/src/mzscheme/mkincludes.ss +++ b/src/mzscheme/mkincludes.ss @@ -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) diff --git a/src/worksp-vc70/mzscheme/mzscheme.vcproj b/src/worksp-vc70/mzscheme/mzscheme.vcproj index 9d6572a81c..5c9860623b 100644 --- a/src/worksp-vc70/mzscheme/mzscheme.vcproj +++ b/src/worksp-vc70/mzscheme/mzscheme.vcproj @@ -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 diff --git a/src/worksp/mzscheme/mzscheme.vcproj b/src/worksp/mzscheme/mzscheme.vcproj index 92d22a59d3..f07eb516a0 100644 --- a/src/worksp/mzscheme/mzscheme.vcproj +++ b/src/worksp/mzscheme/mzscheme.vcproj @@ -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