File: build-test.sh

package info (click to toggle)
netsurf 3.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 51,332 kB
  • ctags: 27,027
  • sloc: ansic: 279,666; xml: 81,901; objc: 8,341; cpp: 5,716; perl: 4,127; makefile: 1,894; yacc: 1,509; jsp: 1,156; sh: 895; lex: 479; asm: 288; python: 121; php: 6
file content (31 lines) | stat: -rwxr-xr-x 1,210 bytes parent folder | download | duplicates (5)
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
#!/bin/bash
#
# This is a simple script to recompile a C test file.
# Usage:
# This script is designed to run under test output directory.
# 
# You should firstly run "run-test.sh", which will genrate a test output directory. In that
# directory, there are C source files and corresponding executables.
#
# ../../../build-test.sh some-test-converted-c-file.c
#
#  This file is part of libdom test suite.
#  Licensed under the MIT License,
#                 http://www.opensource.org/licenses/mit-license.php
#  Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>

src="testutils/comparators.c testutils/domtsasserts.c testutils/foreach.c testutils/list.c testutils/load.c testutils/utils.c testutils/domtscondition.c"
domdir="../build-Linux-Linux-debug-lib-static"
ldflags="-L$domdir -ldom -L/usr/local/lib  -lwapcaplet -L/usr/lib -lxml2 -lhubbub -lparserutils"
#ldflags="-L/usr/lib -lm -lz -L$domdir -ldom -L/usr/local/lib  -lwapcaplet -lxml2 -lhubbub -lparserutils"
cflags="-Itestutils/ -I../bindings/xml  -I../include -I../bindings/hubbub -I/usr/local/include"

sf="$1";
echo $sf;
cwd=$(pwd);
cd ../../../
exe=${sf%%.c};
cfile="$cwd"/"$sf";
gcc -g $cflags $src $cfile $ldflags -o $exe;
mv $exe $cwd;
cd $cwd;