-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdist.bat
152 lines (127 loc) · 3.28 KB
/
dist.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@echo off
rem Modify this to your installed directory
set SASH="%ProgramFiles%\Sagittarius\sash.exe"
goto :entry
:invoke
set COMMAND=%1
shift
%SASH% %COMMAND% %*
rem return to caller
goto:eof
rem insn
:insn
echo Generating instructions files
cd src
%SASH% geninsn %1
cd ..
goto:eof
rem precomp
:precomp
echo Generating compiled library files
cd src
%SASH% genlib %1
cd ..
call :insn dummy %1
cd tools\scripts
echo Generating builtin keywords
%SASH% builtin-keywords.scm
echo Generating builtin symbols
%SASH% builtin-symbols.scm
cd ..\..
goto:eof
rem stub
:stub
echo Generating library from stub
cd src
%SASH% genstub %1
cd ..
goto:eof
rem srfi
:srfi
echo Generating R7RS style SRFI libraries
%SASH% -L./sitelib ./tools/scripts/r7rs-srfi-gen.scm^
-p ./ext -p ./sitelib/srfi %1
goto:eof
rem tzdata
:tz
echo Generating TZ database
%SASH% ./tools/scripts/compile-tzdatabase.scm^
-o ext/time/sagittarius/tzdata.scm^
-w ext/time/sagittarius/win-mappings.scm^
-l ext/time/sagittarius/leap-table.scm^
-r %1
goto:eof
rem unicode
:unicode
echo Generating Unicode codepoints
%SASH% ./tools/scripts/compile-unicode.scm %1
if "%1" == "-c" goto:unicode_end
md sitelib\sagittarius\char-sets
%SASH% ./tools/scripts/extract-unicode-props.scm^
-l"(sagittarius char-sets grapheme)"^
-o sitelib/sagittarius/char-sets/grapheme.scm^
--derived unicode/data/GraphemeBreakProperty.txt^
Prepend Control Extend ZWJ spacing-mark=SpacingMark^
extend-or-spacing-mark=Extend,SpacingMark Regional_Indicator^
hangul-l=:L hangul-v=:V hangul-t=:T hangul-lv=:LV hangul-lvt=:LVT
%SASH% ./tools/scripts/extract-unicode-props.scm^
-l"(sagittarius char-sets word)"^
-o sitelib/sagittarius/char-sets/word.scm^
--derived unicode/data/WordBreakProperty.txt^
Newline Extend ZWJ Regional_Indicator Format^
Katakana Hebrew_Letter a-letter=ALetter mid-num-let=MidNumLet^
mid-letter=MidLetter mid-num=MidNum Numeric^
extend-num-let=ExtendNumLet w-seg-space=WSegSpace
%SASH% ./tools/scripts/extract-unicode-props.scm^
-l"(sagittarius char-sets emojis)"^
-o sitelib/sagittarius/char-sets/emojis.scm^
--derived unicode/data/emoji-data.txt^
Emoji Emoji_Presentation Emoji_Modifier^
Emoji_Modifier_Base Emoji_Component^
Extended_Pictographic
:unicode_end
goto:eof
rem html
:html
echo Generating HTML entities
%SASH% ./tools/scripts/html-entities.scm -o sitelib/text/xml/entities-list.scm %1
goto:eof
rem gen
:gen
call :stub
call :precomp
call :srfi
call :tz
call :unicode
call :html
goto:eof
rem clean
:clean
call :stub "-c"
call :precomp "-c"
call :srfi "-c"
call :tz "-c"
call :unicode "-c"
call :html "-c"
goto:eof
rem entry point
:entry
if not exist %SASH% goto err
if "%1"=="" goto usage
for %%x in (%*) do call :%%x
goto end
:usage
echo usage: %0 precomp|stub|srfi|tz|clean
echo gen: generates all files
echo precomp: generates precompiled files
echo stub: generates stub files
echo srfi: generates R7RS style SRFI libraries
echo tz: generates TZ database
echo unicode: generates Unicode codepoints
echo html: generates HTML entries
echo clean: cleasn generated files
goto :end
:err
echo Sagittarius is not installed. Default %SASH%
:end
exit /b 0