File: gentest.bat

package info (click to toggle)
libgd2 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,360 kB
  • sloc: ansic: 48,194; sh: 5,603; cpp: 1,298; makefile: 323; perl: 225; tcl: 45
file content (35 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download | duplicates (2)
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
SETLOCAL ENABLEDELAYEDEXPANSION
@echo off
set testsdir=%~1
set builddir=%~2
set CFLAGS=%~3
set LDFLAGS=%~4
set CC=%~5
set LD=%~6
set TESTMK=%~7
set TESTLIST=%~8
echo %*
echo recieved !testsdir! !builddir! !CFLAGS! !LDFLAGS! !CC!

copy NUL !TESTMK! > nul
copy NUL !TESTLIST! > nul

for /D %%d in (!testsdir!/*) do (
	if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
		echo TEST_EXES=!builddir!\tests\%%d_%%~nf.exe ^$^(TEST_EXES^) >> !TESTMK!
	)
)

for /D %%d in (!testsdir!/*) do (
    if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
		echo !builddir!\%%d_%%~nf.obj: !testsdir!\%%d\%%f; ^$^(CC^) ^$^(TEST_CFLAGS^) /c ^$** /Fd$*.pdb /Fo:$@  >> !TESTMK!
	)
)

for /D %%d in (!testsdir!/*) do (
    if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
		echo !builddir!\tests\%%d_%%~nf.exe: !builddir!\%%d_%%~nf.obj; !LD! !LDFLAGS! $** /out:$@ >> !TESTMK!
		echo %%d_%%~nf.exe >> !TESTLIST!
	)
)
ENDLOCAL