Home | History | Annotate | Line # | Download | only in templates
      1 #!/bin/bash
      2 
      3 rm -f *.aml *.asl *.dsl *.log
      4 
      5 files=`ls`
      6 
      7 if [ "$1" == 1 ]; then
      8 	ASL_COMPILER="../../generate/unix/bin/iasl"
      9 else
     10 	ASL_COMPILER="iasl"
     11 fi
     12 
     13 echo "Using $ASL_COMPILER"
     14 
     15 #
     16 # Create and compile the terse (normal) templates just
     17 # to ensure that they will emit and compile
     18 #
     19 $ASL_COMPILER -T ALL > /dev/null 2>&1
     20 $ASL_COMPILER *.asl > /dev/null 2>&1
     21 
     22 rm -f *.aml *.asl *.dsl *.log
     23 
     24 # Create the templates (use verbose mode)
     25 
     26 $ASL_COMPILER -vt -T ALL > /dev/null 2>&1
     27 
     28 # Compile the templates
     29 
     30 $ASL_COMPILER *.asl > /dev/null 2>&1
     31 
     32 # Disassemble the compiled templates
     33 
     34 $ASL_COMPILER -d *.aml > /dev/null 2>&1
     35 
     36 > diff.log
     37 
     38 #
     39 # Compare templates to compiled/disassembled templates
     40 #
     41 for f in $files ; do
     42     if [ "$f" != "$0" ] && [ "$f" != "Makefile" ]; then
     43         sig=`echo $f | awk -F. '{print $1}'`
     44 
     45         # Ignore differences in the comment/header field
     46 
     47         diff -pu -I" \*" $sig.asl $sig.dsl >> diff.log
     48     fi
     49 done
     50