X-Git-Url: https://git.ladys.computer/Shushe/blobdiff_plain/dbdfdb93a22caed9398f9523e85e4ccef37468cc..7ae7c33964113408bd8cdee445d90f8057159515:/README.markdown
diff --git a/README.markdown b/README.markdown
index 893ac2c..55d6f8f 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,6 +1,10 @@
+
# ⛩️📰 书社
-An X·S·L·T‐based static site generator.
+A make·file for X·M·L.
⛩️📰 书社 aims to make it easy to generate websites with
X·S·L·T and G·N·U Make.
@@ -18,6 +22,15 @@ It makes things easier by :—
It aims to do this with zero dependencies beyond the programs already
installed on your computer.
+(On Linux machines, you may need to install `libxml2-utils` to get the
+ commandline programs from `libxml2`.)
+
+**Note:**
+⛩️📰 书社 requires functionality present in G·N·U Make 3.81 (or later)
+ and will not work in previous versions, or other implementations of
+ Make.
+Compatibility with later versions of G·N·U Make is assumed, but not
+ tested.
## Nomenclature
@@ -60,9 +73,13 @@ Compilation involves the following steps :—
5. ⛩️📰 书社 uses the dependency tree to establish prerequisites for
each output file.
-6. ⛩️📰 书社 compiles each output file to `build/public`.
+6. ⛩️📰 书社 compiles each output file to `build/result`.
+
+7. ⛩️📰 书社 symlinks most output files from `build/result` to
+ `build/public`, but it does some additional processing instead on
+ those which indicate a non‐X·M·L desired final output form.
-7. ⛩️📰 书社 copies the output files to `public`.
+8. ⛩️📰 书社 copies the final resulting files to `public`.
You can use `make list` to list each identified source file or include
alongside its computed type and dependencies.
@@ -91,21 +108,31 @@ In every case, you may supply your own implementation by overriding the
corresponding (allcaps) variable (e·g, set `MKDIR` to supply your own
`mkdir` implementation).
+- `awk`
- `cat`
+- `cksum`
- `cp`
+- `date`
- `echo`
- `file`
- `find`
+- `git` (optional; set `GIT=` to disable)
+- `ln`
- `mkdir` (requires support for `-p`)
- `mv`
+- `od` (requires support for `-t x1`)
+- `pax` (only when generating archives)
- `printf`
- `rm`
- `sed`
- `sleep`
+- `stat`
- `test`
- `touch`
- `tr` (requires support for `-d`)
- `uuencode` (requires support for `-m` and `-r`)
+- `uudecode` (requires support for `-m` and `-r`)
+- `xargs` (requires support for `-0`)
- `xmlcatalog` (provided by `libxml2`)
- `xmllint` (provided by `libxml2`)
- `xsltproc` (provided by `libxslt`)
@@ -115,16 +142,32 @@ The following additional variables can be used to control the behaviour
- **`SRCDIR`:**
The location of the source files (default: `sources`).
+ Multiple source directories can be provided, so long as the same
+ file subpath doesn’t exist in more than one of them.
- **`INCLUDEDIR`:**
- The location of the source files (default: `sources/includes`).
+ The location of source includes (default: `sources/includes`).
This can be inside of `SRCDIR`, but needn’t be.
+ Multiple include directories can be provided, so long as the same
+ file subpath doesn’t exist in more than one of them.
- **`BUILDDIR`:**
The location of the (temporary) build directory (default: `build`).
+ `make clean` will delete this, and it is recommended that it not be
+ used for programs aside from ⛩️📰 书社.
- **`DESTDIR`:**
The location of directory to output files to (default: `public`).
+ `make install` will overwrite files in this directory which
+ correspond to those in `SRCDIR`.
+ It *will not* touch other files, including those generated from files
+ in `SRCDIR` which have since been deleted.
+
+ Files are first compiled to `$(BUILDDIR)/public` before they are
+ copied to `DESTDIR`, so this folder is relatively quick and
+ inexpensive to re·create.
+ It’s reasonable to simply delete it before every `make install` to
+ ensure stale content is removed.
- **`THISDIR`:**
The location of the ⛩️📰 书社 `GNUmakefile`.
@@ -133,29 +176,62 @@ The following additional variables can be used to control the behaviour
This variable is used to find the ⛩️📰 书社 `lib/` folder, which is
expected to be in the same location.
-- **`MAGICDIR`:**
- The location of the magic files to use (default: `$(THISDIR)/magic`).
+- **`MAGIC`:**
+ A white·space‐separated list of magic files to use (default:
+ `$(THISDIR)/magic/*`).
-- **`FINDOPTS`:**
- Options to pass to `find` when searching for source files (default:
- `-LE`).
+- **`EXTRAMAGIC`:**
+ The value of this variable is appended to `MAGIC` by default, to
+ enable additional magic files without overriding the existing ones.
- **`FINDRULES`:**
- Rules to use with `find` when searching for source files (default:
- `-flags -nohidden -and -not -name '.*'`).
+ Rules to use with `find` when searching for source files.
+ The default ignores files that start with a period or hyphen‐minus,
+ those which end with a cloparen, and those which contain a hash,
+ buck, percent, asterisk, colon, semi, eroteme, bracket, backslash,
+ or pipe.
+
+- **`EXTRAFINDRULES`:**
+ The value of this variable is appended to `FINDRULES` by default, to
+ enable additional rules without overriding the existing ones.
+
+- **`FINDINCLUDERULES`:**
+ Rules to use with `find` when searching for includes (default:
+ `$(FINDRULES)`).
+
+- **`EXTRAFINDINCLUDERULES`:**
+ The value of this variable is appended to `FINDINCLUDERULES` by
+ default, to enable additional rules without overriding the existing
+ ones.
- **`PARSERS`:**
A white·space‐separated list of parsers to use (default:
`$(THISDIR)/parsers/*.xslt`).
+- **`EXTRAPARSERS`:**
+ The value of this variable is appended to `PARSERS` by default, to
+ enable additional parsers without overriding the existing ones.
+
- **`TRANSFORMS`:**
A white·space‐separated list of transforms to use (default:
`$(THISDIR)/transforms/*.xslt`).
+- **`EXTRATRANSFORMS`:**
+ The value of this variable is appended to `TRANSFORMS` by default, to
+ enable additional transforms without overriding the existing ones.
+
- **`XMLTYPES`:**
A white·space‐separated list of media types to consider X·M·L
(default: `application/xml text/xml`).
+- **`THISREV`:**
+ The current version of ⛩️📰 书社 (default: derived from the current
+ git tag/branch/commit).
+
+- **`SRCREV`:**
+ The current version of the source files (default: derived from the
+ current git tag/branch/commit).
+
- **`VERBOSE`:**
If this variable has a value, every recipe instruction will be
printed when it runs (default: empty).
@@ -175,6 +251,8 @@ Supported magic numbers include :—
- `#!js` for `text/javascript` files
- `@charset "` for `text/css` files
- `#!tsv` for `text/tab-separated-values` files
+- `%%` for `text/record-jar` files (unregistered; see
+ [[draft-phillips-record-jar-01][]])
Text formats with associated X·S·L·T parsers are wrapped in a H·T·M·L
`