/[gxemul]/trunk/src/devices/makeautodev.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/makeautodev.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC
# Line 27  Line 27 
27  #  SUCH DAMAGE.  #  SUCH DAMAGE.
28  #  #
29  #  #
30  #  $Id: makeautodev.sh,v 1.5 2005/11/09 06:35:45 debug Exp $  #  $Id: makeautodev.sh,v 1.6 2006/02/09 20:02:59 debug Exp $
31    
32    
33  printf "Generating autodev.c... "  printf "Generating autodev.c... "
# Line 39  printf "/*\n *  DO NOT EDIT. AUTOMATICAL Line 39  printf "/*\n *  DO NOT EDIT. AUTOMATICAL
39  cat autodev_head.c >> autodev.c  cat autodev_head.c >> autodev.c
40    
41  printf "4"  printf "4"
42  for a in dev_*.o; do  for a in dev_*.c; do
43          B=`echo $a|cut -c5-|sed s/\\\\.o//g`          B=`grep DEVINIT $a`
44          if grep devinit_$B dev_$B.c > /dev/null; then          if [ z"$B" != z ]; then
45                  printf "int devinit_$B(struct devinit *);\n" >> autodev.c                  C=`grep DEVINIT $a | cut -d \( -f 2|cut -d \) -f 1`
46                    for B in $C; do
47                            printf "int devinit_$B(struct devinit *);\n" >> autodev.c
48                    done
49          fi          fi
50  done  done
51    
# Line 61  done Line 64  done
64  cat autodev_middle.c >> autodev.c  cat autodev_middle.c >> autodev.c
65    
66  printf "2"  printf "2"
67  for a in dev_*.o; do  for a in dev_*.c; do
68          B=`echo $a|cut -c5-|sed s/\\\\.o//g`          B=`grep DEVINIT $a`
69          if grep devinit_$B dev_$B.c > /dev/null; then          if [ z"$B" != z ]; then
70                  printf "\tdevice_register(\""$B"\"," >> autodev.c                  C=`grep DEVINIT $a | cut -d \( -f 2|cut -d \) -f 1`
71                  printf " devinit_$B);\n" >> autodev.c                  for B in $C; do
72                            printf "\tdevice_register(\""$B"\"," >> autodev.c
73                            printf " devinit_$B);\n" >> autodev.c
74                    done
75          fi          fi
76  done  done
77    

Legend:
Removed from v.20  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26