1.1 --- a/docs/lplc.1 Thu Feb 23 16:39:02 2017 +0100
1.2 +++ b/docs/lplc.1 Fri Feb 24 00:02:46 2017 +0100
1.3 @@ -82,7 +82,35 @@
1.4 .TP
1.5 .BR \-V ", " \-\-version
1.6 Show version information for this tool
1.7 -.SH ENVIRONMENT VARIABLES
1.8 +.SH EXAMPLES
1.9 +Compile the main program in
1.10 +.BR hello.py ,
1.11 +including all source files that the program requires:
1.12 +.IP
1.13 +lplc -o hello hello.py
1.14 +.PP
1.15 +This produces an output executable called
1.16 +.B hello
1.17 +in the current directory, assuming that
1.18 +.B hello.py
1.19 +can be compiled without errors.
1.20 +.SH FILES
1.21 +.B lplc
1.22 +produces an output executable file called
1.23 +.B _main
1.24 +unless the
1.25 +.B \-o
1.26 +option is given with a different name. Working data is stored in a directory
1.27 +whose name is derived from the output executable name. Therefore, the working
1.28 +data directory will be called
1.29 +.B _main.lplc
1.30 +unless otherwise specified. For example, an output executable called
1.31 +.B hello
1.32 +will have a working data directory called
1.33 +.BR hello.lplc .
1.34 +This is intended to allow work to proceed efficiently on multiple programs in
1.35 +the same directory, although it can also create lots of unwanted directories.
1.36 +.SH ENVIRONMENT
1.37 .TP
1.38 ARCH
1.39 Indicates a prefix to be used with tool names when building an executable. This
2.1 --- a/lplc Thu Feb 23 16:39:02 2017 +0100
2.2 +++ b/lplc Fri Feb 24 00:02:46 2017 +0100
2.3 @@ -23,7 +23,7 @@
2.4
2.5 from errors import *
2.6 from os import environ, listdir, remove, rename
2.7 -from os.path import abspath, exists, isdir, isfile, join, split
2.8 +from os.path import abspath, exists, extsep, isdir, isfile, join, split
2.9 from pyparser import error
2.10 from subprocess import Popen, PIPE
2.11 from time import time
2.12 @@ -245,7 +245,7 @@
2.13
2.14 # Define the output data directories.
2.15
2.16 - datadir = "_lplc"
2.17 + datadir = "%s%s%s" % (output, extsep, "lplc") # _main.lplc by default
2.18 cache_dir = join(datadir, "_cache")
2.19 deduced_dir = join(datadir, "_deduced")
2.20 output_dir = join(datadir, "_output")
3.1 --- a/test_all.sh Thu Feb 23 16:39:02 2017 +0100
3.2 +++ b/test_all.sh Fri Feb 24 00:02:46 2017 +0100
3.3 @@ -3,7 +3,7 @@
3.4 # This tool runs the toolchain for each of the tests, optionally building and
3.5 # running the test programs.
3.6 #
3.7 -# Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
3.8 +# Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
3.9 #
3.10 # This program is free software; you can redistribute it and/or modify it under
3.11 # the terms of the GNU General Public License as published by the Free Software
3.12 @@ -22,7 +22,7 @@
3.13 OPTION=$1
3.14
3.15 LPLC="./lplc"
3.16 -DATADIR="_lplc"
3.17 +DATADIR="_main.lplc"
3.18 TESTINPUT="_results/testinput.txt"
3.19
3.20 # Expect failure from the "bad" tests.