Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #!/bin/bash
  2. #
  3. # This is a simple script to recompile a C test file.
  4. # Usage:
  5. # This script is designed to run under test output directory.
  6. #
  7. # You should firstly run "run-test.sh", which will genrate a test output directory. In that
  8. # directory, there are C source files and corresponding executables.
  9. #
  10. # ../../../build-test.sh some-test-converted-c-file.c
  11. #
  12. #  This file is part of libdom test suite.
  13. #  Licensed under the MIT License,
  14. #                 http://www.opensource.org/licenses/mit-license.php
  15. #  Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
  16.  
  17. src="testutils/comparators.c testutils/domtsasserts.c testutils/foreach.c testutils/list.c testutils/load.c testutils/utils.c testutils/domtscondition.c"
  18. domdir="../build-Linux-Linux-debug-lib-static"
  19. ldflags="-L$domdir -ldom -L/usr/local/lib  -lwapcaplet -L/usr/lib -lxml2 -lhubbub -lparserutils"
  20. #ldflags="-L/usr/lib -lm -lz -L$domdir -ldom -L/usr/local/lib  -lwapcaplet -lxml2 -lhubbub -lparserutils"
  21. cflags="-Itestutils/ -I../bindings/xml  -I../include -I../bindings/hubbub -I/usr/local/include"
  22.  
  23. sf="$1";
  24. echo $sf;
  25. cwd=$(pwd);
  26. cd ../../../
  27. exe=${sf%%.c};
  28. cfile="$cwd"/"$sf";
  29. gcc -g $cflags $src $cfile $ldflags -o $exe;
  30. mv $exe $cwd;
  31. cd $cwd;
  32.