Dash:
[t2.git] / misc / tools-source / fl_wrapper_test.sh
blob4163f96b23a478acfdd1492cac2df139965e2c36
1 #!/bin/sh
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 #
6 # T2 SDE: misc/tools-source/fl_wrapper_test.sh
7 # Copyright (C) 2004 - 2005 The T2 SDE Project
8 # Copyright (C) 1998 - 2003 ROCK Linux Project
9 #
10 # More information can be found in the files COPYING and README.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; version 2 of the License. A copy of the
15 # GNU General Public License can be found in the file COPYING.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 for x in exec{l,v}{,p,e} ; do
19 touch fltest_$x ; done
21 bash misc/tools-source/fl_wrapper.c.sh > fl_wrapper.c
22 gcc -O2 -shared -fPIC -Wall -ldl fl_wrapper.c -o fl_wrapper.so
24 echo -n > rlog.txt
25 echo -n > wlog.txt
27 export FLWRAPPER_RLOG=rlog.txt
28 export FLWRAPPER_WLOG=wlog.txt
30 gcc misc/tools-source/fl_wrapper_test.c -o fltest_bin
31 LD_PRELOAD=./fl_wrapper.so ./fltest_bin
33 #rm fltest_* fl_wrapper.so