Backup
This commit is contained in:
parent
23713dbdda
commit
8ebf31bdfb
8
Makefile
8
Makefile
|
|
@ -60,6 +60,12 @@ build-gauche:
|
||||||
echo "gosh -r7 -I ${PREFIX}/lib/compile-scheme -I ${PREFIX}/lib/compile-scheme/libs ${PREFIX}/lib/compile-scheme/compile-scheme.scm \"\$$@\"" >> compile-scheme
|
echo "gosh -r7 -I ${PREFIX}/lib/compile-scheme -I ${PREFIX}/lib/compile-scheme/libs ${PREFIX}/lib/compile-scheme/compile-scheme.scm \"\$$@\"" >> compile-scheme
|
||||||
chmod +x compile-scheme
|
chmod +x compile-scheme
|
||||||
|
|
||||||
|
build-gauche.bat:
|
||||||
|
echo "@echo off" > compile-scheme.bat
|
||||||
|
echo "; & @echo off & gosh.exe -r7 \"%~f0\" %* & exit /b" > compile-scheme.bat
|
||||||
|
echo "gosh -r7 -I ${PREFIX}/lib/compile-scheme -I ${PREFIX}/lib/compile-scheme/libs ${PREFIX}/lib/compile-scheme/compile-scheme.scm \"\$$@\"" >> compile-scheme
|
||||||
|
chmod +x compile-scheme
|
||||||
|
|
||||||
build-guile:
|
build-guile:
|
||||||
echo "#!/bin/sh" > compile-scheme
|
echo "#!/bin/sh" > compile-scheme
|
||||||
echo "guile --r7rs --auto-compile -I -q -L ${PREFIX}/lib/compile-scheme ${PREFIX}/lib/compile-scheme/compile-scheme.scm \"\$$@\"" >> compile-scheme
|
echo "guile --r7rs --auto-compile -I -q -L ${PREFIX}/lib/compile-scheme ${PREFIX}/lib/compile-scheme/compile-scheme.scm \"\$$@\"" >> compile-scheme
|
||||||
|
|
@ -94,7 +100,7 @@ install:
|
||||||
install compile-scheme ${PREFIX}/bin/compile-scheme
|
install compile-scheme ${PREFIX}/bin/compile-scheme
|
||||||
mkdir -p ${PREFIX}/share/man/man1
|
mkdir -p ${PREFIX}/share/man/man1
|
||||||
cp doc/compile-scheme.1 ${PREFIX}/share/man/man1/
|
cp doc/compile-scheme.1 ${PREFIX}/share/man/man1/
|
||||||
if [ -d /etc/bash_completion.d ]; then cp bash_completion.sh /etc/bash_completion.d/compile-scheme; fi
|
-if [ -d /etc/bash_completion.d ]; then cp bash_completion.sh /etc/bash_completion.d/compile-scheme; fi
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf ${PREFIX}/lib/compile-scheme
|
rm -rf ${PREFIX}/lib/compile-scheme
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
echo "Hello from compile-scheme"
|
||||||
|
|
@ -122,19 +122,31 @@
|
||||||
|
|
||||||
(define compilation-target
|
(define compilation-target
|
||||||
(cond
|
(cond
|
||||||
((member "-t" (command-line))
|
((member "--target" (command-line))
|
||||||
(cadr (member "-t" (command-line))))
|
(string->symbol (cadr (member "--target" (command-line)))))
|
||||||
(else
|
(else
|
||||||
(cond-expand (windows 'windows)
|
(cond-expand (windows 'windows)
|
||||||
(else 'unix)))))
|
(else 'unix)))))
|
||||||
|
|
||||||
|
(when debug?
|
||||||
|
(display "compilation-target: ")
|
||||||
|
(write compilation-target)
|
||||||
|
(newline))
|
||||||
|
|
||||||
(define output-file
|
(define output-file
|
||||||
(let ((outfile
|
(let ((outfile
|
||||||
(cond
|
(cond
|
||||||
((member "-o" (command-line))
|
((member "-o" (command-line))
|
||||||
(cadr (member "-o" (command-line))))
|
(cadr (member "-o" (command-line))))
|
||||||
(input-file (string-cut-from-end input-file 4)))))
|
(input-file (string-cut-from-end input-file 4)))))
|
||||||
outfile))
|
(if (symbol=? compilation-target 'windows)
|
||||||
|
(string-append outfile ".bat")
|
||||||
|
outfile)))
|
||||||
|
|
||||||
|
(when debug?
|
||||||
|
(display "output-file: ")
|
||||||
|
(write output-file)
|
||||||
|
(newline))
|
||||||
|
|
||||||
(define prepend-directories
|
(define prepend-directories
|
||||||
(letrec ((looper (lambda (rest result)
|
(letrec ((looper (lambda (rest result)
|
||||||
|
|
@ -182,13 +194,13 @@
|
||||||
(apply (cdr (assoc 'command (cdr (assoc scheme data))))
|
(apply (cdr (assoc 'command (cdr (assoc scheme data))))
|
||||||
(list
|
(list
|
||||||
(cond
|
(cond
|
||||||
((symbol=? compilation-target 'windows) "")
|
((symbol=? compilation-target 'windows) "; & @echo off &")
|
||||||
(else "exec"))
|
(else "exec"))
|
||||||
(cond
|
(cond
|
||||||
((symbol=? compilation-target 'windows) "%0%")
|
((symbol=? compilation-target 'windows) "\"%~f0\"")
|
||||||
(else "\"$0\""))
|
(else "\"$0\""))
|
||||||
(cond
|
(cond
|
||||||
((symbol=? compilation-target 'windows) "")
|
((symbol=? compilation-target 'windows) "%* & exit /b")
|
||||||
(else "\"$@\""))
|
(else "\"$@\""))
|
||||||
(if input-file input-file "")
|
(if input-file input-file "")
|
||||||
(if output-file output-file "")
|
(if output-file output-file "")
|
||||||
|
|
@ -246,11 +258,15 @@
|
||||||
(cond
|
(cond
|
||||||
((symbol=? compilation-target 'windows)
|
((symbol=? compilation-target 'windows)
|
||||||
(for-each
|
(for-each
|
||||||
|
display
|
||||||
|
`(,scheme-command ,scheme-program))
|
||||||
|
#;(for-each
|
||||||
display
|
display
|
||||||
`(";dir; start /WAIT " ,scheme-command " && exit"
|
`(";dir; start /WAIT " ,scheme-command " && exit"
|
||||||
#\newline
|
#\newline
|
||||||
,scheme-program
|
,scheme-program
|
||||||
)))
|
))
|
||||||
|
)
|
||||||
(else
|
(else
|
||||||
(for-each
|
(for-each
|
||||||
display
|
display
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
if not exist "%ProgramFiles%\compile-scheme" mkdir "%ProgramFiles%\compile-scheme"
|
||||||
|
if not exist "%ProgramFiles%\compile-scheme" mkdir "%ProgramFiles%\compile-scheme\libs"
|
||||||
|
xcopy compile-scheme.bat "%ProgramFiles%\compile-scheme\" /y
|
||||||
|
xcopy compile-scheme.scm "%ProgramFiles%\compile-scheme\" /y
|
||||||
|
xcopy libs\implementations.sld "%ProgramFiles%\compile-scheme\libs\" /y
|
||||||
|
xcopy libs\library-util.sld "%ProgramFiles%\compile-scheme\libs\" /y
|
||||||
|
xcopy libs\util.sld "%ProgramFiles%\compile-scheme\libs\" /y
|
||||||
|
setx path "%PATH%;%ProgramFiles%\compile-scheme"
|
||||||
Loading…
Reference in New Issue