automake build system
[mech_eap.orig] / testing / compile_wireless_versions
1 #!/bin/sh
2
3 TMP=tmp.compile_wireless_versions
4
5 if [ ! -r $TMP ]; then
6     cvs export -D now -d $TMP hostap
7     pushd $TMP/driver/modules
8     for f in hostap_hw hostap_cs hostap_pci hostap_plx; do
9         mv $f.c $f.c.orig
10         cat $f.c.orig |
11         sed "s%^#include <linux/wireless.h>%#include "\"wireless-test.h\""%" |
12         sed "s%^#include <net/iw_handler.h>%#include "\"iw_handler-test.h\""%" \
13         > $f.c
14     done
15     popd
16 fi
17
18 cd $TMP
19
20 for i in ../wireless/wireless-*.h; do
21     echo $i
22     ver=`echo $i | sed "s%.*wireless-\([0-9]*\).*%\1%"`
23     cp $i driver/modules/wireless-test.h
24     case $ver in
25         13)
26             cp ../wireless/iw_handler-2.h driver/modules/iw_handler-test.h
27             ;;
28         14 | 15)
29             cp ../wireless/iw_handler-3.h driver/modules/iw_handler-test.h
30             ;;
31         *)
32             rm -f driver/modules/iw_handler-test.h
33             ;;
34     esac
35     make clean > /dev/null
36     if ! make pccard pci plx > log.$ver 2>&1; then
37         echo "Errors while compiling version $ver"
38     fi
39 done