| 1 | #!/bin/sh |
| 2 | |
| 3 | # ======================================================================== |
| 4 | # Copyright 1988-2006 University of Washington |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # |
| 13 | # ======================================================================== |
| 14 | |
| 15 | BASE=`pwd` |
| 16 | |
| 17 | if [ ! -f tools/uahelper ]; then |
| 18 | (cd tools;make) |
| 19 | fi |
| 20 | |
| 21 | if [ ! -d $3 ]; then |
| 22 | mkdir $3 |
| 23 | fi |
| 24 | |
| 25 | for i in $2/Makefile* ; do |
| 26 | if [ -f $i ] ; then |
| 27 | $1 "$BASE/$i" "$BASE/$3" |
| 28 | fi |
| 29 | done |
| 30 | |
| 31 | if [ -f $2/drivers ]; then |
| 32 | $1 "$BASE/$2/drivers" "$BASE/$3" |
| 33 | fi |
| 34 | |
| 35 | if [ -f $2/mkauths ]; then |
| 36 | $1 "$BASE/$2/mkauths" "$BASE/$3" |
| 37 | fi |
| 38 | |
| 39 | cd $2 |
| 40 | |
| 41 | for j in *.[ch]; do |
| 42 | "$BASE/tools/uahelper" < $j > "$BASE/$3/$j" |
| 43 | done |
| 44 | |
| 45 | exit 0 |