X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Fstate.texi;h=0a3b3d802fc1a83a3aff08b9b2f438e06c0a11bf;hb=20471d1200d79e9a8e4926255e9eabd8dbe3a0b5;hp=5b0e05c221ac148a3d5f4381647b4f4c78b19eee;hpb=cdbd4e90ae6d7a4cf18a79205bae47e746299183;p=goredo.git diff --git a/doc/state.texi b/doc/state.texi index 5b0e05c..0a3b3d8 100644 --- a/doc/state.texi +++ b/doc/state.texi @@ -5,9 +5,72 @@ Dependency and build state is kept inside @file{.redo} subdirectory in each directory related the build. Each corresponding target has its own, -recreated with every rebuild, @file{.rec} file. It is -@url{https://www.gnu.org/software/recutils/, recfile}, that could have -various dependency information. For example: +recreated with every rebuild, binary @file{.dep} file. + +It starts with the header: + +@verbatim +"GOREDO" || 0x01 || BuildUUID +@end verbatim + +@code{0x01} is format's version number. @code{BuildUUID} is 128-bit UUID. + +After the header comes concatenation of length-prefixed chunks. Length +is the length of the whole chunk, including the size of the encoded +length itself. It is 16-bit big-endian integer. After the length comes +single byte type of the chunk: + +@table @asis + +@item ifcreate + +@verbatim +LEN || 0x01 || target +@end verbatim + +@code{target} is UTF-8 encoded target's name. + +@item ifchange + +@verbatim +LEN || 0x02 || + size || inodeNum || + ctimeSec || ctimeNsec || + mtimeSec || mtimeNsec || + hash || target +@end verbatim + +@code{target} is UTF-8 encoded target's name. +@code{hash} is 256-bit BLAKE3 hash. +All other inode-related fields are 64-bit big-endian integers. + +@item always + +@verbatim +LEN || 0x03 +@end verbatim + +@item stamp + +@verbatim +LEN || 0x04 || hash +@end verbatim + +@code{hash} is 256-bit BLAKE3 hash. + +@item ifchange-nonexistent + +@verbatim +LEN || 0x05 || target +@end verbatim + +@code{target} is UTF-8 encoded target's name. + +@end table + +That @file{.dep} file can be converted to human-readable +@url{https://www.gnu.org/software/recutils/, recfile} format. +For example: @example Build: 80143f04-bfff-4673-950c-081d712f573d @@ -31,5 +94,5 @@ Type: stamp Hash: 5bbdf635932cb16b9127e69b6f3872577efed338f0a4ab6f2c7ca3df6ce50cc9 @end example -And the schema definition: +And its schema definition: @verbatiminclude ../dep.rec