| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
DASHO=0 |
| 4 |
|
| 5 |
declare -a param1 |
| 6 |
declare -a param2 |
| 7 |
for p; do |
| 8 |
case "$p" in |
| 9 |
-o ) param1+=("$p") |
| 10 |
param2+=("$p") |
| 11 |
DASHO=1 |
| 12 |
;; |
| 13 |
*.o | *.obj) |
| 14 |
if [ "${DASHO}" -eq "1" ]; then |
| 15 |
DASHO=0 |
| 16 |
ofile="$p" |
| 17 |
param1+=("$p.1" '-l' "$p.lst.1") |
| 18 |
param2+=("$p.2" '-l' "$p.lst.2") |
| 19 |
printf '%s\n%s.2\n%s.lst.2\n' "$ofile" "$ofile" "$ofile" \ |
| 20 |
>> "$projnasm_filelist" |
| 21 |
else |
| 22 |
param1+=("$p") |
| 23 |
param2+=("$p") |
| 24 |
fi |
| 25 |
;; |
| 26 |
*) param1+=("$p") |
| 27 |
param2+=("$p") |
| 28 |
;; |
| 29 |
esac |
| 30 |
done |
| 31 |
|
| 32 |
printf '%s\n' "$*" >> "$projnasm_logfile" |
| 33 |
|
| 34 |
rm -f "$ofile" |
| 35 |
"$projnasm_nasm2" "${param2[@]}" |
| 36 |
"$projnasm_nasm1" "${param1[@]}" || exit $? |
| 37 |
if [ -f $ofile.1 ]; then |
| 38 |
cp -f "$ofile.1" "$ofile" |
| 39 |
fi |