summaryrefslogtreecommitdiff
path: root/ld/genscrba.sh
blob: 030cb7d42ecc1aae851843a27e9aa44e8f5cfc00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
source_em()
{
  local current_script="$em_script"
  em_script=$1
  . $em_script
  em_script=$current_script
}
fragment()
{
  if [ ${BASH_VERSINFO[3]} -ge 3 ]; then
    local lineno=$[${BASH_LINENO[0]} + 1]
    echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
  fi
  cat >> e${EMULATION_NAME}.c
}