github.com/zyedidia/knit@v1.1.2-0.20230901152954-f7d4e39a0e24/man/knit.md (about)

     1  ---
     2  title: knit
     3  section: 1
     4  header: Knit Manual
     5  ---
     6  
     7  # NAME
     8    Knit - Simple and powerful build system
     9  
    10  # SYNOPSIS
    11    knit `[TARGETS] [OPTIONS]`
    12  
    13  # DESCRIPTION
    14    Knit is a build tool inspired by Make and Plan9 mk. You define rules with a
    15    Make-like syntax within a Lua program. Rules can be passed around as Lua
    16    objects, and you can use the Lua module system to make reusable modules for
    17    building any kind of source code.
    18  
    19    Knit also tracks your build to give you better incremental builds. For
    20    example, Knit automatically tracks recipes that are executed across builds,
    21    so changing a variable (even at the command-line) can cause a rule to be
    22    rebuilt because Knit can see that the recipe depends on the variable. Knit
    23    uses file modification times and file hashes to determine when files have
    24    been updated.
    25  
    26  # TOOLS
    27    When running **`knit target`**, Knit builds a dependency graph, and by
    28    default then executes it. If the **`-t`** option is specified, a sub-tool is
    29    run on the graph instead of performing the build. Sub-tools can be used to
    30    inspect the graph, convert the rules into another build format (e.g., Make,
    31    Ninja, Shell), automatically clean built files, or more.
    32  
    33  # OPTIONS
    34    `-B, --always-build`
    35  
    36  :    Unconditionally build all targets.
    37  
    38    `--cache string`
    39  
    40  :    Directory for caching internal build information (default ".").
    41  
    42    `-C, --directory string`
    43  
    44  :    Run command from directory.
    45  
    46    `-n, --dry-run`
    47  
    48  :    Print commands without actually executing.
    49  
    50    `-f, --file string`
    51  
    52  :    Knitfile to use (default "knitfile").
    53  
    54    `--hash`
    55  
    56  :    Hash files to determine if they are out-of-date (default true).
    57  
    58    `-h, --help`
    59  
    60  :    Show a help message.
    61  
    62    `--keep-going`
    63  
    64  :    Keep going even if recipes fail.
    65  
    66    `-q, --quiet`
    67  
    68  :    Don't print commands when executing.
    69  
    70    `--shell string`
    71  
    72  :    Shell to use when executing a recipe (default "sh").
    73  
    74    `-s, --style string`
    75  
    76  :    Printer style to use (basic, steps, progress) (default "basic").
    77  
    78    `-j, --threads int`
    79  
    80  :    Number of cores to use.
    81  
    82    `-t, --tool string`
    83  
    84  :    Subtool to invoke (use '-t list' to list subtools); further flags are passed to the subtool.
    85  
    86    `-u, --updated strings`
    87  
    88  :    Treat given files as updated.
    89  
    90    `-v, --version`
    91  
    92  :    Show version information.
    93  
    94  # DOCUMENTATION
    95  
    96  {{ read "docs/knit.md" }}
    97  
    98  # ADDITIONAL DOCUMENTATION
    99  
   100  See more documentation and examples online at <https://github.com/zyedidia/knit>.
   101  
   102  # BUGS
   103  
   104  See GitHub Issues: <https://github.com/zyedidia/knit/issues>
   105  
   106  # AUTHOR
   107  
   108  Zachary Yedidia <zyedidia@gmail.com>
   109  
   110  # SEE ALSO
   111  
   112  **make(1)**