summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-01-27 11:17:43 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2023-01-27 17:12:28 +0100
commit1e48e8c0fd80c331666363799085a50f905c48da (patch)
tree71e57ddf4b6813ea26ffbdde636f643c5dbc3071 /etc
parent2d541fd31a50cc5a273fd3faa010f66ffe4abb15 (diff)
downloadrules-cc-1e48e8c0fd80c331666363799085a50f905c48da.tar.gz
Update documentation
Diffstat (limited to 'etc')
-rw-r--r--etc/README.template.md29
-rwxr-xr-xetc/generate-doc.sh2
2 files changed, 30 insertions, 1 deletions
diff --git a/etc/README.template.md b/etc/README.template.md
index b32383a..e12a3c0 100644
--- a/etc/README.template.md
+++ b/etc/README.template.md
@@ -2,7 +2,36 @@
A collection of rules for building C/C++ libraries and binaries.
+## How to use this Repository
+
+Either generate your `repos.json` from a template (`repos.template.json`) by
+importing the `rules-cc` repository with the tool `just-import-git`
+
+~~~sh
+$ just-import-git -C repos.template.json --as rules-cc -b master https://github.com/just-buildsystem/rules-cc > repos.json
+~~~
+
+or manually add the `rules-cc` repository to your `repos.json`.
+
+~~~json
+...
+, "rules-cc":
+ { "repository":
+ { "type": "git"
+ , "branch": "master"
+ , "commit": "7a90f68e5207d541dea937aaff5b6c4c499b8968"
+ , "repository": "https://github.com/just-buildsystem/rules-cc"
+ , "subdir": "rules"
+ }
+ }
+...
+~~~
+
+## Consume and being consumed by CMake Libraries
+
For interoperability with CMake projects, see
+
- [consume CMake libraries](./doc/consume-cmake-libraries.org)
- [being consumed by CMake](./doc/being-consumed-by-cmake.org)
+## Rule Documentation
diff --git a/etc/generate-doc.sh b/etc/generate-doc.sh
index 96bf251..3edfeb7 100755
--- a/etc/generate-doc.sh
+++ b/etc/generate-doc.sh
@@ -28,7 +28,7 @@ doc2md() {
local DOC="$(echo "$RULE_DOC" | jq -r '.doc')"
local FIELD_DOC="$(echo "$RULE_DOC" | jq -r '.field_doc')"
- echo "## Rule \`[\"$MODULE\", \"$RULE\"]\`"
+ echo "### Rule \`[\"$MODULE\", \"$RULE\"]\`"
echo
echo "$DOC" \
| jq -r '[.[] as $v | if ($v == "") then "\n\n" else $v end] | join(" ")' \