-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.bat
More file actions
executable file
·47 lines (36 loc) · 1.24 KB
/
Build.bat
File metadata and controls
executable file
·47 lines (36 loc) · 1.24 KB
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
@echo off
goto header
ActivePerl 用の ppm モジュールを生成する
事前に dmake モジュールを導入しておくこと ( ppm install dmake )
正常に終了すると .ppmx ファイルが生成されるので次のように使用する
ppm install *.ppmx
:header
set mod=Thread-Logger
set moc=Thread::Logger
perl Makefile.PL
if not "%ERRORLEVEL%" == "0" goto error
dmake test
if not "%ERRORLEVEL%" == "0" goto error
dmake ppd
if not "%ERRORLEVEL%" == "0" goto error
for /f "usebackq" %%t in (`perl -Ilib -M%moc% -e "print $%moc%::VERSION"`) do set ver=%%t
perl -p -e "s/<ARCHITECTURE.*/<ARCHITECTURE NAME=\"noarch\"\/>/" %mod%.ppd > %mod%-%ver%.ppd
set filename="%mod%-%ver%.ppmx"
if not exist %filename% goto file_skip
del %filename%
:file_skip
del /q /s .exists > nul
for /f %%d in ('dir /ad /b /s') do rd /q %%d 2>nul
for /f %%d in ('dir /ad /b /s') do rd /q %%d 2>nul
for /f %%d in ('dir /ad /b /s') do rd /q %%d 2>nul
for /f %%d in ('dir /ad /b /s') do rd /q %%d 2>nul
for /f %%d in ('dir /ad /b /s') do rd /q %%d 2>nul
ptar.bat -v -c -C -z -f %filename% blib %mod%-%ver%.ppd
if not "%ERRORLEVEL%" == "0" goto error
@echo on
echo === Success ===
goto end
:error
@echo on
echo === Failed ===
:end