3 # b43-asm preprocessing frontend
5 # Copyright (c) 2007 Michael Buesch <mb@bu3sch.de>
6 # Licensed under the GNU/GPL version 2.
10 # The b43-asm backend binary
12 # The C preprocessor binary
16 # This variable is changed by the installer scripts.
18 if [ $installed -eq 0 ] && [ -x "./$B43_ASM" ]; then
22 # Probe the CPP binary
23 $CPP --help >/dev/null 2>&1
25 echo "ERROR: Failed to execute the C preprocessor \"$CPP\""
28 # Probe the b43-asm binary
29 $B43_ASM a b --help >/dev/null 2>&1
31 echo "ERROR: Failed to execute the b43-asm binary \"$B43_ASM\""
45 if [ "$1" == "--cpp-args" ]; then
47 while [ "$1" != "--" ]; do
49 echo "ERROR: --cpp-args must be terminated by --"
52 cpp_args="$cpp_args $1"
58 if [ "$infile" != "-" ]; then
59 if ! [ -r "$infile" ]; then
60 echo "ERROR: Can not read input file \"$infile\""
65 $CPP -x c++ -traditional-cpp $cpp_args "$infile" | $B43_ASM "-" "$outfile" --__real_infile "$infile" $@