'Exit ;' command
[k8jam.git] / doc / ChangeLog
blobd5ce3349b4cda46fced36712db7308febcf99383
1   [+] PWD/Pwd built-in added; usage:
2       pwd = [ PWD ] ;
3   [+] SORT/Sort built-in added; usage:
4       sorted = [ SORT $(list) ] ;
5   [+] COMMAND/Command built-in added; usage:
6       res = [ COMMAND shellcmd-list [[ : options ]] ];
7       options:
8         exit-status, exit-code:
9           return exit code as last list element
10         no-output:
11           don't return command output
12         no-trim:
13           don't trim command output;
14           default: trim left and right
15         no-trim-left:
16           don't left-trim command output
17         no-trim-right:
18           don't right-trim command output
19         status-first, code-first:
20           put exit code first
21         parse-output:
22           parse output as list (break on whitespaces -- <= ' ')
23         no-space-break:
24           don't break on spaces (' ') when 'parse-output' activated
25         no-tab-break:
26           don't break on tabs ('\t') when 'parse-output' activated
27         no-nl-break, no-lf-break:
28           don't break on LF ('\n') when 'parse-output' activated
29         no-cr-break:
30           don't break on CR ('\r') when 'parse-output' activated
31   [+] COMMAND/Command built-in synthax changed; new synthax:
32       res = [ COMMAND shellcmd-list [[ : options ]] ];
33       new options (added to common description)
34   [+] COMMAND/Command built-in now can parse command output
36   [+] rule RemoveOpt
37       # VAR = [ RemoveOpt options-to-remove : options-list ] ;
38       # remove options from list
39   [+] rule RemoveOptWild
40       # VAR = [ RemoveOpt regexp-options-to-remove : options-list ] ;
41       # remove options from list with egrep-like regexps
42   [+] rule profile
43       # profile "name" ;
44       # set compile flags for profile; works only for gcc/g++
45       # available profiles:
46       #  none, default: don't change
47       #  empty: remove optimisation flags
48       #  speed: optimise for speed and pIII
49       #  size: optimise for size
50       #  debug: don't optimize, add debug info
51       #  standard: -O2
52   [+] rule ObjectNoAliasing
53       # ObjectNoAliasing filelist ;
54       # turn off aliasing optimization for specified files
55       # works only for gcc/g++
57   [*] MainC++ wasn't working properly
58   [*] XXXC++ variables changed to XXXC++ZZZ (MainC++ --> C++Main)
59   [+] LOCATE_BIN and ALL_LOCATE_BIN variables added (for Main and MainC++ targets)
60       so now one can do something like this:
61         ALL_LOCATE_TARGET = $(TOP)/build/obj ;
62         ALL_LOCATE_BIN = $(TOP)/build ;
63       and have a nice bunch of *.o files in build/obj and binary in build/
64   [+] new rule: lib-config
65       call $(1) --cflags and $(1) --libs (many libs provides such configurators)
66       add necessary flags to compiler and linker vars
67       return "tan" (non-empty string) if library is present
68       if $(2) != "" -- don't add flags, just check
69   [+] PATH_SEPARATOR variable added
70   [*] build process changed (.o and .a moved to subdir)
71   [+] allow []...] and [^]...] in globs (so ranges can include ']')
72   [+] :Q now quotes all special shell chars, not only '\'
73   [*] some regexprs was broken by tab expansion; fixed
74   [*] OPTIMC++ renamed to C++OPTIM
76   [+] LOCATE_LIB, LOCATE_LIBSO and ALL_LOCATE_LIB[SO] variables added (for Library and SharedLibrary targets)
77       so now one can do something like this:
78         ALL_LOCATE_TARGET = $(TOP)/build/obj ;
79         ALL_LOCATE_LIB = $(TOP)/build/liba ;
80         ALL_LOCATE_LIBSO = $(TOP)/build/libso ;
81         ALL_LOCATE_BIN = $(TOP)/build ;
82       and have a nice bunch of files in various dirs.
84   [*] JAMCMDARGS now set before parsing Jamfiles (and what sense was to set it after? %-)
85   [+] JAM_TARGETS variable added; scripts are free to modify it, so we can easy define targets from whithin
87   [+] SubIncludeOnce varname : TOP ... ;
88       will do SubInclude iff 'varname' is not set (and will set 'varname')
89       so one can include all necessary libraries in all necessary projects
91   [+] partial Objective C support:
92       ObjC-Main, std. set of OBJC* vars
93         OBJC_GNUSTEP_BASE_LIB = gnustep-base ;
94         OBJC_GNUSTEP_GUI_LIB = gnustep-gui ;
95       rules: ObjCUseGNUstepBase, ObjCUseGNUstepGui, ObjCUseGNUstep
97   [+] 'lib-config-ex' rule:
98       lib-config-ex "command" : "var-name-to-modify"
99       "var-name-to-modify" can be omited;
100       rule returs value of command
102   [+] new built-ins:
103       Echo-n: same as Echo, but does not writes '\n'
104       O-Flush: flush standard output (for Echo-n)
105   [+] added rules: LinkFlagsOn, C++LinkFlagsOn, ObjCLinkFlagsOn
106       same as Object*Flags, but for linker flags
107       we need this due to 'gristing' in multidir builds
109   [+] new variable: JAM_FORCE_GCC_OPTIONS
110       set it to override GCC detection
112   [+] rule set-profile:
113       selects 'debug', 'standard', 'speed' or 'size' profile according to vars:
114         DEBUG = 1 : debug
115         OPT_SIZE = 1 : size
116         OPT_SPEED = 1 : speed
117         default: standard
119   [+] rule set-default-subdir-locates (sets my defaults for ALL_LOCATE_XXX: _build/, etc)
121   [+] alias for set-default-subdir-locates: set-default-target-locations ;
123   [+] rule pkg-config
125   [+] jam now correctly creates dirs for files like 'dir/source'
126   [+] alias for set-default-subdir-locates: set-default-locations ;
128   [+] added acions for WINDOZE=1 (my own way to cross-build windoze soft with wine and mingw)
129       vars for invocation:
130         WINE -- wine command; default is "wine"
131         MGPATH -- path to mingw bin dir; default is "c:\mingw\bin\" (note the last '\')
132         MGCC -- mingw gcc compiler name; default is "mingw32-gcc.exe";
133         MG -- mingw g++ compiler name; default is "mingw32-g++.exe -static-libgcc"
134       vars for 'windoze-fix' rule (this rule should be invoked in Jamrules; it is harmless to
135       invoke it for any build scheme):
136         WINDOZE_THREADS -- if not empty, add "-mthreads"
137         WINSUBSYS -- either 'console' or 'windows'; default is 'console'
138         WINLIBS -- list of windoze libraries to add; default is '-lkernel32'
140   [!] WARNING! COMPATIBILITY BREAKING CHANGE!
141   [*] old SubInclude rule renamed to SubIncludeMany
142   [*] new SubInclude rule works as SubIncludeOnce (autogenerates guard var)
144   [+] new built-in: [ ExprI1 num0 op num1 ]
145       integer math; understands 5 standard ops ('%' as C '%')
146       [ ExprI1 40 + 2 ] ==> "42"
147       it also understands "<", "<=", ">", ">=", "=" and "!="
148   [+] [ ExprI1 "#" string ] -- return string length
149   [+] new built-in: [ Split str : delims ]
150       split `str` using `delims`
151         [ Split "a,b,c;d" : ",;" ] ==> a b c d
152       if `delims` is not specified, split string to chars
154   [+] lexer now needs less spaces (and sometimes more quoting)
155   [+] added header caching (when using set-default-locations rule)
157   [+] new build-in: [ NormPath pathstr ]
158       it will add 'pwd' if path is not absolute and will try to resolve some '.' and '..'
159       (only leading '..' though).
160       it can be used in SubDir replacement to automate dir building
162   [+] added 'rule name expansion':
163         rule print-foo { Echo "foo" ; }
164         variable = "print" ;
165         $(variable)-foo ;
167   [+] added default 'help' and 'push' targets
168       redefine actions AShowHelp and AGitPush in Jamrules to use the correspoinding target
170   [+] added help-profile target
172   [+] new variables: CFLAGS.all, OPTIM.all, LINKFLAGS.all, LINKLIBS.all
173       profile now sets *.all flags
175   [+] K8JAM-PROGRESS-TIME-DELTA variable (float, seconds between progress/time indicator)
177   [+] regexp engine now undestands some character classes (like :space:) and non-greedy ops
179   [+] call 'check-setup-windoze' rule to enable WINDOZE=1 builds
180   [+] setup-windoze rule will setup windoze build regardless of WINDOZE=1
181   [+] call use-mingw32 rule to use i686-pc-mingw32 crosscompiler instead of wine
182   [+] call windoze-fix after setting WINDOZE_THREADS, WINLIBS and WINSUBSYS
184   [+] sys-has-command cmd -- perform `which`, return "tan" or ""
186   [+] new built-in: ListLength
188   [+] `PreUserObject` rule
189       this rule will be called before `Object` rule decides how to build something;
190       the calling convention is the same as for `UserObject`, but `PreUserObject`
191       should return non-empty string if it wants to bypass default generator rules.
193   [+] documentation: built-in DependsList
194       DependsList all ;
195       returns a list of child dependencies for a given target
197   [+] new built-ins: HaveRule, HaveActions
198       HaveRule rulename [rulename...] [ : glob/regexp case-insensitive ignore-case ]
199       HaveActions rulename [rulename...] [ : glob/regexp case-insensitive ignore-case ]
200       returns non-empty string if all specified rules or actions are defined
201       note that we can have rule without actions and actions without rule
202       specify `glob` option to treat names as shell-like globs
203       specify `regexp` option to treat names as regexps
204       specify `case-insensitive` option to ignore case
206   [+] new built-in: ForceFile
207       reverts NoFile effect
209   [+] added flags to Glob and Match: now we can use globs and regexps, and do
210       that ignoring the case.
212   [+] new rule: FileExists fname [fname...] ;
213       returns non-empty string if all files exists; understand pathes.
215   [+] Glob flags:
216         case-sensitive
217         case-insensitive
218         ignore-case
219         glob
220         regexp
221         plain
222         dirs-only
223         files-only
224         any
225         names-only
226         full-path
228   [+] set-default-locations now recognizes DEBUG and respects BUILD_DIR
230   [+] new variables: CC.standard and C++.standard; defaults to gnu99 and gnu++98 if set-profile called
232   [+] new rule: DetectLibrary libnames [: includes [: pathes]]
233       default path list is $(DETECT_LIBRARY_PATH)
234       it will check $(p)/lib for library and $(p)/include for header
235       returns prefix or empty list
236       usage:
237         LIBJIMTCL_PFX = [ DetectLibrary libjim.a : jim.h : /opt/jim /opt/jim-tcl ] ;
238         if $(LIBJIMTCL_PFX) {
239           LINKFLAGS.all += -L$(LIBJIMTCL_PFX)/lib ;
240           LINKLIBS.all += -ljim ;
241           HDRS += $(LIBJIMTCL_PFX)/include ;
242           DEFINES += USE_JIM_TCL ;
243         }
245   [+] you can set K8JAM-JOBS variable to force number of jobs
247   [+] use DBG=1 to suppress NDEBUG define for non-debug profiles
249   [+] easy independent targets in *Main:
250       specify independent target name as 3rd arg to *Main:
251         Main alsatest : alsatest.c : alsatest ;  # or Main alsatest : alsatest.c : _ ;
252         Main zytest : zytest.c : test tests ;
253       to cleanup, do:
254         jam alsatest_clean
255       or
256         jam alsatest clean
258   [+] 'clean' now doesn't clean 'Jamrules.auto.configure'; use 'distclean' to kill it
260   [+] JAMCONFIGARGS variable, which collects --* arguments
261   [+] 'config' now understands '--prefix' and sets PREFIX =? xxx
262   [+] InstallUserDefined rule:
263         # $(1): gristed source file
264         # $(2): source file
265         # $(3): directory to install
266         # $(LOCATE): the same as $(2) -- can be used in actions
268   [+] -configure-detect-library- now allows additional parameters (allow-any-lib and allow-any-header)
269       as parameter #7
271   [+] *Main now understands some flags, which must be specified after file name:
272       Main mysoft :
273         main.c
274         processing.c !no-aliasing  # add OPTIM_NOALIAS to build command
275       ;
276       '!xyz' actually calls rule named --main-option-xyz-- if any, passing GRISTED filename as $(1) and
277       UNMODIFIED file name as $(2). sample no-aliasing rule:
278       rule --main-option-no-aliasing-- {
279         if $(OPTIM_NOALIAS) {
280           CCFLAGS on $(1) += $(OPTIM_NOALIAS) ;
281           C++FLAGS on $(1) += $(OPTIM_NOALIAS) ;
282           OBJCFLAGS on $(1) += $(OPTIM_NOALIAS) ;
283         }
284       }
285       use '!!filename' if your file name starts with '!'
287   [+] -configure-pkg-config-necessary- rule
288       optional: set PROJECT_NAME to project name which should be displayed on failure
289       -configure-pkg-config-necessary-
290         "GLib"    "glib-2.0 >= 2.30.0"
291         "X11"     "x11"
292         "GTK+2"   "gtk+-2.0"
293       ;
295   [+] -configure-enable-disable-vars- variable to easy '--enable-xxx' and '--disable-xxx' options:
296       # "auto": check with pkg-config or so, show '--disable-xxx'
297       # "": disabled by default, show '--enable-xxx'
298       # non-empty string: enabled by default, show '--disable-xxx'
299       -configure-enable-disable-vars- +=
300         "sqlite"    USE_SQLITE    "auto"  "don't use sqlite"
301         "gtkhtml"   USE_GTKHTML   "auto"  "don't use GTKHTML"
302         "gtkspell"  USE_GTKSPELL  "auto"  "don't use GTKSpell"
303         "svg"       USE_RSVG      "auto"  "don't use librsvg"
304         "soup"      USE_SOUP      "auto"  "don't use libsoup"
305         "curl"      USE_CURL      "auto"  "don't use libcurl"
306         "dock"      USE_DOCK      "tan"   "disable dock icon"
307       ;
309   [*] Exit ; now exits without output and with SUCCESS exit code