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