bake/README

82 lines
3.1 KiB
Plaintext
Raw Permalink Normal View History

2023-11-12 23:34:56 -05:00
--- Bake ---
Bake scripts into files.
2023-09-27 01:28:54 -04:00
2024-03-02 02:47:50 -05:00
Executes @BAKE to the end of the line or until @STOP within in any given file.
2023-11-12 23:34:56 -05:00
2024-03-02 02:47:50 -05:00
You may have multi-line commands, by either including a leading @STOP or by
ending each line with a backslash.
2023-11-12 23:34:56 -05:00
The execution takes place at the root of the target file, so if you have:
2024-03-02 02:47:50 -05:00
`test/file.c', and then execution takes place at `test' and the file is
simply regarded as `file.c'.
2023-09-27 01:28:54 -04:00
you may see a real example in the primary and only source file: `bake.c'.
2023-09-27 01:46:28 -04:00
this is not targeted toward any language and should be fairly flexible,
2024-03-02 02:47:50 -05:00
especially when multi-line comments are available. You should always
consider your usecase before using a tool like this. Bake is not an
all-in-one solution, nor is it designed to be a sophisticated build system,
consider something like GNU Make or Meson instead.
2023-09-27 01:28:54 -04:00
2023-11-12 23:34:56 -05:00
Binary files (files that contain characters < ' ' or > '~') are supported.
2024-03-02 02:47:50 -05:00
Manpages are included: bake(1) shake(1)
2024-02-14 13:26:19 -05:00
--- Building ---
2023-09-28 02:20:48 -04:00
Bootstrapping may be done with Shake, simply run `./shake ./bake.c'
2024-03-02 02:47:50 -05:00
Or simply run `install.sh', you'll need to be a privileged user to
install the files. See the file's content for more details regarding
the installation.
2023-11-12 23:34:56 -05:00
2024-03-02 02:47:50 -05:00
--- Macro Extension ---
2023-09-27 01:59:13 -04:00
2024-03-02 02:47:50 -05:00
Macro provides various descriptive factors about the current context:
2023-09-27 01:28:54 -04:00
2024-03-02 02:47:50 -05:00
@FILENAME : Filename of the baked file (abc.x.txt)
@SHORT : Shortened version of the Filename (^-> abc.x)
@ARGS : the remaining arguments to Bake
2023-09-27 01:28:54 -04:00
2024-03-02 02:47:50 -05:00
$@, $*, $+, respectively mapped to @FILENAME, @SHORT, and @ARGS,
are still supported, avoid these in the future.
They are most useful for a template command, such as:
@BAKE cc @FILENAME -o @SHORT @ARGS
Backslash, while otherwise ignored, will be respected at the end of the line to
concatenate lines together or if added to before any of listed macros will yield
the unfettered text. \SPECIAL_NAME will result in SPECIAL_NAME in the executed
shell command. Backslashes are applicable to all symbols used by Bake, they are
ignored otherwise.
--- Expunge Extension ---
Removes any singular file or directory non recursively defined within @{...},
this has no effect on the normal processing of the statement and is macro'd out
before it is executed.
2023-11-12 23:34:56 -05:00
--- Options ---
2023-09-28 02:20:48 -04:00
Options must come as the first argument, and may be merged together, such as -xn.
2023-09-28 02:20:48 -04:00
2024-04-07 01:48:12 -04:00
-v, --version: display versioning and licensing information.
-h, --help: display the help message, similarly to empty input.
2024-03-02 02:47:50 -05:00
-n, --dry-run: DRYRUN, does NOT run anything!
-x, --expunge: See above Expunge Extension section.
2023-09-28 02:20:48 -04:00
2023-11-12 23:34:56 -05:00
--- Shake ---
2023-09-28 02:20:48 -04:00
Bake was inspired by the Bash-based Shake utility (formerly eMake,
2023-11-12 23:34:56 -05:00
he liked my suggestion for a name). It is included under authorization
of it's creator. The original version of Shake may be found at:
2023-10-16 01:52:44 -04:00
<http://bis64wqhh3louusbd45iyj76kmn4rzw5ysawyan5bkxwyzihj67c5lid.onion/anon/shake>
2023-09-27 01:28:54 -04:00
2024-03-02 02:47:50 -05:00
Bake includes a modified Shake, both after installation and as a bootstrapper.
2023-11-12 23:34:56 -05:00
The modified version includes all features of Bake with the exceptions of
2024-03-02 02:47:50 -05:00
multi-line commands. It is not a general replacement for Bake.
2023-11-12 23:34:56 -05:00
Bake is licensed under the GPLv3-only, See LICENSE.
2024-03-02 05:30:29 -05:00
Bake was created on September 13th, 2023, and is complete as of 2024/03/02.