about summary refs log tree commit diff stats
path: root/arc
Commit message (Expand)AuthorAgeFilesLines
* 1310Kartik K. Agaram2015-05-081-11/+11
* 1306Kartik K. Agaram2015-05-071-2/+0
* 1276 - make C++ version the defaultKartik K. Agaram2015-05-05301-0/+2010224
:16 -0800 4971 - clean up a few scripts' href='/akkartik/mu/commit/subx/dgen?h=main&id=445843f27798e371d34d91860b05bbf68fa37223'>445843f2 ^
5f21a5e7 ^


445843f2 ^
5f21a5e7 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
















                                                                                                                


                    
                                                                               


         
                                                                             
       
#!/bin/sh
# Little helper to quickly build SubX programs in 'debug mode' from the commandline.
# Only works for programs in some standard places the repo knows about.

if [ $# -eq 0 ]
then
  echo "Usage: $0 <file root without subdirectory or .subx extension>"
  echo
  echo "Naming convention: Files starting with 'ex' will be assumed to live in examples/ and be self-contained."
  echo "Other files will be assumed to live in apps/ and need the standard library."
  exit 1
fi

# Build in debug mode since the common case at the moment is building small
# files. To override, calling scripts should do their own builds to ensure
# subx_bin is up to date.
export CFLAGS=-g

if [[ $1 == 'ex'* ]]
then
  ./subx --map translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'`
  exit $?
fi

./subx --map translate *.subx apps/$1.subx  -o apps/`echo $1 |sed 's/\..*//'`
exit $?