1@echo off
2
3set PublicHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\JavaScriptCore
4set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private\JavaScriptCore
5set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin\JavaScriptCore.resources
6
7if "%1" EQU "clean" goto :clean
8if "%1" EQU "rebuild" call :clean
9
10echo Copying public headers...
11mkdir "%PublicHeadersDirectory%" 2>NUL
12for %%f in (
13    APICast.h
14    APIShims.h
15    JSBase.h
16    JSContextRef.h
17    JSContextRefPrivate.h
18    JSObjectRef.h
19    JSObjectRefPrivate.h
20    JSRetainPtr.h
21    JSRetainPtr.h
22    JSStringRef.h
23    JSStringRefBSTR.h
24    JSStringRefCF.h
25    JSValueRef.h
26    JSWeakObjectMapRefInternal.h
27    JSWeakObjectMapRefPrivate.h
28    JavaScript.h
29    JavaScriptCore.h
30    OpaqueJSString.h
31    WebKitAvailability.h
32) do (
33    xcopy /y /d ..\..\API\%%f "%PublicHeadersDirectory%" >NUL
34)
35
36echo Copying private headers...
37mkdir "%PrivateHeadersDirectory%" 2>NUL
38for %%d in (
39    assembler
40    bytecode
41    heap
42    debugger
43    interpreter
44    jit
45    parser
46    profiler
47    runtime
48    wtf
49    wtf\text
50    wtf\unicode
51    wtf\unicode\icu
52    yarr
53) do (
54    xcopy /y /d ..\..\%%d\*.h "%PrivateHeadersDirectory%" >NUL
55)
56
57echo Copying resources...
58mkdir "%ResourcesDirectory%" 2>NUL
59xcopy /y /d ..\JavaScriptCore.resources\* "%ResourcesDirectory%" >NUL
60
61echo Copying other files...
62for %%f in (
63    create_hash_table
64    wtf\text\AtomicString.cpp
65    wtf\text\StringBuilder.cpp
66    wtf\text\StringImpl.cpp
67    wtf\text\WTFString.cpp
68) do (
69    xcopy /y /d ..\..\%%f "%PrivateHeadersDirectory%" >NUL
70)
71
72goto :EOF
73
74:clean
75
76echo Deleting copied files...
77if exist "%PublicHeadersDirectory%" rmdir /s /q "%PublicHeadersDirectory%" >NUL
78if exist "%PrivateHeadersDirectory%" rmdir /s /q "%PrivateHeadersDirectory%" >NUL
79if exist "%ResourcesDirectory%" rmdir /s /q "%ResourcesDirectory%" >NUL
80