1 |
#!/bin/sh |
#!/bin/sh |
2 |
############################################################################### |
############################################################################### |
3 |
# |
# |
4 |
# Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
# Copyright (C) 2005-2007 Anders Gavare. All rights reserved. |
5 |
# |
# |
6 |
# Redistribution and use in source and binary forms, with or without |
# Redistribution and use in source and binary forms, with or without |
7 |
# modification, are permitted provided that the following conditions are met: |
# modification, are permitted provided that the following conditions are met: |
27 |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
28 |
# |
# |
29 |
# |
# |
30 |
# $Id: makeautomachine.sh,v 1.3 2005/12/31 15:47:38 debug Exp $ |
# $Id: makeautomachine.sh,v 1.5 2007/06/15 18:08:10 debug Exp $ |
31 |
|
|
32 |
|
|
33 |
printf "Generating automachine.c... " |
printf "Generating automachine.c... " |
38 |
|
|
39 |
cat automachine_head.c >> automachine.c |
cat automachine_head.c >> automachine.c |
40 |
|
|
41 |
|
printf "3" |
42 |
|
rm -f .index |
43 |
|
for a in *.c; do |
44 |
|
B=`grep COMMENT $a` |
45 |
|
if [ z"$B" != z ]; then |
46 |
|
printf "$a " >> .index |
47 |
|
echo "$B"|cut -d : -f 2- >> .index |
48 |
|
fi |
49 |
|
done |
50 |
|
|
51 |
printf "2" |
printf "2" |
52 |
for a in machine_*.c; do |
for a in machine_*.c; do |
53 |
B=`grep MACHINE_REGISTER $a` |
B=`grep MACHINE_REGISTER $a` |