1@echo off
2
3setlocal
4REM limit path to DOS-only for this file to avoid confusion between DOS rmdir and Cygwin's variant
5set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
6set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private
7
8if "%1" EQU "clean" goto :clean
9if "%1" EQU "rebuild" call :clean
10
11for %%d in (
12    wtf
13    wtf\cf
14    wtf\dtoa
15    wtf\gobject
16    wtf\text
17    wtf\threads
18    wtf\unicode
19    wtf\unicode\icu
20    wtf\win
21) do (
22    mkdir "%PrivateHeadersDirectory%\%%d" 2>NUL
23    xcopy /y /d ..\%%d\*.h "%PrivateHeadersDirectory%\%%d" >NUL
24)
25
26echo Copying other files...
27for %%f in (
28    ..\JavaScriptCore\create_hash_table
29    wtf\text\AtomicString.cpp
30    wtf\text\StringBuilder.cpp
31    wtf\text\StringImpl.cpp
32    wtf\text\WTFString.cpp
33) do (
34    echo F | xcopy /y /d ..\%%f "%PrivateHeadersDirectory%\%%f" >NUL
35)
36
37goto :EOF
38
39:clean
40
41echo Deleting copied files...
42if exist "%PrivateHeadersDirectory%" rmdir /s /q "%PrivateHeadersDirectory%" >NUL
43endlocal
44
45