1 .TH LPLC "1" "2017-02-09" "lplc 0.1" "User Commands" 2 .SH NAME 3 lplc \- Lichen Python-like compiler 4 .SH SYNOPSIS 5 .B lplc 6 .RI [ options ] 7 .I file 8 .br 9 .B lplc 10 .I --help 11 .br 12 .B lplc 13 .I --version 14 .SH DESCRIPTION 15 .B lplc 16 compiles programs written in the Lichen language, taking the indicated 17 .I file 18 representing the principal source file of a program, compiling the program to an 19 intermediate representation, and then building the result using a C compiler and 20 .B make 21 to produce an executable. Other source files need not be specified: they will be 22 identified by the compiler and loaded as required. 23 .SH OPTIONS 24 The following options may be specified: 25 .PP 26 .TP 27 .BR \-c ", " \-\-compile 28 Only partially compile the program; do not build or link it 29 .TP 30 .BR \-E ", " \-\-no\-env 31 Ignore environment variables affecting the module search path 32 .TP 33 .BR \-g ", " \-\-debug 34 Generate debugging information for the built executable 35 .TP 36 .BR \-G ", " \-\-gc\-sections 37 Remove superfluous sections of the built executable by applying the 38 .B \-\-gc\-sections 39 linker option and associated compiler options 40 .TP 41 .BR \-P ", " \-\-show\-path 42 Show the module search path 43 .TP 44 .BR \-q ", " \-\-quiet 45 Silence messages produced when building an executable 46 .TP 47 .BR \-r ", " \-\-reset 48 Reset (discard) cached information; inspect the whole program again 49 .TP 50 .BR \-R ", " \-\-reset\-all 51 Reset (discard) all program details including translated code 52 .TP 53 .BR \-t ", " \-\-no\-timing 54 Silence timing messages 55 .TP 56 .BR \-tb ", " \-\-traceback 57 Provide a traceback for any internal errors (development only) 58 .TP 59 .BR \-v ", " \-\-verbose 60 Report compiler activities in a verbose fashion (development only) 61 .PP 62 Some options may be followed by values, either immediately after the option 63 (without any space between) or in the arguments that follow them: 64 .PP 65 .TP 66 .B \-o 67 Indicate the output executable name 68 .TP 69 .B \-W 70 Show warnings on the topics indicated 71 .PP 72 Currently, the following warnings are supported: 73 .TP 74 .B all 75 Show all possible warnings 76 .TP 77 .B args 78 Show invocations where a callable may be involved that cannot accept 79 the arguments provided 80 .PP 81 The following informational options can be specified to produce output instead 82 of compiling a program: 83 .PP 84 .TP 85 .BR \-h ", " \-? ", " \-\-help 86 Show a summary of the command syntax and options 87 .TP 88 .BR \-V ", " \-\-version 89 Show version information for this tool 90 .SH INCREMENTAL COMPILATION 91 Invocations of 92 .B lplc 93 without the reset options 94 .BR \-r ", " \-\-reset ", " \-R " or " \-\-reset\-all 95 will cause incremental translation and compilation to be attempted. Where 96 existing translated sources exist and where no changes to the object structures 97 or callable signatures are made, only updated sources will be generated and 98 compiled. Otherwise, where structures or signatures change in a way that is 99 incompatible with already-compiled code, the entire program will be generated 100 and compiled again. 101 .SH EXAMPLES 102 Compile the main program in 103 .BR hello.py , 104 including all source files that the program requires: 105 .IP 106 lplc -o hello hello.py 107 .PP 108 This produces an output executable called 109 .B hello 110 in the current directory, assuming that 111 .B hello.py 112 can be compiled without errors. 113 .SH FILES 114 .B lplc 115 produces an output executable file called 116 .B _main 117 unless the 118 .B \-o 119 option is given with a different name. Working data is stored in a directory 120 whose name is derived from the output executable name. Therefore, the working 121 data directory will be called 122 .B _main.lplc 123 unless otherwise specified. For example, an output executable called 124 .B hello 125 will have a working data directory called 126 .BR hello.lplc . 127 This is intended to allow work to proceed efficiently on multiple programs in 128 the same directory, although it can also create lots of unwanted directories. 129 .SH ENVIRONMENT 130 .TP 131 ARCH 132 Indicates a prefix to be used with tool names when building an executable. This 133 permits things like cross-compilation where tools have been provided with names 134 featuring architecture- and system-specific prefixes. For example, 135 .I mipsel-linux-gnu 136 may be used to indicate the use of tools for the MIPS architecture running 137 GNU/Linux in little-endian mode. 138 .TP 139 LICHENPATH 140 A collection of directories that are searched before those in the collection 141 comprising the default "module search path". This collection, if already defined 142 in the environment, may be excluded by specifying the 143 .BR \-E " (or " \-\-no\-env ) 144 option. 145 .SH AUTHOR 146 Paul Boddie <paul@boddie.org.uk> 147 .SH RESOURCES 148 The project Web site: http://projects.boddie.org.uk/Lichen 149 .SH COPYRIGHT 150 Copyright \(co 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 151 2014, 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk> 152 .PP 153 This program is free software; you may redistribute it under the terms of 154 the GNU General Public License version 3 or (at your option) a later version. 155 This program has absolutely no warranty. 156 .SH SEE ALSO 157 .BR cc (1), 158 .BR make (1).