summaryrefslogtreecommitdiff
path: root/doc/tutorial
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-05-05 09:04:17 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-05-08 11:51:13 +0200
commitfded05c6eb02faa398da8a6792baf1db73f560f2 (patch)
tree36da4f7144961a06850d53b488d04f11d1046c2b /doc/tutorial
parent24b99adac23d6013803156472fbc8ae4d692402b (diff)
downloadjustbuild-fded05c6eb02faa398da8a6792baf1db73f560f2.tar.gz
tutorial/proto: Also show how to build just the CC bindings
Diffstat (limited to 'doc/tutorial')
-rw-r--r--doc/tutorial/proto.org39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/tutorial/proto.org b/doc/tutorial/proto.org
index d9600594..b4a02d48 100644
--- a/doc/tutorial/proto.org
+++ b/doc/tutorial/proto.org
@@ -309,6 +309,45 @@ into our ~C++~ rules is just convenience of our code base. If we had
to cooperate with rules not aware of proto, we could have created
a separate rule delegating the library creation to the anonymous
target and then simply reflecting the values of that target.
+In fact, we could simply use an empty library with a public ~proto~
+dependency for this purpose.
+
+#+SRCNAME: TARGETS
+#+BEGIN_SRC js
+...
+, "address proto library":
+ {"type": ["@", "rules", "CC", "library"], "proto": ["address"]}
+...
+#+END_SRC
+
+#+BEGIN_SRC sh
+$ just-mr analyse 'address proto library'
+...
+INFO: Requested target is [["@","","","address proto library"],{}]
+INFO: Result of target [["@","","","address proto library"],{}]: {
+ "artifacts": {
+ },
+ "provides": {
+ ...
+ "compile-deps": {
+ "addressbook.pb.h": {"data":{"id":"6d70cd10fabcbc7591cd82aae2f100cca39d3879","path":"work/addressbook.pb.h"},"type":"ACTION"},
+ ...
+ },
+ "link-args": [
+ "libaddressbook.a",
+ ...
+ ],
+ "link-deps": {
+ "libaddressbook.a": {"data":{"id":"753073bd026b6470138c47e004469dd1d3df08d4","path":"libaddressbook.a"},"type":"ACTION"},
+ ...
+ },
+ ...
+ },
+ "runfiles": {
+ }
+ }
+$
+#+END_SRC
** Adding a test