Changeset 2171 for trunk/kBuild/doc
- Timestamp:
- Dec 30, 2008, 11:18:10 PM (17 years ago)
- Location:
- trunk/kBuild/doc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/doc/QuickReference-kmk.html
r2170 r2171 328 328 sinclude file 329 329 </pre> 330 <p>Include another dependency file <a class="footnote-reference" href="#id8 0" id="id1" name="id1">[1]</a>:</p>330 <p>Include another dependency file <a class="footnote-reference" href="#id82" id="id1" name="id1">[1]</a>:</p> 331 331 <pre class="literal-block"> 332 332 includedep file … … 358 358 unexport variable 359 359 </pre> 360 <p>Define a variable in the local context instead of the global one <a class="footnote-reference" href="#id8 0" id="id2" name="id2">[1]</a>:</p>360 <p>Define a variable in the local context instead of the global one <a class="footnote-reference" href="#id82" id="id2" name="id2">[1]</a>:</p> 361 361 <pre class="literal-block"> 362 362 local variable = value … … 509 509 <tt class="docutils literal"><span class="pre">KBUILD_KMK_REVISION</span></tt></td> 510 510 <td>The kBuild version string and the break down 511 into individual components. <a class="footnote-reference" href="#id8 0" id="id3" name="id3">[1]</a></td>512 </tr> 513 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST</span></tt> <a class="footnote-reference" href="#id8 0" id="id4" name="id4">[1]</a></td>511 into individual components. <a class="footnote-reference" href="#id82" id="id3" name="id3">[1]</a></td> 512 </tr> 513 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST</span></tt> <a class="footnote-reference" href="#id82" id="id4" name="id4">[1]</a></td> 514 514 <td>The host operating system.</td> 515 515 </tr> 516 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST_ARCH</span></tt> <a class="footnote-reference" href="#id8 0" id="id5" name="id5">[1]</a></td>516 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST_ARCH</span></tt> <a class="footnote-reference" href="#id82" id="id5" name="id5">[1]</a></td> 517 517 <td>The host architecture.</td> 518 518 </tr> 519 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST_CPU</span></tt> <a class="footnote-reference" href="#id8 0" id="id6" name="id6">[1]</a></td>519 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_HOST_CPU</span></tt> <a class="footnote-reference" href="#id82" id="id6" name="id6">[1]</a></td> 520 520 <td>The host CPU <tt class="docutils literal"><span class="pre">kmk</span></tt> is built for, set to 521 521 <tt class="docutils literal"><span class="pre">blend</span></tt> if not any particular CPU.</td> 522 522 </tr> 523 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_PATH</span></tt> <a class="footnote-reference" href="#id8 0" id="id7" name="id7">[1]</a></td>523 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_PATH</span></tt> <a class="footnote-reference" href="#id82" id="id7" name="id7">[1]</a></td> 524 524 <td>Where the kBuild scripts are.</td> 525 525 </tr> 526 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_BIN_PATH</span></tt> <a class="footnote-reference" href="#id8 0" id="id8" name="id8">[1]</a></td>526 <tr><td><tt class="docutils literal"><span class="pre">KBUILD_BIN_PATH</span></tt> <a class="footnote-reference" href="#id82" id="id8" name="id8">[1]</a></td> 527 527 <td>Where the host specific kBuild binaries are.</td> 528 528 </tr> 529 <tr><td><tt class="docutils literal"><span class="pre">KMK</span></tt> <a class="footnote-reference" href="#id8 0" id="id9" name="id9">[1]</a>,529 <tr><td><tt class="docutils literal"><span class="pre">KMK</span></tt> <a class="footnote-reference" href="#id82" id="id9" name="id9">[1]</a>, 530 530 <tt class="docutils literal"><span class="pre">MAKE</span></tt></td> 531 531 <td>The name with which <tt class="docutils literal"><span class="pre">kmk</span></tt> was invoked. Using 532 532 this variable in recipes has special meaning.</td> 533 533 </tr> 534 <tr><td><tt class="docutils literal"><span class="pre">KMK_BUILTIN</span></tt> <a class="footnote-reference" href="#id8 0" id="id10" name="id10">[1]</a></td>534 <tr><td><tt class="docutils literal"><span class="pre">KMK_BUILTIN</span></tt> <a class="footnote-reference" href="#id82" id="id10" name="id10">[1]</a></td> 535 535 <td>List of built-in commands.</td> 536 536 </tr> 537 <tr><td><tt class="docutils literal"><span class="pre">KMK_FEATURES</span></tt> <a class="footnote-reference" href="#id8 0" id="id11" name="id11">[1]</a></td>537 <tr><td><tt class="docutils literal"><span class="pre">KMK_FEATURES</span></tt> <a class="footnote-reference" href="#id82" id="id11" name="id11">[1]</a></td> 538 538 <td>List of <tt class="docutils literal"><span class="pre">kmk</span></tt> specific features.</td> 539 539 </tr> 540 <tr><td><tt class="docutils literal"><span class="pre">KMK_FLAGS</span></tt> <a class="footnote-reference" href="#id8 0" id="id12" name="id12">[1]</a></td>540 <tr><td><tt class="docutils literal"><span class="pre">KMK_FLAGS</span></tt> <a class="footnote-reference" href="#id82" id="id12" name="id12">[1]</a></td> 541 541 <td><p class="first">The flags given to <tt class="docutils literal"><span class="pre">kmk</span></tt>. You can set this in 542 542 the environment or a makefile to set flags.</p> … … 548 548 </td> 549 549 </tr> 550 <tr><td><tt class="docutils literal"><span class="pre">KMK_LEVEL</span></tt> <a class="footnote-reference" href="#id8 0" id="id13" name="id13">[1]</a></td>550 <tr><td><tt class="docutils literal"><span class="pre">KMK_LEVEL</span></tt> <a class="footnote-reference" href="#id82" id="id13" name="id13">[1]</a></td> 551 551 <td>The number of levels of recursion (sub-makes).</td> 552 552 </tr> 553 <tr><td><tt class="docutils literal"><span class="pre">KMK_VERSION</span></tt> <a class="footnote-reference" href="#id8 0" id="id14" name="id14">[1]</a></td>553 <tr><td><tt class="docutils literal"><span class="pre">KMK_VERSION</span></tt> <a class="footnote-reference" href="#id82" id="id14" name="id14">[1]</a></td> 554 554 <td>The GNU <tt class="docutils literal"><span class="pre">make</span></tt> version number.</td> 555 555 </tr> … … 587 587 </tbody> 588 588 </table> 589 <p>The following variables reflects <tt class="docutils literal"><span class="pre">kmk</span></tt> options. Do not set these. <a class="footnote-reference" href="#id8 0" id="id15" name="id15">[1]</a></p>589 <p>The following variables reflects <tt class="docutils literal"><span class="pre">kmk</span></tt> options. Do not set these. <a class="footnote-reference" href="#id82" id="id15" name="id15">[1]</a></p> 590 590 <table border="1" class="docutils"> 591 591 <colgroup> … … 628 628 <div class="section"> 629 629 <h1><a id="special-targets" name="special-targets">Special Targets</a></h1> 630 <p>todo</p> 630 <p>Certain names have special meanings if they appear as targets.</p> 631 <table border="1" class="docutils"> 632 <colgroup> 633 <col width="41%" /> 634 <col width="59%" /> 635 </colgroup> 636 <thead valign="bottom"> 637 <tr><th class="head">Target</th> 638 <th class="head">Description</th> 639 </tr> 640 </thead> 641 <tbody valign="top"> 642 <tr><td><tt class="docutils literal"><span class="pre">.DEFAULT</span></tt></td> 643 <td>The recipe is used for any target for which 644 no rules are found.</td> 645 </tr> 646 <tr><td><tt class="docutils literal"><span class="pre">.DELETE_ON_ERROR</span></tt></td> 647 <td>If mentioned, <tt class="docutils literal"><span class="pre">kmk</span></tt> will delete the 648 targets of a rule if it hash changed and its 649 recipe fails or is interrupted.</td> 650 </tr> 651 <tr><td><tt class="docutils literal"><span class="pre">.EXPORT_ALL_VARIABLES</span></tt></td> 652 <td>If mentioned, all variables will by default 653 be exported to child processes.</td> 654 </tr> 655 <tr><td><tt class="docutils literal"><span class="pre">.IGNORE</span></tt></td> 656 <td>Ignore errors in the execution of the recipe 657 for the targets <tt class="docutils literal"><span class="pre">.IGNORE</span></tt> depends on, if 658 no prequisites all targets are affected.</td> 659 </tr> 660 <tr><td><tt class="docutils literal"><span class="pre">.INTERMEIDATE</span></tt></td> 661 <td>The prerequisites are treated as 662 intermediate files (implicite rules).</td> 663 </tr> 664 <tr><td><tt class="docutils literal"><span class="pre">.LOW_RESOLUTION_TIME</span></tt></td> 665 <td><tt class="docutils literal"><span class="pre">kmk</span></tt> will assume prerequisite files are 666 created with low resolution time stamps.</td> 667 </tr> 668 <tr><td><tt class="docutils literal"><span class="pre">.NOTPARALLEL</span></tt></td> 669 <td>If mentioned without any prerequisites, 670 <tt class="docutils literal"><span class="pre">kmk</span></tt> will run serially as if -j1 was 671 given. If it has prerequisites <tt class="docutils literal"><span class="pre">kmk</span></tt> <a class="footnote-reference" href="#id82" id="id16" name="id16">[1]</a> 672 will only do this for the targets among 673 them.</td> 674 </tr> 675 <tr><td><tt class="docutils literal"><span class="pre">.PHONY</span></tt></td> 676 <td>The prerequisites are considered phony and 677 will be rebuilt unconditionally.</td> 678 </tr> 679 <tr><td><tt class="docutils literal"><span class="pre">.PRECIOUS</span></tt></td> 680 <td>The targets which <tt class="docutils literal"><span class="pre">.PRECIOUS</span></tt> depends will 681 to be deleted if <tt class="docutils literal"><span class="pre">kmk</span></tt> is killed or 682 interrupted while their building.</td> 683 </tr> 684 <tr><td><tt class="docutils literal"><span class="pre">.SECONDARY</span></tt></td> 685 <td>The prerequisites are treated as 686 intermediate files, except that they are 687 never automatically deleted. If used with 688 no prerequisites all targets gets this 689 treatement.</td> 690 </tr> 691 <tr><td><tt class="docutils literal"><span class="pre">.SECONDEXPANSION</span></tt></td> 692 <td>If mentioned, all prerequisite lists after 693 it will be expanded a second time after all 694 makefiles have been read.</td> 695 </tr> 696 <tr><td><tt class="docutils literal"><span class="pre">.SECONDTARGETEXPANSION</span></tt> 697 <a class="footnote-reference" href="#id82" id="id17" name="id17">[1]</a></td> 698 <td>If mentioned, all prerequisite lists after 699 it will be expanded a second time after all 700 makefiles have been read.</td> 701 </tr> 702 <tr><td><tt class="docutils literal"><span class="pre">.SILENT</span></tt></td> 703 <td><tt class="docutils literal"><span class="pre">kmk</span></tt> will not print the recipe for 704 targets listed as prerequisites, if none 705 then it applies to all targets.</td> 706 </tr> 707 <tr><td><tt class="docutils literal"><span class="pre">.SUFFIXES</span></tt></td> 708 <td>The prerequisites are the list of suffixes 709 used in checking for suffix rules.</td> 710 </tr> 711 </tbody> 712 </table> 631 713 </div> 632 714 <div class="section"> 633 715 <h1><a id="commands" name="commands">Commands</a></h1> 634 <p>Builtin commands <a class="footnote-reference" href="#id8 0" id="id16" name="id16">[1]</a> all start with <tt class="docutils literal"><span class="pre">kmk_builtin_</span></tt>, so in order to save716 <p>Builtin commands <a class="footnote-reference" href="#id82" id="id18" name="id18">[1]</a> all start with <tt class="docutils literal"><span class="pre">kmk_builtin_</span></tt>, so in order to save 635 717 space this prefix has been omitted in the table below. All commands comes in an 636 718 external edition that can be used by/in the shell, these are prefixed <tt class="docutils literal"><span class="pre">kmk_</span></tt>.</p> … … 743 825 <div class="section"> 744 826 <h1><a id="kmk-expression" name="kmk-expression">kmk-expression</a></h1> 745 <p><tt class="docutils literal"><span class="pre">kmk</span></tt>-expressions <a class="footnote-reference" href="#id8 0" id="id17" name="id17">[1]</a> are related to the C/C++ preprocessor in some ways as827 <p><tt class="docutils literal"><span class="pre">kmk</span></tt>-expressions <a class="footnote-reference" href="#id82" id="id19" name="id19">[1]</a> are related to the C/C++ preprocessor in some ways as 746 828 well as <tt class="docutils literal"><span class="pre">nmake</span></tt> and BSD <tt class="docutils literal"><span class="pre">make</span></tt>. There are however some peculiarities 747 829 because of the way GNU <tt class="docutils literal"><span class="pre">make</span></tt> choose to represent booleans in its function … … 897 979 </pre> 898 980 <p>Sort the words in <tt class="docutils literal"><span class="pre">list</span></tt> lexicographically in reserve order, removing 899 duplicates <a class="footnote-reference" href="#id8 0" id="id18" name="id18">[1]</a>:</p>981 duplicates <a class="footnote-reference" href="#id82" id="id20" name="id20">[1]</a>:</p> 900 982 <pre class="literal-block"> 901 983 $(rsort list) … … 925 1007 $(join list1,list2) 926 1008 </pre> 927 <p>Fold <tt class="docutils literal"><span class="pre">text</span></tt> to upper case <a class="footnote-reference" href="#id8 0" id="id19" name="id19">[1]</a>:</p>1009 <p>Fold <tt class="docutils literal"><span class="pre">text</span></tt> to upper case <a class="footnote-reference" href="#id82" id="id21" name="id21">[1]</a>:</p> 928 1010 <pre class="literal-block"> 929 1011 $(toupper text) 930 1012 </pre> 931 <p>Fold <tt class="docutils literal"><span class="pre">text</span></tt> to lower case <a class="footnote-reference" href="#id8 0" id="id20" name="id20">[1]</a>:</p>1013 <p>Fold <tt class="docutils literal"><span class="pre">text</span></tt> to lower case <a class="footnote-reference" href="#id82" id="id22" name="id22">[1]</a>:</p> 932 1014 <pre class="literal-block"> 933 1015 $(tolower text) 934 1016 </pre> 935 <p>String formatting a la the unix <tt class="docutils literal"><span class="pre">printf</span></tt> command <a class="footnote-reference" href="#id8 0" id="id21" name="id21">[1]</a>:</p>1017 <p>String formatting a la the unix <tt class="docutils literal"><span class="pre">printf</span></tt> command <a class="footnote-reference" href="#id82" id="id23" name="id23">[1]</a>:</p> 936 1018 <pre class="literal-block"> 937 1019 $(printf fmt, arg...) 938 1020 </pre> 939 <p>Return the length of a string or a (unexpanded) variable <a class="footnote-reference" href="#id8 0" id="id22" name="id22">[1]</a>:</p>1021 <p>Return the length of a string or a (unexpanded) variable <a class="footnote-reference" href="#id82" id="id24" name="id24">[1]</a>:</p> 940 1022 <pre class="literal-block"> 941 1023 $(length string) … … 944 1026 <p>Find the position of <tt class="docutils literal"><span class="pre">needle</span></tt> in <tt class="docutils literal"><span class="pre">haystack</span></tt>, returns 0 if not found. 945 1027 Negative <tt class="docutils literal"><span class="pre">start</span></tt> indices are relative to the end of <tt class="docutils literal"><span class="pre">haystack</span></tt>, while 946 positive ones are one based <a class="footnote-reference" href="#id8 0" id="id23" name="id23">[1]</a>:</p>1028 positive ones are one based <a class="footnote-reference" href="#id82" id="id25" name="id25">[1]</a>:</p> 947 1029 <pre class="literal-block"> 948 1030 $(pos needle, haystack[, start]) … … 951 1033 <p>Returns the specified substring. The <tt class="docutils literal"><span class="pre">start</span></tt> works like with <tt class="docutils literal"><span class="pre">$(pos</span> <span class="pre">)</span></tt>. 952 1034 If the substring is partially outside the <tt class="docutils literal"><span class="pre">string</span></tt> the result will be 953 padded with <tt class="docutils literal"><span class="pre">pad</span></tt> if present <a class="footnote-reference" href="#id8 0" id="id24" name="id24">[1]</a>:</p>1035 padded with <tt class="docutils literal"><span class="pre">pad</span></tt> if present <a class="footnote-reference" href="#id82" id="id26" name="id26">[1]</a>:</p> 954 1036 <pre class="literal-block"> 955 1037 $(substr string, start[, length[, pad]]) 956 1038 </pre> 957 1039 <p>Insert <tt class="docutils literal"><span class="pre">in</span></tt> into <tt class="docutils literal"><span class="pre">str</span></tt> at the specified position. <tt class="docutils literal"><span class="pre">n</span></tt> works like with 958 <tt class="docutils literal"><span class="pre">$(pos</span> <span class="pre">)</span></tt>, except that <tt class="docutils literal"><span class="pre">0</span></tt> is the end of the string <a class="footnote-reference" href="#id8 0" id="id25" name="id25">[1]</a>:</p>1040 <tt class="docutils literal"><span class="pre">$(pos</span> <span class="pre">)</span></tt>, except that <tt class="docutils literal"><span class="pre">0</span></tt> is the end of the string <a class="footnote-reference" href="#id82" id="id27" name="id27">[1]</a>:</p> 959 1041 <pre class="literal-block"> 960 1042 $(insert in, str[, n[, length[, pad]]]) … … 962 1044 <p>Translate <tt class="docutils literal"><span class="pre">string</span></tt> exchanging characters in <tt class="docutils literal"><span class="pre">from-set</span></tt> with <tt class="docutils literal"><span class="pre">to-set</span></tt>, 963 1045 optionally completing <tt class="docutils literal"><span class="pre">to-set</span></tt> with <tt class="docutils literal"><span class="pre">pad-char</span></tt> if specified. If no 964 <tt class="docutils literal"><span class="pre">pad-char</span></tt> characters absent in <tt class="docutils literal"><span class="pre">to-set</span></tt> will be deleted <a class="footnote-reference" href="#id8 0" id="id26" name="id26">[1]</a>:</p>1046 <tt class="docutils literal"><span class="pre">pad-char</span></tt> characters absent in <tt class="docutils literal"><span class="pre">to-set</span></tt> will be deleted <a class="footnote-reference" href="#id82" id="id28" name="id28">[1]</a>:</p> 965 1047 <pre class="literal-block"> 966 1048 $(translate string, from-set[, to-set[, pad-char]]) … … 1010 1092 </pre> 1011 1093 <p>Same as <tt class="docutils literal"><span class="pre">$(abspath</span> <span class="pre">)</span></tt> except that the current directory can be 1012 specified as <tt class="docutils literal"><span class="pre">curdir</span></tt> <a class="footnote-reference" href="#id8 0" id="id27" name="id27">[1]</a>:</p>1094 specified as <tt class="docutils literal"><span class="pre">curdir</span></tt> <a class="footnote-reference" href="#id82" id="id29" name="id29">[1]</a>:</p> 1013 1095 <pre class="literal-block"> 1014 1096 $(abspathex names...[, curdir]) … … 1017 1099 <p>Arithmetic Functions:</p> 1018 1100 <blockquote> 1019 <p>Returns the sum of the arguments <a class="footnote-reference" href="#id8 0" id="id28" name="id28">[1]</a>:</p>1101 <p>Returns the sum of the arguments <a class="footnote-reference" href="#id82" id="id30" name="id30">[1]</a>:</p> 1020 1102 <pre class="literal-block"> 1021 1103 $(int-add addend1, addend2[, addendN]) 1022 1104 </pre> 1023 1105 <p>Returns the difference between the first argument and the sum of the 1024 rest <a class="footnote-reference" href="#id8 0" id="id29" name="id29">[1]</a>:</p>1106 rest <a class="footnote-reference" href="#id82" id="id31" name="id31">[1]</a>:</p> 1025 1107 <pre class="literal-block"> 1026 1108 $(int-sub minuend, subtrahend[, subtrahendN]) 1027 1109 </pre> 1028 <p>Returns the product of the arguments <a class="footnote-reference" href="#id8 0" id="id30" name="id30">[1]</a>:</p>1110 <p>Returns the product of the arguments <a class="footnote-reference" href="#id82" id="id32" name="id32">[1]</a>:</p> 1029 1111 <pre class="literal-block"> 1030 1112 $(int-mul factor1, factor2[, factorN]) 1031 1113 </pre> 1032 <p>Returns the quotient of first argument and the rest <a class="footnote-reference" href="#id8 0" id="id31" name="id31">[1]</a>:</p>1114 <p>Returns the quotient of first argument and the rest <a class="footnote-reference" href="#id82" id="id33" name="id33">[1]</a>:</p> 1033 1115 <pre class="literal-block"> 1034 1116 $(int-div dividend, divisor[, divisorN]) 1035 1117 </pre> 1036 <p>Returns the modulus of the two arguments <a class="footnote-reference" href="#id8 0" id="id32" name="id32">[1]</a>:</p>1118 <p>Returns the modulus of the two arguments <a class="footnote-reference" href="#id82" id="id34" name="id34">[1]</a>:</p> 1037 1119 <pre class="literal-block"> 1038 1120 $(int-mod dividend, divisor) 1039 1121 </pre> 1040 <p>Returns the bitwise two-complement of argument <a class="footnote-reference" href="#id8 0" id="id33" name="id33">[1]</a>:</p>1122 <p>Returns the bitwise two-complement of argument <a class="footnote-reference" href="#id82" id="id35" name="id35">[1]</a>:</p> 1041 1123 <pre class="literal-block"> 1042 1124 $(int-not val) 1043 1125 </pre> 1044 <p>Returns the result of a bitwise AND of the arguments <a class="footnote-reference" href="#id8 0" id="id34" name="id34">[1]</a>:</p>1126 <p>Returns the result of a bitwise AND of the arguments <a class="footnote-reference" href="#id82" id="id36" name="id36">[1]</a>:</p> 1045 1127 <pre class="literal-block"> 1046 1128 $(int-and val1, val2[, valN]) 1047 1129 </pre> 1048 <p>Returns the result of a bitwise OR of the arguments <a class="footnote-reference" href="#id8 0" id="id35" name="id35">[1]</a>:</p>1130 <p>Returns the result of a bitwise OR of the arguments <a class="footnote-reference" href="#id82" id="id37" name="id37">[1]</a>:</p> 1049 1131 <pre class="literal-block"> 1050 1132 $(int-or val1, val2[, valN]) 1051 1133 </pre> 1052 <p>Returns the result of a bitwise XOR of the arguments <a class="footnote-reference" href="#id8 0" id="id36" name="id36">[1]</a>:</p>1134 <p>Returns the result of a bitwise XOR of the arguments <a class="footnote-reference" href="#id82" id="id38" name="id38">[1]</a>:</p> 1053 1135 <pre class="literal-block"> 1054 1136 $(int-xor val1, val2[, valN]) 1055 1137 </pre> 1056 1138 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean (true = non-empty, false = empty) result 1057 of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">==</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id37" name="id37">[1]</a>:</p>1139 of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">==</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id39" name="id39">[1]</a>:</p> 1058 1140 <pre class="literal-block"> 1059 1141 $(int-eq val1, val2) 1060 1142 </pre> 1061 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">!=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id38" name="id38">[1]</a>:</p>1143 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">!=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id40" name="id40">[1]</a>:</p> 1062 1144 <pre class="literal-block"> 1063 1145 $(int-ne val1, val2) 1064 1146 </pre> 1065 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">></span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id39" name="id39">[1]</a>:</p>1147 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">></span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id41" name="id41">[1]</a>:</p> 1066 1148 <pre class="literal-block"> 1067 1149 $(int-gt val1, val2) 1068 1150 </pre> 1069 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">>=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id40" name="id40">[1]</a>:</p>1151 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre">>=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id42" name="id42">[1]</a>:</p> 1070 1152 <pre class="literal-block"> 1071 1153 $(int-ge val1, val2) 1072 1154 </pre> 1073 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre"><</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id41" name="id41">[1]</a>:</p>1155 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre"><</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id43" name="id43">[1]</a>:</p> 1074 1156 <pre class="literal-block"> 1075 1157 $(int-lt val1, val2) 1076 1158 </pre> 1077 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre"><=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id8 0" id="id42" name="id42">[1]</a>:</p>1159 <p>Returns the <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean result of <tt class="docutils literal"><span class="pre">val1</span> <span class="pre"><=</span> <span class="pre">val2</span></tt> <a class="footnote-reference" href="#id82" id="id44" name="id44">[1]</a>:</p> 1078 1160 <pre class="literal-block"> 1079 1161 $(int-le val1, val2) … … 1099 1181 </pre> 1100 1182 <p>Test if the two strings are identical, returning <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean (true = 1101 non-empty, false = empty) <a class="footnote-reference" href="#id8 1" id="id43" name="id43">[2]</a>:</p>1183 non-empty, false = empty) <a class="footnote-reference" href="#id83" id="id45" name="id45">[2]</a>:</p> 1102 1184 <pre class="literal-block"> 1103 1185 $(eq str1, str2) 1104 1186 </pre> 1105 <p>Invert a <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean value <a class="footnote-reference" href="#id8 1" id="id44" name="id44">[2]</a>:</p>1187 <p>Invert a <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean value <a class="footnote-reference" href="#id83" id="id46" name="id46">[2]</a>:</p> 1106 1188 <pre class="literal-block"> 1107 1189 $(not val) 1108 1190 </pre> 1109 <p>Test if <tt class="docutils literal"><span class="pre">variable</span></tt> is defined, returning a <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean value <a class="footnote-reference" href="#id8 0" id="id45" name="id45">[1]</a>:</p>1191 <p>Test if <tt class="docutils literal"><span class="pre">variable</span></tt> is defined, returning a <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean value <a class="footnote-reference" href="#id82" id="id47" name="id47">[1]</a>:</p> 1110 1192 <pre class="literal-block"> 1111 1193 $(defined variable) 1112 1194 </pre> 1113 1195 <p>Test if <tt class="docutils literal"><span class="pre">set-a</span></tt> and <tt class="docutils literal"><span class="pre">set-b</span></tt> intersects, returning a <tt class="docutils literal"><span class="pre">kmk</span></tt> boolean 1114 value <a class="footnote-reference" href="#id8 0" id="id46" name="id46">[1]</a>:</p>1196 value <a class="footnote-reference" href="#id82" id="id48" name="id48">[1]</a>:</p> 1115 1197 <pre class="literal-block"> 1116 1198 $(intersects set-a, set-b) 1117 1199 </pre> 1118 <p>Same as <tt class="docutils literal"><span class="pre">$(if</span> <span class="pre">)</span></tt> execpt that the condition is a <tt class="docutils literal"><span class="pre">kmk</span></tt>-expression <a class="footnote-reference" href="#id8 0" id="id47" name="id47">[1]</a>:</p>1200 <p>Same as <tt class="docutils literal"><span class="pre">$(if</span> <span class="pre">)</span></tt> execpt that the condition is a <tt class="docutils literal"><span class="pre">kmk</span></tt>-expression <a class="footnote-reference" href="#id82" id="id49" name="id49">[1]</a>:</p> 1119 1201 <pre class="literal-block"> 1120 1202 $(if-expr kmk-expression,true-part[,false-part]) … … 1122 1204 <p>Select the first true condition (<tt class="docutils literal"><span class="pre">kmk</span></tt>-expression) and expand the 1123 1205 following body. Special condition strings <tt class="docutils literal"><span class="pre">default</span></tt> and 1124 <tt class="docutils literal"><span class="pre">otherwise</span></tt> <a class="footnote-reference" href="#id8 0" id="id48" name="id48">[1]</a>:</p>1206 <tt class="docutils literal"><span class="pre">otherwise</span></tt> <a class="footnote-reference" href="#id82" id="id50" name="id50">[1]</a>:</p> 1125 1207 <pre class="literal-block"> 1126 1208 $(select when1-cond, when1-body[, whenN-cond, whenN-body]) 1127 1209 </pre> 1128 1210 <p>Evalutate the <tt class="docutils literal"><span class="pre">kmk-expression</span></tt> returning what it evalues as. This is 1129 the preferred way of doing arithmentic now <a class="footnote-reference" href="#id8 0" id="id49" name="id49">[1]</a>:</p>1211 the preferred way of doing arithmentic now <a class="footnote-reference" href="#id82" id="id51" name="id51">[1]</a>:</p> 1130 1212 <pre class="literal-block"> 1131 1213 $(expr kmk-expression) … … 1134 1216 <p>Stack Fuctions:</p> 1135 1217 <blockquote> 1136 <p>Push <tt class="docutils literal"><span class="pre">item</span></tt> onto the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id8 0" id="id50" name="id50">[1]</a>:</p>1218 <p>Push <tt class="docutils literal"><span class="pre">item</span></tt> onto the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id82" id="id52" name="id52">[1]</a>:</p> 1137 1219 <pre class="literal-block"> 1138 1220 $(stack-push stack-var, item) 1139 1221 </pre> 1140 <p>Pop the top item off the <tt class="docutils literal"><span class="pre">stack-var</span></tt> <a class="footnote-reference" href="#id8 0" id="id51" name="id51">[1]</a>:</p>1222 <p>Pop the top item off the <tt class="docutils literal"><span class="pre">stack-var</span></tt> <a class="footnote-reference" href="#id82" id="id53" name="id53">[1]</a>:</p> 1141 1223 <pre class="literal-block"> 1142 1224 $(stack-pop stack-var) 1143 1225 </pre> 1144 <p>Pop the top item off the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id8 0" id="id52" name="id52">[1]</a>:</p>1226 <p>Pop the top item off the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id82" id="id54" name="id54">[1]</a>:</p> 1145 1227 <pre class="literal-block"> 1146 1228 $(stack-popv stack-var) 1147 1229 </pre> 1148 <p>Get the top item of the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id8 0" id="id53" name="id53">[1]</a>:</p>1230 <p>Get the top item of the <tt class="docutils literal"><span class="pre">stack-var</span></tt>, returning the empty string <a class="footnote-reference" href="#id82" id="id55" name="id55">[1]</a>:</p> 1149 1231 <pre class="literal-block"> 1150 1232 $(stack-top stack-var) … … 1166 1248 first check whether the <tt class="docutils literal"><span class="pre">condition</span></tt> (<tt class="docutils literal"><span class="pre">kmk</span></tt>-expression) is true, 1167 1249 then expand <tt class="docutils literal"><span class="pre">body</span></tt> concatenating the result to the previous iterations 1168 (spaced), and finally evaluate <tt class="docutils literal"><span class="pre">next</span></tt> <a class="footnote-reference" href="#id8 0" id="id54" name="id54">[1]</a>:</p>1250 (spaced), and finally evaluate <tt class="docutils literal"><span class="pre">next</span></tt> <a class="footnote-reference" href="#id82" id="id56" name="id56">[1]</a>:</p> 1169 1251 <pre class="literal-block"> 1170 1252 $(for init,conditions,next,body) … … 1172 1254 <p>C-style while-loop. Each iteration will check whether the <tt class="docutils literal"><span class="pre">condition</span></tt> 1173 1255 (<tt class="docutils literal"><span class="pre">kmk</span></tt>-expression) is true, then expand <tt class="docutils literal"><span class="pre">body</span></tt> concatenating the 1174 result to the previous iterations <a class="footnote-reference" href="#id8 0" id="id55" name="id55">[1]</a>:</p>1256 result to the previous iterations <a class="footnote-reference" href="#id82" id="id57" name="id57">[1]</a>:</p> 1175 1257 <pre class="literal-block"> 1176 1258 $(while conditions,body) … … 1187 1269 </pre> 1188 1270 <p>Same as <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">text)</span></tt> except that the <tt class="docutils literal"><span class="pre">text</span></tt> is expanded in its 1189 own variable context <a class="footnote-reference" href="#id8 0" id="id56" name="id56">[1]</a>:</p>1271 own variable context <a class="footnote-reference" href="#id82" id="id58" name="id58">[1]</a>:</p> 1190 1272 <pre class="literal-block"> 1191 1273 $(evalctx text) 1192 1274 </pre> 1193 <p>Same as <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">$(value</span> <span class="pre">var))</span></tt> <a class="footnote-reference" href="#id8 0" id="id57" name="id57">[1]</a>:</p>1275 <p>Same as <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">$(value</span> <span class="pre">var))</span></tt> <a class="footnote-reference" href="#id82" id="id59" name="id59">[1]</a>:</p> 1194 1276 <pre class="literal-block"> 1195 1277 $(evalval var) 1196 1278 </pre> 1197 <p>Same as <tt class="docutils literal"><span class="pre">$(evalctx</span> <span class="pre">$(value</span> <span class="pre">var))</span></tt> <a class="footnote-reference" href="#id8 0" id="id58" name="id58">[1]</a>:</p>1279 <p>Same as <tt class="docutils literal"><span class="pre">$(evalctx</span> <span class="pre">$(value</span> <span class="pre">var))</span></tt> <a class="footnote-reference" href="#id82" id="id60" name="id60">[1]</a>:</p> 1198 1280 <pre class="literal-block"> 1199 1281 $(evalvalctx var) 1200 1282 </pre> 1201 <p>A combination of <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">)</span></tt>, <tt class="docutils literal"><span class="pre">$(call</span> <span class="pre">)</span></tt> and <tt class="docutils literal"><span class="pre">$(value</span> <span class="pre">)</span></tt> <a class="footnote-reference" href="#id8 0" id="id59" name="id59">[1]</a>:</p>1283 <p>A combination of <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">)</span></tt>, <tt class="docutils literal"><span class="pre">$(call</span> <span class="pre">)</span></tt> and <tt class="docutils literal"><span class="pre">$(value</span> <span class="pre">)</span></tt> <a class="footnote-reference" href="#id82" id="id61" name="id61">[1]</a>:</p> 1202 1284 <pre class="literal-block"> 1203 1285 $(evalcall var) 1204 1286 </pre> 1205 <p>A combination of <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">)</span></tt> and <tt class="docutils literal"><span class="pre">$(call</span> <span class="pre">)</span></tt> <a class="footnote-reference" href="#id8 0" id="id60" name="id60">[1]</a>:</p>1287 <p>A combination of <tt class="docutils literal"><span class="pre">$(eval</span> <span class="pre">)</span></tt> and <tt class="docutils literal"><span class="pre">$(call</span> <span class="pre">)</span></tt> <a class="footnote-reference" href="#id82" id="id62" name="id62">[1]</a>:</p> 1206 1288 <pre class="literal-block"> 1207 1289 $(evalcall var) 1208 1290 </pre> 1209 1291 <p>Remove comments and blank lines from the variable <tt class="docutils literal"><span class="pre">var</span></tt>. Expands to 1210 the empty string <a class="footnote-reference" href="#id8 0" id="id61" name="id61">[1]</a>:</p>1292 the empty string <a class="footnote-reference" href="#id82" id="id63" name="id63">[1]</a>:</p> 1211 1293 <pre class="literal-block"> 1212 1294 $(eval-opt-var var) 1213 1295 </pre> 1214 1296 <p>Returns accessing <tt class="docutils literal"><span class="pre">$<</span></tt> of <tt class="docutils literal"><span class="pre">target</span></tt>, either retriving the whole thing 1215 or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id8 0" id="id62" name="id62">[1]</a>:</p>1297 or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id82" id="id64" name="id64">[1]</a>:</p> 1216 1298 <pre class="literal-block"> 1217 1299 $(deps target[, pos]) 1218 1300 </pre> 1219 1301 <p>Returns accessing <tt class="docutils literal"><span class="pre">$+</span></tt> (order + duplicates) of <tt class="docutils literal"><span class="pre">target</span></tt>, either 1220 retriving the whole thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id8 0" id="id63" name="id63">[1]</a>:</p>1302 retriving the whole thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id82" id="id65" name="id65">[1]</a>:</p> 1221 1303 <pre class="literal-block"> 1222 1304 $(deps-all target[, pos]) 1223 1305 </pre> 1224 1306 <p>Returns accessing <tt class="docutils literal"><span class="pre">$?</span></tt> of <tt class="docutils literal"><span class="pre">target</span></tt>, either retriving the whole 1225 thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id8 0" id="id64" name="id64">[1]</a>:</p>1307 thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id82" id="id66" name="id66">[1]</a>:</p> 1226 1308 <pre class="literal-block"> 1227 1309 $(deps-newer target[, pos]) 1228 1310 </pre> 1229 1311 <p>Returns accessing <tt class="docutils literal"><span class="pre">$|</span></tt> (order only) of <tt class="docutils literal"><span class="pre">target</span></tt>, either retriving the 1230 whole thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id8 0" id="id65" name="id65">[1]</a>:</p>1312 whole thing or the file at <tt class="docutils literal"><span class="pre">pos</span></tt> (one-origin) <a class="footnote-reference" href="#id82" id="id67" name="id67">[1]</a>:</p> 1231 1313 <pre class="literal-block"> 1232 1314 $(deps-oo target[, pos]) … … 1236 1318 <blockquote> 1237 1319 <p>Create one or more command lines avoiding the max argument 1238 length restriction of the host OS <a class="footnote-reference" href="#id8 0" id="id66" name="id66">[1]</a>:</p>1320 length restriction of the host OS <a class="footnote-reference" href="#id82" id="id68" name="id68">[1]</a>:</p> 1239 1321 <pre class="literal-block"> 1240 1322 $(xargs ar cas mylib.a,$(objects)) … … 1243 1325 <p>Returns the commands for the specified target separated by new-line, space, 1244 1326 or a user defined string. Note that this might not produce the 100% correct 1245 result if any of the prerequisite automatic variables are used <a class="footnote-reference" href="#id8 0" id="id67" name="id67">[1]</a>:</p>1327 result if any of the prerequisite automatic variables are used <a class="footnote-reference" href="#id82" id="id69" name="id69">[1]</a>:</p> 1246 1328 <pre class="literal-block"> 1247 1329 $(commands target) … … 1252 1334 argument if not. This differs from <tt class="docutils literal"><span class="pre">$(comp-vars</span> <span class="pre">v1,v2,ne)</span></tt> in that 1253 1335 line by line is stripped of leading spaces, command prefixes and 1254 trailing spaces before comparing <a class="footnote-reference" href="#id8 0" id="id68" name="id68">[1]</a>:</p>1336 trailing spaces before comparing <a class="footnote-reference" href="#id82" id="id70" name="id70">[1]</a>:</p> 1255 1337 <pre class="literal-block"> 1256 1338 $(comp-cmds cmds-var1, cmds-var2, ne) … … 1259 1341 <p>Compares the values of the two variables returning the empty string if 1260 1342 equal and the 3rd argument if not. Leading and trailing spaces is 1261 ignored <a class="footnote-reference" href="#id8 0" id="id69" name="id69">[1]</a>:</p>1343 ignored <a class="footnote-reference" href="#id82" id="id71" name="id71">[1]</a>:</p> 1262 1344 <pre class="literal-block"> 1263 1345 $(comp-var var1, var2, ne) … … 1295 1377 <p>Returns the current local time and date formatted in the <tt class="docutils literal"><span class="pre">strftime</span></tt> 1296 1378 style specifier <tt class="docutils literal"><span class="pre">fmt</span></tt>. <tt class="docutils literal"><span class="pre">fmt</span></tt> defaults to <tt class="docutils literal"><span class="pre">%Y-%m-%dT%H:%M:%S</span></tt> when 1297 not specified <a class="footnote-reference" href="#id8 0" id="id70" name="id70">[1]</a>:</p>1379 not specified <a class="footnote-reference" href="#id82" id="id72" name="id72">[1]</a>:</p> 1298 1380 <pre class="literal-block"> 1299 1381 $(date fmt) … … 1301 1383 <p>Returns the current UTC time and date formatted in the <tt class="docutils literal"><span class="pre">strftime</span></tt> 1302 1384 style specifier <tt class="docutils literal"><span class="pre">fmt</span></tt>. <tt class="docutils literal"><span class="pre">fmt</span></tt> defaults to <tt class="docutils literal"><span class="pre">%Y-%m-%dT%H:%M:%SZ</span></tt> when 1303 not specified <a class="footnote-reference" href="#id8 0" id="id71" name="id71">[1]</a>:</p>1385 not specified <a class="footnote-reference" href="#id82" id="id73" name="id73">[1]</a>:</p> 1304 1386 <pre class="literal-block"> 1305 1387 $(date-utc fmt) … … 1307 1389 <p>Reformats the <tt class="docutils literal"><span class="pre">in</span></tt> time and date using <tt class="docutils literal"><span class="pre">fmt</span></tt>. The <tt class="docutils literal"><span class="pre">in-fmt</span></tt> defaults 1308 1390 to <tt class="docutils literal"><span class="pre">fmt</span></tt> if not specified. While <tt class="docutils literal"><span class="pre">fmt</span></tt> defaults to 1309 <tt class="docutils literal"><span class="pre">%Y-%m-%dT%H:%M:%SZ</span></tt> if not specified <a class="footnote-reference" href="#id8 0" id="id72" name="id72">[1]</a>:</p>1391 <tt class="docutils literal"><span class="pre">%Y-%m-%dT%H:%M:%SZ</span></tt> if not specified <a class="footnote-reference" href="#id82" id="id74" name="id74">[1]</a>:</p> 1310 1392 <pre class="literal-block"> 1311 1393 $(date-utc fmt,time,in-fmt) 1312 1394 </pre> 1313 <p>Returns the current nanosecond timestamp (monotonic when possible) <a class="footnote-reference" href="#id8 0" id="id73" name="id73">[1]</a>:</p>1395 <p>Returns the current nanosecond timestamp (monotonic when possible) <a class="footnote-reference" href="#id82" id="id75" name="id75">[1]</a>:</p> 1314 1396 <pre class="literal-block"> 1315 1397 $(nanots ) 1316 1398 </pre> 1317 1399 <p>Returns the size of the specified file, or -1 if the size could not 1318 be obtained. This can be used to check if a file exist or not <a class="footnote-reference" href="#id8 0" id="id74" name="id74">[1]</a>:</p>1400 be obtained. This can be used to check if a file exist or not <a class="footnote-reference" href="#id82" id="id76" name="id76">[1]</a>:</p> 1319 1401 <pre class="literal-block"> 1320 1402 $(file-size file) 1321 1403 </pre> 1322 <p>Searches the <tt class="docutils literal"><span class="pre">PATH</span></tt> <tt class="docutils literal"><span class="pre">kmk</span></tt> variable for the specified <tt class="docutils literal"><span class="pre">files</span></tt> <a class="footnote-reference" href="#id8 0" id="id75" name="id75">[1]</a>:</p>1404 <p>Searches the <tt class="docutils literal"><span class="pre">PATH</span></tt> <tt class="docutils literal"><span class="pre">kmk</span></tt> variable for the specified <tt class="docutils literal"><span class="pre">files</span></tt> <a class="footnote-reference" href="#id82" id="id77" name="id77">[1]</a>:</p> 1323 1405 <pre class="literal-block"> 1324 1406 $(which files...) 1325 1407 </pre> 1326 <p>OS/2: Returns the specified LIBPATH variable value <a class="footnote-reference" href="#id8 0" id="id76" name="id76">[1]</a>:</p>1408 <p>OS/2: Returns the specified LIBPATH variable value <a class="footnote-reference" href="#id82" id="id78" name="id78">[1]</a>:</p> 1327 1409 <pre class="literal-block"> 1328 1410 $(libpath var) 1329 1411 </pre> 1330 1412 <p>OS/2: Sets the specified LIBPATH variable value, returning the empty 1331 string <a class="footnote-reference" href="#id8 0" id="id77" name="id77">[1]</a>:</p>1413 string <a class="footnote-reference" href="#id82" id="id79" name="id79">[1]</a>:</p> 1332 1414 <pre class="literal-block"> 1333 1415 $(libpath var,value) … … 1337 1419 <blockquote> 1338 1420 <p>Returns various make statistics, if no item is specified a default 1339 selection is returned <a class="footnote-reference" href="#id8 0" id="id78" name="id78">[1]</a>:</p>1421 selection is returned <a class="footnote-reference" href="#id82" id="id80" name="id80">[1]</a>:</p> 1340 1422 <pre class="literal-block"> 1341 1423 $(make-stats item[,itemN]) 1342 1424 </pre> 1343 1425 <p>Raise a debug breakpoint. Used for debugging <tt class="docutils literal"><span class="pre">kmk</span></tt> makefile 1344 parsing <a class="footnote-reference" href="#id8 0" id="id79" name="id79">[1]</a>:</p>1426 parsing <a class="footnote-reference" href="#id82" id="id81" name="id81">[1]</a>:</p> 1345 1427 <pre class="literal-block"> 1346 1428 $(breakpoint ) … … 1348 1430 </blockquote> 1349 1431 <hr class="docutils" /> 1350 <table class="docutils footnote" frame="void" id="id8 0" rules="none">1432 <table class="docutils footnote" frame="void" id="id82" rules="none"> 1351 1433 <colgroup><col class="label" /><col /></colgroup> 1352 1434 <tbody valign="top"> 1353 <tr><td class="label"><a name="id8 0">[1]</a></td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>, <a class="fn-backref" href="#id3">3</a>, <a class="fn-backref" href="#id4">4</a>, <a class="fn-backref" href="#id5">5</a>, <a class="fn-backref" href="#id6">6</a>, <a class="fn-backref" href="#id7">7</a>, <a class="fn-backref" href="#id8">8</a>, <a class="fn-backref" href="#id9">9</a>, <a class="fn-backref" href="#id10">10</a>, <a class="fn-backref" href="#id11">11</a>, <a class="fn-backref" href="#id12">12</a>, <a class="fn-backref" href="#id13">13</a>, <a class="fn-backref" href="#id14">14</a>, <a class="fn-backref" href="#id15">15</a>, <a class="fn-backref" href="#id16">16</a>, <a class="fn-backref" href="#id17">17</a>, <a class="fn-backref" href="#id18">18</a>, <a class="fn-backref" href="#id19">19</a>, <a class="fn-backref" href="#id20">20</a>, <a class="fn-backref" href="#id21">21</a>, <a class="fn-backref" href="#id22">22</a>, <a class="fn-backref" href="#id23">23</a>, <a class="fn-backref" href="#id24">24</a>, <a class="fn-backref" href="#id25">25</a>, <a class="fn-backref" href="#id26">26</a>, <a class="fn-backref" href="#id27">27</a>, <a class="fn-backref" href="#id28">28</a>, <a class="fn-backref" href="#id29">29</a>, <a class="fn-backref" href="#id30">30</a>, <a class="fn-backref" href="#id31">31</a>, <a class="fn-backref" href="#id32">32</a>, <a class="fn-backref" href="#id33">33</a>, <a class="fn-backref" href="#id34">34</a>, <a class="fn-backref" href="#id35">35</a>, <a class="fn-backref" href="#id36">36</a>, <a class="fn-backref" href="#id37">37</a>, <a class="fn-backref" href="#id38">38</a>, <a class="fn-backref" href="#id39">39</a>, <a class="fn-backref" href="#id40">40</a>, <a class="fn-backref" href="#id41">41</a>, <a class="fn-backref" href="#id42">42</a>, <a class="fn-backref" href="#id45">43</a>, <a class="fn-backref" href="#id46">44</a>, <a class="fn-backref" href="#id47">45</a>, <a class="fn-backref" href="#id48">46</a>, <a class="fn-backref" href="#id49">47</a>, <a class="fn-backref" href="#id50">48</a>, <a class="fn-backref" href="#id51">49</a>, <a class="fn-backref" href="#id52">50</a>, <a class="fn-backref" href="#id53">51</a>, <a class="fn-backref" href="#id54">52</a>, <a class="fn-backref" href="#id55">53</a>, <a class="fn-backref" href="#id56">54</a>, <a class="fn-backref" href="#id57">55</a>, <a class="fn-backref" href="#id58">56</a>, <a class="fn-backref" href="#id59">57</a>, <a class="fn-backref" href="#id60">58</a>, <a class="fn-backref" href="#id61">59</a>, <a class="fn-backref" href="#id62">60</a>, <a class="fn-backref" href="#id63">61</a>, <a class="fn-backref" href="#id64">62</a>, <a class="fn-backref" href="#id65">63</a>, <a class="fn-backref" href="#id66">64</a>, <a class="fn-backref" href="#id67">65</a>, <a class="fn-backref" href="#id68">66</a>, <a class="fn-backref" href="#id69">67</a>, <a class="fn-backref" href="#id70">68</a>, <a class="fn-backref" href="#id71">69</a>, <a class="fn-backref" href="#id72">70</a>, <a class="fn-backref" href="#id73">71</a>, <a class="fn-backref" href="#id74">72</a>, <a class="fn-backref" href="#id75">73</a>, <a class="fn-backref" href="#id76">74</a>, <a class="fn-backref" href="#id77">75</a>, <a class="fn-backref" href="#id78">76</a>, <a class="fn-backref" href="#id79">77</a>)</em> <tt class="docutils literal"><span class="pre">kmk</span></tt> only feature.</td></tr>1435 <tr><td class="label"><a name="id82">[1]</a></td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>, <a class="fn-backref" href="#id3">3</a>, <a class="fn-backref" href="#id4">4</a>, <a class="fn-backref" href="#id5">5</a>, <a class="fn-backref" href="#id6">6</a>, <a class="fn-backref" href="#id7">7</a>, <a class="fn-backref" href="#id8">8</a>, <a class="fn-backref" href="#id9">9</a>, <a class="fn-backref" href="#id10">10</a>, <a class="fn-backref" href="#id11">11</a>, <a class="fn-backref" href="#id12">12</a>, <a class="fn-backref" href="#id13">13</a>, <a class="fn-backref" href="#id14">14</a>, <a class="fn-backref" href="#id15">15</a>, <a class="fn-backref" href="#id16">16</a>, <a class="fn-backref" href="#id17">17</a>, <a class="fn-backref" href="#id18">18</a>, <a class="fn-backref" href="#id19">19</a>, <a class="fn-backref" href="#id20">20</a>, <a class="fn-backref" href="#id21">21</a>, <a class="fn-backref" href="#id22">22</a>, <a class="fn-backref" href="#id23">23</a>, <a class="fn-backref" href="#id24">24</a>, <a class="fn-backref" href="#id25">25</a>, <a class="fn-backref" href="#id26">26</a>, <a class="fn-backref" href="#id27">27</a>, <a class="fn-backref" href="#id28">28</a>, <a class="fn-backref" href="#id29">29</a>, <a class="fn-backref" href="#id30">30</a>, <a class="fn-backref" href="#id31">31</a>, <a class="fn-backref" href="#id32">32</a>, <a class="fn-backref" href="#id33">33</a>, <a class="fn-backref" href="#id34">34</a>, <a class="fn-backref" href="#id35">35</a>, <a class="fn-backref" href="#id36">36</a>, <a class="fn-backref" href="#id37">37</a>, <a class="fn-backref" href="#id38">38</a>, <a class="fn-backref" href="#id39">39</a>, <a class="fn-backref" href="#id40">40</a>, <a class="fn-backref" href="#id41">41</a>, <a class="fn-backref" href="#id42">42</a>, <a class="fn-backref" href="#id43">43</a>, <a class="fn-backref" href="#id44">44</a>, <a class="fn-backref" href="#id47">45</a>, <a class="fn-backref" href="#id48">46</a>, <a class="fn-backref" href="#id49">47</a>, <a class="fn-backref" href="#id50">48</a>, <a class="fn-backref" href="#id51">49</a>, <a class="fn-backref" href="#id52">50</a>, <a class="fn-backref" href="#id53">51</a>, <a class="fn-backref" href="#id54">52</a>, <a class="fn-backref" href="#id55">53</a>, <a class="fn-backref" href="#id56">54</a>, <a class="fn-backref" href="#id57">55</a>, <a class="fn-backref" href="#id58">56</a>, <a class="fn-backref" href="#id59">57</a>, <a class="fn-backref" href="#id60">58</a>, <a class="fn-backref" href="#id61">59</a>, <a class="fn-backref" href="#id62">60</a>, <a class="fn-backref" href="#id63">61</a>, <a class="fn-backref" href="#id64">62</a>, <a class="fn-backref" href="#id65">63</a>, <a class="fn-backref" href="#id66">64</a>, <a class="fn-backref" href="#id67">65</a>, <a class="fn-backref" href="#id68">66</a>, <a class="fn-backref" href="#id69">67</a>, <a class="fn-backref" href="#id70">68</a>, <a class="fn-backref" href="#id71">69</a>, <a class="fn-backref" href="#id72">70</a>, <a class="fn-backref" href="#id73">71</a>, <a class="fn-backref" href="#id74">72</a>, <a class="fn-backref" href="#id75">73</a>, <a class="fn-backref" href="#id76">74</a>, <a class="fn-backref" href="#id77">75</a>, <a class="fn-backref" href="#id78">76</a>, <a class="fn-backref" href="#id79">77</a>, <a class="fn-backref" href="#id80">78</a>, <a class="fn-backref" href="#id81">79</a>)</em> <tt class="docutils literal"><span class="pre">kmk</span></tt> only feature.</td></tr> 1354 1436 </tbody> 1355 1437 </table> 1356 <table class="docutils footnote" frame="void" id="id8 1" rules="none">1438 <table class="docutils footnote" frame="void" id="id83" rules="none"> 1357 1439 <colgroup><col class="label" /><col /></colgroup> 1358 1440 <tbody valign="top"> 1359 <tr><td class="label"><a name="id8 1">[2]</a></td><td><em>(<a class="fn-backref" href="#id43">1</a>, <a class="fn-backref" href="#id44">2</a>)</em> Experimental GNU <tt class="docutils literal"><span class="pre">make</span></tt> feature that is not enabled by default.</td></tr>1441 <tr><td class="label"><a name="id83">[2]</a></td><td><em>(<a class="fn-backref" href="#id45">1</a>, <a class="fn-backref" href="#id46">2</a>)</em> Experimental GNU <tt class="docutils literal"><span class="pre">make</span></tt> feature that is not enabled by default.</td></tr> 1360 1442 </tbody> 1361 1443 </table> -
trunk/kBuild/doc/QuickReference-kmk.txt
r2170 r2171 268 268 --------------- 269 269 270 todo 270 Certain names have special meanings if they appear as targets. 271 272 +-------------------------------+---------------------------------------------+ 273 | Target | Description | 274 +===============================+=============================================+ 275 | ``.DEFAULT`` | The recipe is used for any target for which | 276 | | no rules are found. | 277 +-------------------------------+---------------------------------------------+ 278 | ``.DELETE_ON_ERROR`` | If mentioned, ``kmk`` will delete the | 279 | | targets of a rule if it has changed and its | 280 | | recipe fails or is interrupted. | 281 +-------------------------------+---------------------------------------------+ 282 | ``.EXPORT_ALL_VARIABLES`` | If mentioned, all variables will by default | 283 | | be exported to child processes. | 284 +-------------------------------+---------------------------------------------+ 285 | ``.IGNORE`` | Ignore errors in the execution of the recipe| 286 | | for the targets ``.IGNORE`` depends on, if | 287 | | no prequisites all targets are affected. | 288 +-------------------------------+---------------------------------------------+ 289 | ``.INTERMEDIATE`` | The prerequisites are treated as | 290 | | intermediate files (implicite rules). | 291 +-------------------------------+---------------------------------------------+ 292 | ``.LOW_RESOLUTION_TIME`` | ``kmk`` will assume prerequisite files are | 293 | | created with low resolution time stamps. | 294 +-------------------------------+---------------------------------------------+ 295 | ``.NOTPARALLEL`` | If mentioned without any prerequisites, | 296 | | ``kmk`` will run serially as if -j1 was | 297 | | given. If it has prerequisites ``kmk`` [1]_ | 298 | | will only do this for the targets among | 299 | | them. | 300 +-------------------------------+---------------------------------------------+ 301 | ``.PHONY`` | The prerequisites are considered phony and | 302 | | will be rebuilt unconditionally. | 303 +-------------------------------+---------------------------------------------+ 304 | ``.PRECIOUS`` | The targets which ``.PRECIOUS`` depends | 305 | | will to be deleted if ``kmk`` is killed or | 306 | | interrupted while their building. | 307 +-------------------------------+---------------------------------------------+ 308 | ``.SECONDARY`` | The prerequisites are treated as | 309 | | intermediate files, except that they are | 310 | | never automatically deleted. If used with | 311 | | no prerequisites all targets gets this | 312 | | treatement. | 313 +-------------------------------+---------------------------------------------+ 314 | ``.SECONDEXPANSION`` | If mentioned, all prerequisite lists after | 315 | | it will be expanded a second time after all | 316 | | makefiles have been read. | 317 +-------------------------------+---------------------------------------------+ 318 | ``.SECONDTARGETEXPANSION`` | If mentioned, all targets after it will be | 319 | [1]_ | expanded a second time after all makefiles | 320 | | have been read. | 321 +-------------------------------+---------------------------------------------+ 322 | ``.SILENT`` | ``kmk`` will not print the recipe for | 323 | | targets listed as prerequisites, if none | 324 | | then it applies to all targets. | 325 +-------------------------------+---------------------------------------------+ 326 | ``.SUFFIXES`` | The prerequisites are the list of suffixes | 327 | | used in checking for suffix rules. If it | 328 | | appears without prerequisites it the suffix | 329 | | will be cleared. | 330 +-------------------------------+---------------------------------------------+ 271 331 272 332
Note:
See TracChangeset
for help on using the changeset viewer.