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