Build Automation for Ciao

REFERENCE MANUAL The Ciao Documentation Series

https://ciao-lang.org/

Generated/Printed on: 22 July 2023

The Ciao Development Team Jose F. Morales

Table of Contents

1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 The standalone command-line builder . . . . . . . . . . 5

3.1 Introduction to the build process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Configuration and build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4 Bootstrapping the build system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Ciao command-line parser . . . . . . . . . . . . . . . . . . . . . 7

4.1 Usage and interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

parse cmd/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 norm underscores/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Ciao command-line Help . . . . . . . . . . . . . . . . . . . . . . 9

5.1 Usage and interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

show help/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 show help cmd/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

6 Manifest compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

is bundledir/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 locate manifest file/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . 12 lookup bundle root/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . 12 ensure load manifest/1 (pred) . . . . . . . . . . . . . . . . . . . . . . 12 manifest call/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 manifest current predicate/2 (pred) . . . . . . . . . . . . . . . . . 12 split target/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 compose target/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 target is bundle/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 12 make bundlereg/4 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . 12 bundle info/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 get bundle readme/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 13 bundle manual base/2 (pred). . . . . . . . . . . . . . . . . . . . . . . 13 main file relpath/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 main file path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

6.3 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 m bundlehook decl/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . 13 m bundlehook do/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 13 m third party name/1 (pred). . . . . . . . . . . . . . . . . . . . . . . 13 m third party version/2 (pred) . . . . . . . . . . . . . . . . . . . . . 13 m third party source url/2 (pred) . . . . . . . . . . . . . . . . . . 13 m third party source md5/2 (pred) . . . . . . . . . . . . . . . . . 14 m third party patch/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 14 m third party build system/2 (pred) . . . . . . . . . . . . . . . . 14 m third party option1/2 (pred). . . . . . . . . . . . . . . . . . . . . 14 m third party option2/3 (pred). . . . . . . . . . . . . . . . . . . . . 14 m third party custom configure/2 (pred) . . . . . . . . . . . . 14 m third party custom build/2 (pred). . . . . . . . . . . . . . . . 14 m third party custom install/2 (pred). . . . . . . . . . . . . . . 14 m bundle config call/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 14 m bundle config entry/3 (pred). . . . . . . . . . . . . . . . . . . . . 14 m bundle foreign config tool/3 (pred) . . . . . . . . . . . . . . . 14 m bundle foreign dep/4 (pred) . . . . . . . . . . . . . . . . . . . . . 14

6.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

7 bundlehooks holder (library) . . . . . . . . . . . . . . . . . 17

7.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

do use module/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 do unload/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

7.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

8 Builder commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

8.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

builder run/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder cmd nobndl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . 19 list bundles/0 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder cleanup/0 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder cmd on set/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 19 builder cmd/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 root target/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 target is workspace/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . 20 bundle share workspace/2 (pred) . . . . . . . . . . . . . . . . . . . 20

8.3 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 cmd.comment/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 cmd.grade/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 cmd.only global instype/1 (pred) . . . . . . . . . . . . . . . . . . . 20 cmd.needs update builder/1 (pred) . . . . . . . . . . . . . . . . . 20 cmd.needs rescan/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 20 cmd.needs config/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 20 cmd.allow unknown targets/1 (pred) . . . . . . . . . . . . . . . . 20 cmd.no manifest load/1 (pred) . . . . . . . . . . . . . . . . . . . . . 21 cmd.recursive/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do before.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do before/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do after.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 21 cmd.do after/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 grade.cmd/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 grade.requires/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 grade.prim do/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 grade.prim kind/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 21 gen pbundle hook/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . 21

8.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

9 Binary grade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

9.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 9.2 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

cmd.comment/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 cmd.grade/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 cmd.only global instype/1 (pred) . . . . . . . . . . . . . . . . . . . 23 cmd.needs update builder/1 (pred) . . . . . . . . . . . . . . . . . 23 cmd.needs rescan/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 23 cmd.needs config/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 23 cmd.allow unknown targets/1 (pred) . . . . . . . . . . . . . . . . 23 cmd.no manifest load/1 (pred) . . . . . . . . . . . . . . . . . . . . . 23 cmd.recursive/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do before.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do before/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do after.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 24 cmd.do after/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 grade.cmd/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 grade.requires/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 grade.prim do/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 grade.prim kind/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 24

9.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

10 Docs grade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

10.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 10.2 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

cmd.comment/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 cmd.grade/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 cmd.only global instype/1 (pred) . . . . . . . . . . . . . . . . . . . 27 cmd.needs update builder/1 (pred) . . . . . . . . . . . . . . . . . 27 cmd.needs rescan/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 27 cmd.needs config/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 27 cmd.allow unknown targets/1 (pred) . . . . . . . . . . . . . . . . 27 cmd.no manifest load/1 (pred) . . . . . . . . . . . . . . . . . . . . . 27 cmd.recursive/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do before.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do before/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do after.decl/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 28 cmd.do after/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 grade.cmd/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 grade.requires/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 grade.prim do/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 grade.prim kind/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 28

10.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

11 Targets for builder. . . . . . . . . . . . . . . . . . . . . . . . . . 31

11.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 11.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

rescan targets/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 resolve targets/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

11.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

12 Installation of third-party components . . . . . . . 33

12.1 Specification of third-party components . . . . . . . . . . . . . . . . . . . . . 33 12.2 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 12.3 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

third party path/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 33 clean/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 download/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 decompress and patch/2 (pred). . . . . . . . . . . . . . . . . . . . . 34 checksum/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 configure/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 build/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 installed/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 install/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 activated/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 activate/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 deactivate/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 uninstall/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 auto install/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

12.4 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 m bundlehook decl/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . 35 m bundlehook do/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 35 m third party name/1 (pred). . . . . . . . . . . . . . . . . . . . . . . 35 m third party version/2 (pred) . . . . . . . . . . . . . . . . . . . . . 35 m third party source url/2 (pred) . . . . . . . . . . . . . . . . . . 35 m third party source md5/2 (pred) . . . . . . . . . . . . . . . . . 35 m third party patch/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 35 m third party build system/2 (pred) . . . . . . . . . . . . . . . . 35 m third party option1/2 (pred). . . . . . . . . . . . . . . . . . . . . 35 m third party option2/3 (pred). . . . . . . . . . . . . . . . . . . . . 35 m third party custom configure/2 (pred) . . . . . . . . . . . . 35 m third party custom build/2 (pred). . . . . . . . . . . . . . . . 35 m third party custom install/2 (pred). . . . . . . . . . . . . . . 36 m bundle config call/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 36 m bundle config entry/3 (pred). . . . . . . . . . . . . . . . . . . . . 36 m bundle foreign config tool/3 (pred) . . . . . . . . . . . . . . . 36 m bundle foreign dep/4 (pred) . . . . . . . . . . . . . . . . . . . . . 36

12.5 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

13 Installation of custom third-party components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

13.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 13.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

third party custom install/1 (pred) . . . . . . . . . . . . . . . . . 37 third party custom path/2 (pred). . . . . . . . . . . . . . . . . . . 37

13.3 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

m bundle foreign dep/4 (pred) . . . . . . . . . . . . . . . . . . . . . 37

13.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

14 Build code using the Ciao compiler . . . . . . . . . . 39

14.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 14.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

invoke boot ciaoc/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke ciaoc/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke ciaosh batch/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . 39 invoke ciaosh batch/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . 39 promote bootstrap/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 39 build eng exec header/1 (pred) . . . . . . . . . . . . . . . . . . . . . 39 clean eng exec header/1 (pred) . . . . . . . . . . . . . . . . . . . . . 40 create windows bat/6 (pred) . . . . . . . . . . . . . . . . . . . . . . . 40 cmd build/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cmd build copy/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cmd build link/4 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 build libs/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 runtests dir/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 runtests dir/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 exists and compilable/1 (pred) . . . . . . . . . . . . . . . . . . . . . 40 clean tree/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cachedir prefix/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 clean mods/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

14.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

15 Build documentation using LPdoc . . . . . . . . . . . 43

15.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 15.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

invoke lpdoc/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 build docs readme/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 43 build docs readme html/3 (pred) . . . . . . . . . . . . . . . . . . . 43 build doc/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 show doc/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 bld manual path/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 43 inst manual path/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 43 act manual path/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 43

15.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

16 .car file maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

16.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 16.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

eng build/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 eng clean/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 bundle flags sh file/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 45 sysconf os/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 sysconf arch/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

16.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

17 Engine maker: defs and paths . . . . . . . . . . . . . . . 47

17.1 Engine build directory layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 17.2 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 17.3 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

eng cfg/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng mainspec/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng opts/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng bundle/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng mainmod/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng mainbase/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng srcdirs/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 emugen code dir/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng h alias/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 inst eng path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 active bld eng path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . 49 active inst eng path/3 (pred). . . . . . . . . . . . . . . . . . . . . . . 49 active eng name/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 49 bld cmake path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

17.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

18 Auxiliary Predicates for Builder . . . . . . . . . . . . . 51

18.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 18.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

dir to bundle/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 lookup workspace/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke gmake/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke ant/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 ensure builddir/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 builddir clean/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 wr template/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 generate version auto/2 (pred) . . . . . . . . . . . . . . . . . . . . . 52 generate config auto/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 52 print clauses to file/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . 52 update file from clauses/3 (pred) . . . . . . . . . . . . . . . . . . . 52 update file from string/3 (pred) . . . . . . . . . . . . . . . . . . . . 52 add rpath/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 third party aux/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 update stat config sh/2 (pred). . . . . . . . . . . . . . . . . . . . . . 52 remove dir nofail/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 52

18.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

19 Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

19.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 19.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

perms/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 instype/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst ciao root/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst bundle path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst builddir path/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst cmd path/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 inst cmd path/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 final ciao root/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 final cmd path/4 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 final bundle path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 54 final builddir path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 54 active bindir/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 active docdir/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 active cmd path/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 54 install bin dirs/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 uninstall bin dirs/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 54 install bundlereg/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 54 uninstall bundlereg/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . 55 install cachedir/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 uninstall cachedir/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 55 rootprefix/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 instdir install/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 instdir uninstall/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 55 eng active bld/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 install doc/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 uninstall doc/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

19.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

20 Basic support for CMake . . . . . . . . . . . . . . . . . . . 57

20.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 20.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

b cmake/4 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

20.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

21 Installation of info files. . . . . . . . . . . . . . . . . . . . . . 59

21.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 21.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

dirfile install info/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 59 dirfile uninstall info/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . 59

21.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

22 Register/unregister code in scripts (for bash, csh, emacs, etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

22.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 22.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

register in script/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 61 unregister from script/2 (pred) . . . . . . . . . . . . . . . . . . . . . 61

22.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

23 Bundle hashing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

23.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 23.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

bundle gen commit info/1 (pred) . . . . . . . . . . . . . . . . . . . 63 bundle commit info/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . 63

23.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

24 C header detection . . . . . . . . . . . . . . . . . . . . . . . . . 65

24.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 24.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

detect c headers/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 65

24.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

25 Messages for the build process . . . . . . . . . . . . . . 67

25.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 25.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

cmd message/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 dmc message/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 normal message/2 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . 67 verbose message/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 67

25.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

26 Auxiliary code for user interaction. . . . . . . . . . . 69

26.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 26.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

ask option value/6 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ask yesno/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

26.3 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

27 Bundle configuration . . . . . . . . . . . . . . . . . . . . . . . 71

27.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 27.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

check builder update/0 (pred) . . . . . . . . . . . . . . . . . . . . . . 71 bundle has config/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 71 bundleset configure/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . 71 config set flag/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 config get flag/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 config list flags/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 config describe flag/1 (pred) . . . . . . . . . . . . . . . . . . . . . . . 72 set prolog flags from bundle flags/1 (pred) . . . . . . . . . . 72

27.3 Documentation on multifiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 m bundlehook decl/3 (pred). . . . . . . . . . . . . . . . . . . . . . . . 72 m bundlehook do/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 72 m third party name/1 (pred). . . . . . . . . . . . . . . . . . . . . . . 72 m third party version/2 (pred) . . . . . . . . . . . . . . . . . . . . . 72 m third party source url/2 (pred) . . . . . . . . . . . . . . . . . . 72 m third party source md5/2 (pred) . . . . . . . . . . . . . . . . . 72 m third party patch/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 72 m third party build system/2 (pred) . . . . . . . . . . . . . . . . 73 m third party option1/2 (pred). . . . . . . . . . . . . . . . . . . . . 73 m third party option2/3 (pred). . . . . . . . . . . . . . . . . . . . . 73 m third party custom configure/2 (pred) . . . . . . . . . . . . 73 m third party custom build/2 (pred). . . . . . . . . . . . . . . . 73 m third party custom install/2 (pred). . . . . . . . . . . . . . . 73 m bundle config call/2 (pred) . . . . . . . . . . . . . . . . . . . . . . 73 m bundle config entry/3 (pred). . . . . . . . . . . . . . . . . . . . . 73 m bundle foreign config tool/3 (pred) . . . . . . . . . . . . . . . 73 m bundle foreign dep/4 (pred) . . . . . . . . . . . . . . . . . . . . . 73

27.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

28 Bundle fetch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

28.1 Usage and interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 28.2 Documentation on exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

add bundle origin/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 75 get bundle origin/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . 75 bundle fetch cleanup/0 (pred) . . . . . . . . . . . . . . . . . . . . . . 75 check bundle alias/3 (pred) . . . . . . . . . . . . . . . . . . . . . . . . 76 bundle fetch/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 bundle rm/1 (pred). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

28.3 Documentation on internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

default origin/2 (pred) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

28.4 Documentation on imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

29 Publish from a mono-repository . . . . . . . . . . . . . 77

29.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 29.2 Additional files for publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 29.3 Contribution from public repositories . . . . . . . . . . . . . . . . . . . . . . . 78 29.4 Merging github pull requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Library/Module Index . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Predicate Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Property Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Regular Type Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Declaration Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Global Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

1 Summary

   ciao_builder  is  a  build  au-
tomation (https://en.wikipedia.org/wiki/Build_automation) system for managing Ciao

libraries and programs. ciao_builder works on structured collections of code, dubbed as bundles.

2 Build Automation for Ciao

2 Introduction

The Ciao builder manages collections of source code, implementing the automatic configuration, build, (un)installation, packing, and cleaning of collections of Ciao modules. It offers a simplified interface with other Ciao (compiler, documentation generator, etc.) and external tools (e.g., installation of third-party software for library bindings).

This tool also offers all the necessary machinery to bootstrap the Ciao system from a reduced set of dependencies.

See the Ciao reference manual for a description of bundles, workspaces, and the basic usage of the builder tool.

4 Build Automation for Ciao

3 The standalone command-line builder

Author(s): Jose F. Morales, The Ciao Development Team.

ciao_builder is the Ciao standalone command-line builder. ciao_builder can be used to manage Ciao source code organized as bundles.

This command is available to the user in two forms: wrapped around the ciao-boot.sh (or ciao-boot.bat in Windows) scripts (see ⟨undefined⟩ [Bootstrapping the build system], page ⟨undefined⟩), or as part of the general ciao command-line tool.

3.1 Introduction to the build process

This picture shows a detailed view all the elements of the build and installation process of a bundle or collection of bundles.

         Phase 0-
            Bootstrapping the build system
         Phase 1-
            SOURCE ---(configure)--> CONFIG
         Phase 2- (needs CONFIG)
            SOURCE ---(build)--> BUILD --(install)--> INSTALLED

Above, arrows specify actions and nodes are collections of files:

SOURCE Source code

CONFIG Configuration of the source

BUILD Binaries, compiled libraries, and generated documentation (.pdf, .html, etc.)

INSTALLED Copies of BUILD that exclude temporary files (mostly caches for separate and incremental compilation).

The source distribution only contains SOURCE elements. The actions build and install create the BUILD and INSTALLED elements.

NOTE: Bootstrapping is a transparent process and its details are not needed to understand and use the build system. See ⟨undefined⟩ [Bootstrapping the build system], page ⟨undefined⟩ for more details on phase 0.

NOTE: Out-of-tree builds (where all the intermediate compiler output, including .po/.itf files are stored in the build/cache directory) are enabled by default for bundles. This can be disabled setting the environment variable CIAOCCACHE=0. Note that bootstrapping the system with CIAOCCACHE=0 is not recommended, as it will merge .po/.itf files of (potentially) incompatible compiler iterations.

3.2 Configuration and build

Configuration and build can be reverted with clean commands. The meaning of clean and distclean is based on their standard meaning (see the Makefile example

at http://www.gnu.org/software/make/manual/html_node/Complex-Makefile.html), ex-

cept for realclean that cleans both the system and the bootstrap (equivalent to distclean

and boot-clean).

The following table summarizes the actions that undo each build or install operation:

         ('undo' reverts the effect of each marked 'action')
                       ,--------+-----------+-----------.
        actions \ undo | clean  | distclean | realclean |

      .----------------+--------+-----------+-----------+
      | boot-build     |        |           |    x      |
      +----------------+--------+-----------+-----------+
      | configure      |        |     x     |    x      |
      +----------------+--------+-----------+-----------+
      | build          |   x    |     x     |    x      |
      `----------------+--------+-----------+-----------+

3.3 Installation

Different installation areas are supported. For personal installations, the installation area can overlap with the build staging area, such that no extra space is necessary.

           .............         install             ...........
           .           .---------------------------->.         .
           .           .        (generated           .         .
           .............         files such          ...........
            Build Staging Area       as binaries)      Installation Area
                .^.                                 _
                 | build                            /|
                 |                                 /
           .............          install         /
           .           .-------------------------'
           .           .         (source files
           .............          such as examples,
            Source Code           images, etc.)

The install command is undone with the uninstall command.

3.4 Bootstrapping the build system

The ciao-boot.sh (or ciao-boot.bat in Windows) command automatically bootstraps and invokes the Ciao build system. The process is described below.

Bootstrapping is the process that compiles the Ciao compiler and builder in an environment where no existing Ciao binary exists. We follow the same phase 1 and phase 2 steps above but the whole process is driven by a very simplified version written in (portable) shell-script code (since there is no running Ciao) and using the ciaoc bootstrap compiler.

The ciaoc bootstrap compiler comes in a pre-compiled bytecode form. This bytecode, together with the engine parts written in C, can be executed in most systems with a C compiler.

Once this bootstrap compiler is available, the system compiles the bootstrap ciao_builder, which drives the rest of the build and installation process.

This step is transparent to the user and separated in a different build directory (buildboot/). However, there are options to force the recompilation and cleaning of that part (see ciao-boot.sh help for more information).

4 Ciao command-line parser

Author(s): Jose F. Morales, The Ciao Development Team. Parser of builder commands (based on a generic command line parser).

4.1 Usage and interface

• Library usage:

  :- use_module(ciaobld(ciaocl_parser)).

• Exports:

− Predicates:

      parse_cmd/3, norm_underscores/2.

4.2 Documentation on exports

PREDICATE parse cmd/3:

No further documentation available for this predicate.

PREDICATE norm underscores/2:

No further documentation available for this predicate.

4.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

 lists, hiordlib.

− Packages:

 prelude, initial, condcomp, assertions, assertions/assertions_basic, isomodes,
 regtypes, dcg.

8 Build Automation for Ciao

5 Ciao command-line Help

Author(s): The Ciao Development Team, Jose F. Morales. Formatted help for the ciao and ciao-boot.sh ( ciao-boot.bat) command line tool

5.1 Usage and interface

• Library usage:

:- use_module(ciaobld(ciaocl_help)).

• Exports:

− Predicates:

   show_help/2, show_help_cmd/2.

5.2 Documentation on exports

PREDICATE show help/2:

Usage: show_help(Level,Prof)

Show help for the command line interface. Level specifies the detail level and Prof the command line profile (useful when the same command may act in different ways). − Call and exit should be compatible with:

    ciaocl_help:help_level(Level)  (ciaocl_help:help_level/1)
    Prof is an atom.  (basic_props:atm/1)

− The following properties should hold at call time: Level is currently a term which is not a free variable. (term_typing:nonvar/1) Prof is currently a term which is not a free variable. (term_typing:nonvar/1)

PREDICATE show help cmd/2:

Usage: show_help_cmd(Cmd,Prof)

Show detailed help on the specified command Cmd (shows help of the command group)

5.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

datafacts_rt, aggregates, lists, stream_utils, system.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, isomodes,
regtypes, dcg, fsyntax, datafacts.

10 Build Automation for Ciao

6 Manifest compiler

Author(s): Jose F. Morales. This module implements predicates to load, consult, and compile Manifest.pl files. A

Manifest file allows the specification of a bundle:

• dependencies to other bundles

• configuration flags (see bundle_configure)

• primitive targets (see grade_bin, grade_docs, etc.)

• nested definitions for bundle parts

• custom definitions for build commands (see builder_cmds)

NOTE: Configuration flags and nested definitions must be defined in a <bundle>.hooks.pl module.

Use make_bundlereg/4 for processing of Manifest.pl files into bundle registry entries. Bundle registries are written using fastrw so that the support code to load them is minimal. They include cheaper runtime meta-information (like dependencies, versions, path aliases, etc.).

For registered bundles, you can use ensure_load_manifest/1 and manifest_call/2 for

loading and consulting a bundle specification.

NOTE: Users should never call custom build command definitions directly with manifest_

call/2. Use builder_cmds instead.

6.1 Usage and interface

• Library usage:

:- use_module(ciaobld(manifest_compiler)).

• Exports:

− Predicates:

is_bundledir/1, locate_manifest_file/2, lookup_bundle_root/2, ensure_load_
manifest/1, manifest_call/2, manifest_current_predicate/2, split_target/3,
compose_target/3, target_is_bundle/1, make_bundlereg/4, bundle_info/1,
get_bundle_readme/2, bundle_manual_base/2, main_file_relpath/2, main_file_
path/3.

− Multifiles:

m_bundlehook_decl/3, m_bundlehook_do/3, m_third_party_name/1, m_third_
party_version/2, m_third_party_source_url/2, m_third_party_source_md5/2,
m_third_party_patch/2,  m_third_
party_build_system/2, m_third_party_option1/2, m_third_party_option2/3,
m_third_party_custom_configure/2, m_third_party_custom_build/2, m_third_
party_custom_install/2, m_bundle_config_call/2, m_bundle_config_entry/3,
m_bundle_foreign_config_tool/3, m_bundle_foreign_dep/4.

6.2 Documentation on exports

PREDICATE is bundledir/1:

Usage: is_bundledir(BundleDir)

BundleDir is the directory for a bundle (i.e., contains a Manifest.pl file

PREDICATE locate manifest file/2:

Usage: locate_manifest_file(BundleDir,ManifestFile)

Given BundleDir a bundle directory, ManifestFile is unified with the name of the manifest file

PREDICATE lookup bundle root/2:

Usage: lookup_bundle_root(File,BundleDir)

Detect the bundle root dir for the given File (a directory or normal file)

PREDICATE ensure load manifest/1:

Usage: ensure_load_manifest(Target)

Ensure that the manifest for Target is loaded (including Manifest sentences and .hooks.pl modules). The bundle must have been scanned before, so that its source directory is known.

PREDICATE manifest call/2:

Usage: manifest_call(Target,Head)

Call Target:Head, a predicate defined in a Manifest (fact, predicate in hooks, or nested predicate)

PREDICATE manifest current predicate/2:

Usage: manifest_current_predicate(Target,Head)

Head is declared in Target

PREDICATE split target/3:

No further documentation available for this predicate.

PREDICATE compose target/3:

No further documentation available for this predicate.

PREDICATE target is bundle/1:

No further documentation available for this predicate.

PREDICATE make bundlereg/4:

Usage: make_bundlereg(Bundle,BundleDir,FinalBundleDir,RegFile)

Generate a bundlereg RegFile for bundle Bundle at BundleDir, where the final bundle

directory is FinalBundleDir.

PREDICATE bundle info/1:

Usage: bundle_info(Bundle)

Show info of Bundle

PREDICATE get bundle readme/2:

No further documentation available for this predicate.

PREDICATE bundle manual base/2:

No further documentation available for this predicate.

PREDICATE main file relpath/2:

No further documentation available for this predicate.

PREDICATE main file path/3:

No further documentation available for this predicate.

6.3 Documentation on multifiles

PREDICATE m bundlehook decl/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundlehook do/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party name/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party version/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source url/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source md5/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party patch/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party build system/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option1/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option2/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom configure/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom build/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom install/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config call/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config entry/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign config tool/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign dep/4:

No further documentation available for this predicate. The predicate is multifile.

6.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

bundlehooks_holder, builder_aux, bundle_fetch.

− System library modules:

datafacts_rt, messages, pathnames, system, port_reify, bundle_paths, read,
aggregates, system_extra, version_strings, lists, terms, fastrw, stream_utils,
bundle_info, format.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes, datafacts.

16 Build Automation for Ciao

7 bundlehooks holder (library)

7.1 Usage and interface

• Library usage:

  :- use_module(ciaobld(bundlehooks_holder)).

• Exports:

− Predicates:

      do_use_module/1, do_unload/1.

7.2 Documentation on exports

PREDICATE do use module/1:

No further documentation available for this predicate.

PREDICATE do unload/1:

No further documentation available for this predicate.

7.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

  compiler.

− Packages:

  prelude, initial, condcomp, dynmod_holder.

18 Build Automation for Ciao

8 Builder commands

Author(s): Jose F. Morales. This module contains a high-level interface to the builder ( builder_run/2) and other pred-

icates to interact to the build process from .hooks.pl files ( builder_cmd/2, etc.).

8.1 Usage and interface

• Library usage:

:- use_module(ciaobld(builder_cmds)).

• Exports:

− Predicates:

builder_run/2, builder_cmd_nobndl/1, list_bundles/0, builder_cleanup/0,
builder_cmd_on_set/2, builder_cmd/2, root_target/1, target_is_workspace/1,
bundle_share_workspace/2.

− Multifiles:

cmd.comment/2, cmd.grade/2, cmd.only_global_instype/1, cmd.needs_update_
builder/1, cmd.needs_rescan/1, cmd.needs_config/1, cmd.allow_unknown_
targets/1, cmd.no_manifest_load/1, cmd.recursive/2, cmd.do_before.decl/1,
cmd.do_before/2, cmd.do.decl/1, cmd.do/2, cmd.do_after.decl/1, cmd.do_
after/2, grade.cmd/3, grade.requires/3, grade.prim_do/4, grade.prim_kind/2,
gen_pbundle_hook/3.

8.2 Documentation on exports

PREDICATE builder run/2:

No further documentation available for this predicate.

PREDICATE builder cmd nobndl/1:

No further documentation available for this predicate.

PREDICATE list bundles/0:

Usage: List all registered bundles

PREDICATE builder cleanup/0:

Usage: Cleanup the builder state

PREDICATE builder cmd on set/2:

No further documentation available for this predicate.

PREDICATE builder cmd/2:

Usage: builder_cmd(Cmd,Target)

Perform command Cmd on target Target

PREDICATE root target/1:

Usage: Target for the whole CIAOROOT workspace.

PREDICATE target is workspace/1:

No further documentation available for this predicate.

PREDICATE bundle share workspace/2:

No further documentation available for this predicate.

8.3 Documentation on multifiles

PREDICATE cmd.comment/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.grade/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.only global instype/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs update builder/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs rescan/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs config/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.allow unknown targets/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.no manifest load/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.recursive/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.cmd/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.requires/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim do/4:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim kind/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE gen pbundle hook/3:

No further documentation available for this predicate. The predicate is multifile.

8.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_targets, bundle_fetch, builder_flags, bundle_configure, ciaoc_aux,
messages_aux, install_aux, manifest_compiler, grade_holder, grade_bin, grade_
docs, grade_analyze, config_common, interactive_aux, builder_aux, third_party_
install, pbundle_generator, pbundle_gen_win32, pbundle_gen_rpm, pbundle_gen_
mac, pbundle_gen_src, pbundle_gen_bin, bundle_hash, lpdoc_aux.

− System library modules:

datafacts_rt, format, sort, aggregates, lists, pathnames, bundle_paths.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes, datafacts.

9 Binary grade

Author(s): Jose F. Morales. This

module contains command definitions for the bin grade, which builds/clean/install/uninstall binaries from sources.

9.1 Usage and interface

• Library usage:

:- use_module(ciaobld(grade_bin)).

9.2 Documentation on multifiles

PREDICATE cmd.comment/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.grade/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.only global instype/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs update builder/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs rescan/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs config/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.allow unknown targets/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.no manifest load/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.recursive/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.cmd/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.requires/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim do/4:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim kind/2:

No further documentation available for this predicate. The predicate is multifile.

9.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_cmds, manifest_compiler, builder_aux, ciaoc_aux, install_aux, messages_
aux, car_maker.

− System library modules:

bundle_paths, pathnames, lists.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes.

26 Build Automation for Ciao

10 Docs grade

Author(s): Jose F. Morales. This module contains

command definitions for the docs grade, which builds/clean/install/uninstall documentation from sources.

10.1 Usage and interface

• Library usage:

:- use_module(ciaobld(grade_docs)).

10.2 Documentation on multifiles

PREDICATE cmd.comment/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.grade/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.only global instype/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs update builder/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs rescan/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.needs config/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.allow unknown targets/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.no manifest load/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.recursive/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do before/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after.decl/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE cmd.do after/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.cmd/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.requires/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim do/4:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE grade.prim kind/2:

No further documentation available for this predicate. The predicate is multifile.

10.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_cmds, manifest_compiler, builder_aux, config_common, lpdoc_aux, install_
aux, messages_aux.

− System library modules:

terms, bundle_info.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes.

30 Build Automation for Ciao

11 Targets for builder

Author(s): Jose F. Morales. This module defines predicates to map between input targets (which can be paths to bundles,

bundle names, or paths to workspaces) and resolved target names (absolute paths to workspace or symbolic bundle names)

11.1 Usage and interface

• Library usage:

:- use_module(ciaobld(builder_targets)).

• Exports:

− Predicates:

rescan_targets/1, resolve_targets/3.

11.2 Documentation on exports

PREDICATE rescan targets/1:

Usage: rescan_targets(Targets)

(Re)scan bundles at the workspaces where targets are located − Call and exit should be compatible with:

Targets is a list of atms.  (basic_props:list/2)

− The following properties should hold at call time: Targets is currently a term which is not a free variable. (term_typing:nonvar/1)

PREDICATE resolve targets/3:

Usage: resolve_targets(Targets0,OnUnknown,Targets)

Resolve targets (which may be paths). This assumes that rescan_targets/1 has been called − Call and exit should be compatible with:

Targets0 is a list of atms.  (basic_props:list/2)
OnUnknown is any term.  (basic_props:term/1)
Targets is a list of targets.  (basic_props:list/2)

− The following properties should hold at call time: Targets0 is currently a term which is not a free variable. (term_typing:nonvar/1)

Targets is a free variable.  (term_typing:var/1)

11.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

bundle_scan, builder_aux, manifest_compiler, bundle_fetch.

− System library modules:

datafacts_rt, hiordlib, system.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes, datafacts.

12 Installation of third-party components

Author(s): Remy Haemmerle, Jose F. Morales. This module implements automatic fetch and build and installation of third-party compo-

nents, without interfering with the system installed software.

It  works  similarly  to  package  managers

like GNU stow (https://www.gnu.org/software/stow/), Homebrew (http://brew.sh/), or
GNU Guix (https://www.gnu.org/software/guix/manual/guix.html), where each package

is installed separately in its own directory and symbolic links are created to common bin/, lib/, etc. directories.

The supported build systems are:

gnu_build_system
  See http://www.gnu.org/prep/standards/standards.html#Configuration

12.1 Specification of third-party components

TODO: Document this feature

12.2 Usage and interface

• Library usage:

:- use_module(ciaobld(third_party_install)).

• Exports:

− Predicates:

third_party_path/2, clean/1, download/1, decompress_and_patch/2, checksum/1,
configure/1, build/1, installed/1, install/1, activated/1, activate/1,
deactivate/1, uninstall/1, auto_install/2.

− Multifiles:

m_bundlehook_decl/3, m_bundlehook_do/3, m_third_party_name/1, m_third_
party_version/2, m_third_party_source_url/2, m_third_party_source_md5/2,
m_third_party_patch/2,  m_third_
party_build_system/2, m_third_party_option1/2, m_third_party_option2/3,
m_third_party_custom_configure/2, m_third_party_custom_build/2, m_third_
party_custom_install/2, m_bundle_config_call/2, m_bundle_config_entry/3,
m_bundle_foreign_config_tool/3, m_bundle_foreign_dep/4.

12.3 Documentation on exports

PREDICATE third party path/2:

No further documentation available for this predicate.

PREDICATE clean/1:

No further documentation available for this predicate.

PREDICATE download/1:

No further documentation available for this predicate.

PREDICATE decompress and patch/2:

No further documentation available for this predicate.

PREDICATE checksum/1:

No further documentation available for this predicate.

PREDICATE configure/1:

No further documentation available for this predicate.

PREDICATE build/1:

No further documentation available for this predicate.

PREDICATE installed/1:

No further documentation available for this predicate.

PREDICATE install/1:

No further documentation available for this predicate.

PREDICATE activated/1:

No further documentation available for this predicate.

PREDICATE activate/1:

No further documentation available for this predicate.

PREDICATE deactivate/1:

No further documentation available for this predicate.

PREDICATE uninstall/1:

No further documentation available for this predicate.

PREDICATE auto install/2:

No further documentation available for this predicate.

12.4 Documentation on multifiles

PREDICATE m bundlehook decl/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundlehook do/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party name/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party version/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source url/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source md5/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party patch/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party build system/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option1/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option2/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom configure/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom build/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom install/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config call/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config entry/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign config tool/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign dep/4:

No further documentation available for this predicate. The predicate is multifile.

12.5 Documentation on imports

This module has the following direct dependencies: − System library modules:

aggregates, terms, lists, bundle_paths, http_get, md5sum, pathnames, process,
system.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic.

13 Installation of custom third-party components

Author(s): The Ciao Development Team. This module implements installation of third-party components using custom installers (e.g.,

manual, npm, etc.)

13.1 Usage and interface

• Library usage:

 :- use_module(ciaobld(third_party_custom)).

• Exports:

− Predicates:

    third_party_custom_install/1, third_party_custom_path/2.

− Multifiles:

    m_bundle_foreign_dep/4.

13.2 Documentation on exports

PREDICATE third party custom install/1:

No further documentation available for this predicate.

PREDICATE third party custom path/2:

No further documentation available for this predicate.

13.3 Documentation on multifiles

PREDICATE m bundle foreign dep/4:

No further documentation available for this predicate. The predicate is multifile.

13.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

messages_aux, third_party_install.

− System library modules:

aggregates, format, pathnames, system_extra, system, process, port_reify.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, basicmodes,
fsyntax, hiord.

38 Build Automation for Ciao

14 Build code using the Ciao compiler

Author(s): Jose F. Morales, The Ciao Development Team. This is a wrapper around ciaoc (and other Ciao tools) that extends the functionality of the

Ciao compiler:

• Invoke the compiler as a external processes

• Batch compilation of collection of modules

• Emulator generation and compilation

14.1 Usage and interface

• Library usage:

:- use_module(ciaobld(ciaoc_aux)).

• Exports:

− Predicates:

   invoke_boot_ciaoc/2, invoke_ciaoc/1, invoke_ciaosh_batch/1, invoke_ciaosh_
   batch/2,  promote_bootstrap/1,  build_eng_exec_header/1,  clean_
   eng_exec_header/1, create_windows_bat/6, cmd_build/1, cmd_build_copy/4,
   cmd_build_link/4, build_libs/2, runtests_dir/2, runtests_dir/3, exists_and_
   compilable/1, clean_tree/1, cachedir_prefix/2, clean_mods/1.

14.2 Documentation on exports

PREDICATE invoke boot ciaoc/2:

No further documentation available for this predicate.

PREDICATE invoke ciaoc/1:

No further documentation available for this predicate.

PREDICATE invoke ciaosh batch/1:

No further documentation available for this predicate.

PREDICATE invoke ciaosh batch/2:

No further documentation available for this predicate.

PREDICATE promote bootstrap/1:

Usage: promote_bootstrap(Eng)

Promote the current ciaoc and products of emugen as the next bootstrap compiler (ciaoc.sta and absmach code)

PREDICATE build eng exec header/1:

No further documentation available for this predicate.

PREDICATE clean eng exec header/1:

No further documentation available for this predicate.

PREDICATE create windows bat/6:

No further documentation available for this predicate.

PREDICATE cmd build/1:

No further documentation available for this predicate.

PREDICATE cmd build copy/4:

No further documentation available for this predicate.

PREDICATE cmd build link/4:

No further documentation available for this predicate.

PREDICATE build libs/2:

No further documentation available for this predicate.

PREDICATE runtests dir/2:

No further documentation available for this predicate.

PREDICATE runtests dir/3:

No further documentation available for this predicate.

PREDICATE exists and compilable/1:

No further documentation available for this predicate.

PREDICATE clean tree/1:

No further documentation available for this predicate.

PREDICATE cachedir prefix/2:

No further documentation available for this predicate.

PREDICATE clean mods/1:

No further documentation available for this predicate.

14.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

messages_aux, builder_aux, config_common, cpx_process, bundle_configure, eng_
defs, install_aux.

− System library modules:

lists, aggregates, system_extra, pathnames, bundle_paths, messages, system, terms,
stream_utils, source_tree, sort, bundle_flags, process, sh_process.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax,
hiord, dcg.

42 Build Automation for Ciao

15 Build documentation using LPdoc

Author(s): Jose F. Morales, The Ciao Development Team. This is a wrapper around lpdoc to build the documentation of a bundle. It uses lpdoc as

an external process so that no hard dependencies are introduced.

15.1 Usage and interface

• Library usage:

:- use_module(ciaobld(lpdoc_aux)).

• Exports:

− Predicates:

   invoke_lpdoc/1, build_docs_readme/3, build_docs_readme_html/3, build_doc/2,
   show_doc/3, bld_manual_path/4, inst_manual_path/4, act_manual_path/4.

15.2 Documentation on exports

PREDICATE invoke lpdoc/1:

No further documentation available for this predicate.

PREDICATE build docs readme/3:

No further documentation available for this predicate.

PREDICATE build docs readme html/3:

No further documentation available for this predicate.

PREDICATE build doc/2:

No further documentation available for this predicate.

PREDICATE show doc/3:

No further documentation available for this predicate.

PREDICATE bld manual path/4:

No further documentation available for this predicate.

PREDICATE inst manual path/4:

No further documentation available for this predicate.

PREDICATE act manual path/4:

No further documentation available for this predicate.

15.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

config_common, cpx_process, builder_aux, install_aux.

− System library modules:

system, source_tree, pathnames, bundle_paths.

− Packages:

prelude, initial, condcomp, fsyntax, hiord, assertions, assertions/assertions_
basic, regtypes, isomodes.

16 .car file maker

Author(s): Jose F. Morales, The Ciao Development Team. This module implements a minimalistic build system for the engine, which includes an in-

cremental build system for C code, some of them automatically generated from emugen. The output can be both native executables, dynamic, and/or static libraries.

See eng_defs and build_car.sh for more details.

16.1 Usage and interface

• Library usage:

:- use_module(ciaobld(car_maker)).

• Exports:

− Predicates:

   eng_build/1, eng_clean/1, bundle_flags_sh_file/1, sysconf_os/1, sysconf_
   arch/3.

16.2 Documentation on exports

PREDICATE eng build/1:

No further documentation available for this predicate.

PREDICATE eng clean/1:

No further documentation available for this predicate.

PREDICATE bundle flags sh file/1:

No further documentation available for this predicate.

PREDICATE sysconf os/1:

No further documentation available for this predicate.

PREDICATE sysconf arch/3:

No further documentation available for this predicate.

16.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

messages_aux, ciaoc_aux, eng_defs, bundle_hash, builder_aux.

− System library modules:

lists, terms, system, system_extra, pathnames, bundle_paths, sh_process, bundle_
info, version_strings.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax,
hiord, dcg.

17 Engine maker: defs and paths

Author(s): Jose F. Morales, The Ciao Development Team. This module defines engine specifications for builds. Engines are defined using the emugen

package. Engine build specifications contains parameters that affects the compiled engine: Engine options:

• cross(OS,Arch): force cross compilation to selected platform

• boot: the boot engine

• addpath(Spec): additional (symbolic) source path for locating C and header files (handy for custom engines)

• h_alias(Alias): subdirectory for headers (i.e., name used to include header for this engine

#include <ciao/...>)

17.1 Engine build directory layout

Sections at the engine build directory layout:

  hdir: C headers
  cdir: C source files
  cfgdir: sysdep config files
  objdir: sysdep compiled object files
  engdir: root directory for engine build
  exec: engine as an executable
  lib_so: engine as a C shared library
  lib_a: engine as a C static library
(for engine activation)
  objdir_anyarch: compiled object files root
  exec_anyarch: engine as an executable -- link to active architecture

NOTE: This hierarchy is assumed by other tools and code like build_car.sh. Please be careful if introducing any change.

Example: directory hierarchy at build/eng/ciaoengine/:

cfg
cfg/DARWINx86_64
cfg/DARWINx86_64/config_mk
cfg/DARWINx86_64/config_sh
cfg/DARWINx86_64/meta_sh
include
include/ciao
include/ciao/*.h
include/*.h
objs
objs/ciaoengine
objs/ciaoengine.DARWINx86_64
objs/DARWINx86_64
objs/DARWINx86_64/*.o
objs/DARWINx86_64/*.P
src
src/*.c

17.2 Usage and interface

• Library usage:

:- use_module(ciaobld(eng_defs)).

• Exports:

− Predicates:

   eng_cfg/2, eng_mainspec/2, eng_opts/2, eng_bundle/2, eng_mainmod/2, eng_
   mainbase/2, eng_srcdirs/2, emugen_code_dir/3, eng_h_alias/2, eng_path/3,
   inst_eng_path/3, active_bld_eng_path/3, active_inst_eng_path/3, active_
   eng_name/3, bld_cmake_path/3.

17.3 Documentation on exports

PREDICATE eng cfg/2:

No further documentation available for this predicate.

PREDICATE eng mainspec/2:

No further documentation available for this predicate.

PREDICATE eng opts/2:

No further documentation available for this predicate.

PREDICATE eng bundle/2:

No further documentation available for this predicate.

PREDICATE eng mainmod/2:

No further documentation available for this predicate.

PREDICATE eng mainbase/2:

No further documentation available for this predicate.

PREDICATE eng srcdirs/2:

No further documentation available for this predicate.

PREDICATE emugen code dir/3:

No further documentation available for this predicate.

PREDICATE eng h alias/2:

No further documentation available for this predicate.

PREDICATE eng path/3:

No further documentation available for this predicate.

PREDICATE inst eng path/3:

No further documentation available for this predicate.

PREDICATE active bld eng path/3:

No further documentation available for this predicate.

PREDICATE active inst eng path/3:

No further documentation available for this predicate.

PREDICATE active eng name/3:

No further documentation available for this predicate.

PREDICATE bld cmake path/3:

No further documentation available for this predicate.

17.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

config_common, install_aux.

− System library modules:

lists, aggregates, terms, pathnames, bundle_paths, bundle_flags.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax.

50 Build Automation for Ciao

18 Auxiliary Predicates for Builder

Author(s): The Ciao Development Team.

18.1 Usage and interface

• Library usage:

:- use_module(ciaobld(builder_aux)).

• Exports:

− Predicates:

   dir_to_bundle/2, lookup_workspace/3, invoke_gmake/2, invoke_ant/2, ensure_
   builddir/2,  builddir_clean/2,  wr_template/4,
   generate_version_auto/2, generate_config_auto/2, print_clauses_to_file/2,
   update_file_from_clauses/3, update_file_from_string/3, add_rpath/3, third_
   party_aux/3, update_stat_config_sh/2, remove_dir_nofail/1.

18.2 Documentation on exports

PREDICATE dir to bundle/2:

No further documentation available for this predicate.

PREDICATE lookup workspace/3:

No further documentation available for this predicate.

PREDICATE invoke gmake/2:

No further documentation available for this predicate.

PREDICATE invoke ant/2:

No further documentation available for this predicate.

PREDICATE ensure builddir/2:

No further documentation available for this predicate.

PREDICATE builddir clean/2:

No further documentation available for this predicate.

PREDICATE wr template/4:

No further documentation available for this predicate.

PREDICATE generate version auto/2:

No further documentation available for this predicate.

PREDICATE generate config auto/2:

No further documentation available for this predicate.

PREDICATE print clauses to file/2:

No further documentation available for this predicate.

PREDICATE update file from clauses/3:

No further documentation available for this predicate.

PREDICATE update file from string/3:

No further documentation available for this predicate.

PREDICATE add rpath/3:

No further documentation available for this predicate.

PREDICATE third party aux/3:

No further documentation available for this predicate.

PREDICATE update stat config sh/2:

No further documentation available for this predicate.

PREDICATE remove dir nofail/1:

No further documentation available for this predicate.

18.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

messages_aux, config_common, third_party_install, eng_defs.

− System library modules:

pathnames, bundle_flags, bundle_paths, messages, logged_process, source_tree,
system_extra, text_template, bundle_info, terms, format, system, aggregates,
write, hiordlib, stream_utils, lists, process, llists.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax,
hiord.

19 Installation

Author(s): The Ciao Development Team. This module implements basic operations for installing and uninstalling the contents of a

bundle (source and binaries).

The installation copy files from the build area to the installation area (inst_ciao_root) and (optionally and if needed) creates activation symbolic links from standard installation directories

(e.g., /usr/local/bin).

It supports stagged installations to temporary locations (see rootprefix/1).

19.1 Usage and interface

• Library usage:

:- use_module(ciaobld(install_aux)).

• Exports:

− Predicates:

perms/1, instype/1, inst_ciao_root/1, inst_bundle_path/3, inst_builddir_
path/2, inst_cmd_path/4, inst_cmd_path/4, final_ciao_root/1, final_cmd_
path/4, final_bundle_path/3, final_builddir_path/3, active_bindir/1,
active_docdir/2, active_cmd_path/3, install_bin_dirs/1, uninstall_bin_
dirs/1, install_bundlereg/1, uninstall_bundlereg/1, install_cachedir/1,
uninstall_cachedir/1, rootprefix/1, instdir_install/1, instdir_uninstall/1,
eng_active_bld/1, install_doc/3, uninstall_doc/3.

19.2 Documentation on exports

PREDICATE perms/1:

No further documentation available for this predicate.

PREDICATE instype/1:

No further documentation available for this predicate.

PREDICATE inst ciao root/1:

No further documentation available for this predicate.

PREDICATE inst bundle path/3:

No further documentation available for this predicate.

PREDICATE inst builddir path/2:

No further documentation available for this predicate.

PREDICATE inst cmd path/4:

No further documentation available for this predicate.

PREDICATE inst cmd path/4:

No further documentation available for this predicate.

PREDICATE final ciao root/1:

No further documentation available for this predicate.

PREDICATE final cmd path/4:

No further documentation available for this predicate.

PREDICATE final bundle path/3:

No further documentation available for this predicate.

PREDICATE final builddir path/3:

No further documentation available for this predicate.

PREDICATE active bindir/1:

No further documentation available for this predicate.

PREDICATE active docdir/2:

No further documentation available for this predicate.

PREDICATE active cmd path/3:

No further documentation available for this predicate.

PREDICATE install bin dirs/1:

No further documentation available for this predicate.

PREDICATE uninstall bin dirs/1:

No further documentation available for this predicate.

PREDICATE install bundlereg/1:

No further documentation available for this predicate.

PREDICATE uninstall bundlereg/1:

No further documentation available for this predicate.

PREDICATE install cachedir/1:

No further documentation available for this predicate.

PREDICATE uninstall cachedir/1:

No further documentation available for this predicate.

PREDICATE rootprefix/1:

Usage: rootprefix(DestDir)

DestDir is the prefix that is prepended to each (un)install target (useful for packaged bundle creation)

PREDICATE instdir install/1:

No further documentation available for this predicate.

PREDICATE instdir uninstall/1:

No further documentation available for this predicate.

PREDICATE eng active bld/1:

No further documentation available for this predicate.

PREDICATE install doc/3:

No further documentation available for this predicate.

PREDICATE uninstall doc/3:

No further documentation available for this predicate.

19.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_aux, config_common, manifest_compiler, ciaoc_aux, builder_flags, eng_
defs, lpdoc_aux, info_installer.

− System library modules:

pathnames, bundle_paths, messages, source_tree, system_extra, system, bundle_
flags, streams.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax,
hiord.

56 Build Automation for Ciao

20 Basic support for CMake

Author(s): Jose F. Morales. This module provides some very basic functionality to interface with the CMake

(https://cmake.org) build automation system from the Ciao

20.1 Usage and interface

• Library usage:

 :- use_module(ciaobld(cmake_aux)).

• Exports:

− Predicates:

    b_cmake/4.

20.2 Documentation on exports

PREDICATE b cmake/4:

No further documentation available for this predicate.

20.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

eng_defs.

− System library modules:

process, bundle_paths, system_extra.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, fsyntax,
hiord, dcg.

58 Build Automation for Ciao

21 Installation of info files

Author(s): The Ciao Development Team. This module defines predicates to update (register and unregister) the dir Info directory

files.

21.1 Usage and interface

• Library usage:

:- use_module(ciaobld(info_installer)).

• Exports:

− Predicates:

   dirfile_install_info/2, dirfile_uninstall_info/2.

21.2 Documentation on exports

PREDICATE dirfile install info/2:

Usage: dirfile_install_info(InfoFile,TargetDir)

Includes InfoFile in the dir file at TargetDir. If no dir file exist, a default one is created.

PREDICATE dirfile uninstall info/2:

Usage: dirfile_uninstall_info(InfoFile,TargetDir)
Removes InfoFile from the dir file at TargetDir.

21.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

pathnames, process, system.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, regtypes,
fsyntax.

60 Build Automation for Ciao

22 Register/unregister code in scripts (for bash, csh, emacs, etc.)

Author(s): Jose F. Morales, The Ciao Development Team.

22.1 Usage and interface

• Library usage:

:- use_module(ciaobld(register_in_script)).

• Exports:

− Predicates:

   register_in_script/3, unregister_from_script/2.

22.2 Documentation on exports

PREDICATE register in script/3:

Usage: register_in_script(File,CommentMark,Code)

Inserts Code in the script file File. Code is surrounded by special comments (starting with CommentMark), that allow identifying the inserted code later. If the File contained some inserted code, it is replaced.

PREDICATE unregister from script/2:

No further documentation available for this predicate.

22.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

system, system_extra, stream_utils, lists.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, regtypes,
dcg, fsyntax, basicmodes.

62 Build Automation for Ciao

23 Bundle hashing

Author(s): Jose F. Morales, The Ciao Development Team. This module defines the operations to map the whole bundle source code to shorter identifiers

(which can be precise like cryptohashes for DVCS or coarse like release date, etc.).

Note: Some functions (like Git commit number) simply ignore uncommited changes in the source tree.

23.1 Usage and interface

• Library usage:

 :- use_module(ciaobld(bundle_hash)).

• Exports:

− Predicates:

    bundle_gen_commit_info/1, bundle_commit_info/3.

23.2 Documentation on exports

PREDICATE bundle gen commit info/1:

Usage: Extract and save the commit information metadata

PREDICATE bundle commit info/3:

No further documentation available for this predicate.

23.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_flags.

− System library modules:

native_props, datafacts_rt, stream_utils, system, system_extra, terms, pathnames,
bundle_paths, bundle_info, vcs_svn, version_strings, vcs_git.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, basicmodes,
nativeprops, fsyntax, hiord, regtypes, datafacts.

64 Build Automation for Ciao

24 C header detection

24.1 Usage and interface

• Library usage:

 :- use_module(ciaobld(detcheader)).

• Exports:

− Predicates:

    detect_c_headers/1.

24.2 Documentation on exports

PREDICATE detect c headers/1:

Usage: Succeeds if all the c header files in the argument are valid. − The following properties should hold at call time:

     Arg1 is a list of filenames.  (basic_props:list/2)

24.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

lists, stream_utils, foreign_compilation, system, system_extra, process, port_
reify, c_itf_props.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, modes, dcg.

66 Build Automation for Ciao

25 Messages for the build process

25.1 Usage and interface

• Library usage:

:- use_module(ciaobld(messages_aux)).

• Exports:

− Predicates:

   cmd_message/3, dmc_message/3, normal_message/2, verbose_message/2.

25.2 Documentation on exports

PREDICATE cmd message/3:

No further documentation available for this predicate.

PREDICATE dmc message/3:

No further documentation available for this predicate.

PREDICATE normal message/2:

No further documentation available for this predicate.

PREDICATE verbose message/2:

No further documentation available for this predicate.

25.3 Documentation on imports

This module has the following direct dependencies: − Application modules:

config_common.

− System library modules:

format, lists.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, regtypes,
hiord.

68 Build Automation for Ciao

26 Auxiliary code for user interaction

Author(s): The Ciao Development Team.

26.1 Usage and interface

• Library usage:

:- use_module(ciaobld(interactive_aux)).

• Exports:

− Predicates:

ask_option_value/6, ask_yesno/1.

26.2 Documentation on exports

PREDICATE ask option value/6:

Usage:  ask_option_
value(Description,Name,ValidValues,DefaultValue,PreviousValue,Value)

Ask (interactively) for a value for variable Name. Repeat until the user provides one of the ValidValues, or chose PreviousValue if none was provided. − Call and exit should be compatible with:

Description is a string (a list of character codes). (basic_props:string/1)

Name is an atom.  (basic_props:atm/1)
ValidValues is a list of terms.  (basic_props:list/2)
DefaultValue is any term.  (basic_props:term/1)
PreviousValue is any term.  (basic_props:term/1)
Value is any term.  (basic_props:term/1)

− The following properties should hold at call time: Description is currently a term which is not a free variable. (term_

typing:nonvar/1)

Name is currently a term which is not a free variable. (term_typing:nonvar/1) ValidValues is currently a term which is not a free variable. (term_

typing:nonvar/1)

DefaultValue is currently a term which is not a free variable. (term_

typing:nonvar/1)

PreviousValue is currently a term which is not a free variable. (term_

typing:nonvar/1)
Value is a free variable.  (term_typing:var/1)

PREDICATE ask yesno/1:

No further documentation available for this predicate.

26.3 Documentation on imports

This module has the following direct dependencies: − System library modules:

lists, stream_utils.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, basicmodes,
dcg, fsyntax, hiord.

27 Bundle configuration

Author(s): The Ciao Development Team. This module computes the values of bundle configuration flags ( bundle_flags) based on

configuration parameters the configuration rules (Manifest/*.hooks.pl files).

TODO: Write documentation for the syntax and semantics of configuration rules.

The configuration process may invoke external configuration tools if required.

27.1 Usage and interface

• Library usage:

:- use_module(ciaobld(bundle_configure)).

• Exports:

− Predicates:

check_builder_update/0,  bundle_has_config/1,
bundleset_configure/2, config_set_flag/2, config_get_flag/2, config_list_
flags/1, config_describe_flag/1, set_prolog_flags_from_bundle_flags/1.

− Multifiles:

m_bundlehook_decl/3, m_bundlehook_do/3, m_third_party_name/1, m_third_
party_version/2, m_third_party_source_url/2, m_third_party_source_md5/2,
m_third_party_patch/2,  m_third_
party_build_system/2, m_third_party_option1/2, m_third_party_option2/3,
m_third_party_custom_configure/2, m_third_party_custom_build/2, m_third_
party_custom_install/2, m_bundle_config_call/2, m_bundle_config_entry/3,
m_bundle_foreign_config_tool/3, m_bundle_foreign_dep/4.

27.2 Documentation on exports

PREDICATE check builder update/0:

Usage: Detect if the running builder needs an update.

PREDICATE bundle has config/1:

No further documentation available for this predicate.

PREDICATE bundleset configure/2:

Usage: bundleset_configure(BundleSet,Flags)

Configure the bundles specified in BundleSet using their configuration rules and the input provided by Flags and/or user interaction (if interactive_config flag is specified).

PREDICATE config set flag/2:

No further documentation available for this predicate.

PREDICATE config get flag/2:

No further documentation available for this predicate.

PREDICATE config list flags/1:

No further documentation available for this predicate.

PREDICATE config describe flag/1:

No further documentation available for this predicate.

PREDICATE set prolog flags from bundle flags/1:

No further documentation available for this predicate.

27.3 Documentation on multifiles

PREDICATE m bundlehook decl/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundlehook do/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party name/1:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party version/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source url/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party source md5/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party patch/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party build system/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option1/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party option2/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom configure/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom build/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m third party custom install/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config call/2:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle config entry/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign config tool/3:

No further documentation available for this predicate. The predicate is multifile.

PREDICATE m bundle foreign dep/4:

No further documentation available for this predicate. The predicate is multifile.

27.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

builder_flags, interactive_aux, car_maker, manifest_compiler.

− System library modules:

datafacts_rt, lists, process, messages, port_reify, bundle_flags, version_
strings, system_extra, bundle_paths, system, stream_utils, aggregates, hiordlib,
bundle_info.

− Packages:

prelude, initial, condcomp, assertions, assertions/assertions_basic, basicmodes,
fsyntax, hiord, datafacts.

28 Bundle fetch

Author(s): Jose F. Morales.

This module implements support for fetching bundles and their dependencies from remote locations (e.g., the network).

The predicate bundle_fetch/2 fetches a bundle and its dependencies, as follows:

• if the bundle is in a non-top workspace, stops fetching (and do not try to fetch dependencies)

• if the bundle is missing, retreive and store it at the top workspace (see CIAOPATH environment)

• if the bundle is in the top workspace, skips fetching

• try fetch bundle dependencies

A fetched bundle is automatically marked to distinguish them from user bundles, which are manually written by the user. It is possible to fetch a user bundle, e.g., to retreive all their dependencies.

Fetched bundles can be removed with bundle_rm/1. Removing a user bundle is not allowed with bundle_rm/1 (it must be done manually).

The location and fetch protocol is automatically recognized based on bundle aliases. See bundle_src_origin/2 for translation from bundle aliases to recognized origins (e.g., ciaolang.org/foo downloads and uncompress a git archive).

28.1 Usage and interface

• Library usage:

    :- use_module(ciaobld(bundle_fetch)).

• Exports:

− Predicates:

        add_bundle_origin/2, get_bundle_origin/2, bundle_fetch_cleanup/0, check_
        bundle_alias/3, bundle_fetch/2, bundle_rm/1.

28.2 Documentation on exports

PREDICATE add bundle origin/2:

     Usage: add_bundle_origin(Bundle,Origin)

Select the origin for the given bundle name

PREDICATE get bundle origin/2:

     Usage: get_bundle_origin(Bundle,Origin)

Obtain the origin for a bundle (for fetching). Use the default origin if unknown ( default_

     origin/2).

PREDICATE bundle fetch cleanup/0:

Usage:

Cleanup the bundle fetch state

PREDICATE check bundle alias/3:

Usage: check_bundle_alias(BundleAlias,Origin,Bundle)

Given a URL-like BundleAlias, obtain its Origin term for fetch and the bundle name Name. Throws an exception if malformed and fails silently if it is not a URL-like alias. − The following properties should hold at call time:

BundleAlias is currently a term which is not a free variable. (term_

    typing:nonvar/1)
    Origin is a free variable.  (term_typing:var/1)
    Bundle is a free variable.  (term_typing:var/1)

PREDICATE bundle fetch/2:

Usage: bundle_fetch(Bundle,Fetched)

Fetch Bundle and all its dependencies. Fetched is the list of newly fetched bundles. − The following properties should hold at call time:

Bundle is currently a term which is not a free variable. (term_typing:nonvar/1)

    Fetched is a free variable.  (term_typing:var/1)

PREDICATE bundle rm/1:

No further documentation available for this predicate.

28.3 Documentation on internals

PREDICATE default origin/2:

Usage: default_origin(Bundle,Origin)

Default origin when none is specified:

     default_origin(Bundle,Origin) :-
         path_concat('github.com/ciao-lang',Bundle,Path),
         Origin=github(Path,master).

28.4 Documentation on imports

This module has the following direct dependencies: − Application modules:

bundle_scan, messages_aux, manifest_compiler.

− System library modules:

datafacts_rt, lists, terms, pathnames, process, http_get, system, system_extra,
source_tree, bundle_info, aggregates.

− Packages:

prelude, initial, condcomp, dcg, fsyntax, hiord, assertions,
assertions/assertions_basic, regtypes, isomodes, datafacts.

29 Publish from a mono-repository

Author(s): Jose F. Morales. This tool allows publishing pristine views of an annotated git mono-repository. An annotated

git repository contains NODISTRIBUTE empty files that mark directories that must not be visible in a pristine copy.

This tool is tailored for the ciao-devel mono-repository but it could be easily generalized for other repositories.

29.1 Usage

Use ciao publish list to list publishable bundles from the Ciao devel repository (either the main ciao or some bundles at bndls/). E.g.:

$ ciao publish list

Publishing code is performed by the commit and push operations. Use the help option to view other possible commmands.

Example for publishing the bundle at the current directory (when run at the Ciao root directory the special ciao bundle is selected, which contains core and builder):

$ ciao publish pull
$ ciao publish commit
<< (please review commits) >>
$ ciao publish push

A command may be followed by a target bundle name to specify a different bundle. Example for publishing ciao_emacs:

$ ciao publish pull ciao_emacs
$ ciao publish commit ciao_emacs
<< (please review commits) >>
$ ciao publish push ciao_emacs

The first time that commit is performed, it will require a first commit number. This is not needed for squash.

You can use the --all option to perform a command on all publishable bundles (see --help for more info), or use shell scripts.

Examples on all bundles:

<< Consult the status of all publishable bundles >>
$ ciao publish status --all
<< Pull all public repositories (previous to publishing) >>
$ ciao publish pull --all
<< Commit all publishable changes >>
$ ciao publish commit --all
<< Push to the public repository >>
$ ciao publish push --all

• The source is fetched from the repository (not from the checkout).

• Clones of publishing repos are kept at $HOME/REPOS-ciao-publish (with some metadata to speedup detection of unpublished commits).

29.2 Additional files for publishing

Other directories:

   ci-scripts/      Scripts for CI
   ci-status/       Scripts for checking the status of CI
   etc/ciao-download-stats.sh
                    Download statistics

29.3 Contribution from public repositories

Assume that Bob maintains the private Ciao repository and Alice wants to contribute to it. This is the typical workflow for contributing to the project preserving authorship:

• Alice: clone public Git repository (github.com/ciao-lang/ciao)

• Alice: make some changes and commit them

• Alice: format patches using git format-patch (never push them!)

       $ git format-patch HEAD^n # where n is the number of commits not in master

• Alice: send the ????-*.patch files via email to Bob

• Bob: apply back the changes in the private repository with

       $ git am < 0001-*.patch
       $ git am < 0002-*.patch
       $ ...

• Bob: check with git log that the code is pushed correctly

• Bob: do ciao publish pull, ciao publish commit, and ciao publish push

• Alice: do git pull and git rebase -i. The first command will create a merge commit. The second command will break. After some git rebase --continue it will end. If everything is fine there will be no unpushed changes to master and all new commits will be authored as Alice.

29.4 Merging github pull requests

You can follow the same steps as in the previous section, just obtaining the patches from this

custom URL https://github.com/ciao-lang/ciao/pull/NUMBER.patch.

References 79

References

(this section is empty)

80 Build Automation for Ciao Library/Module Index 81

Library/Module Index

B

builder_aux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 builder_cmds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 bundle_configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 bundle_fetch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 bundle_hash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 bundlehooks_holder . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

C

car_maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 ciaoc_aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ciaocl_help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ciaocl_parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 cmake_aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

D

detcheader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

E

eng_defs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

G

grade_bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 grade_docs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

I

info_installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 install_aux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 interactive_aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

L

lpdoc_aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

M

manifest_compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 messages_aux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

R

register_in_script . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

T

third_party_custom . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 third_party_install . . . . . . . . . . . . . . . . . . . . . . . . . . 33

82 Build Automation for Ciao Predicate Index 83

Predicate Index

A

act_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 activate/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 activated/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 active_bindir/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 active_bld_eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . . 49 active_cmd_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 active_docdir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 active_eng_name/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 active_inst_eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . 49 add_bundle_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75 add_rpath/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 ask_option_value/6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ask_yesno/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 auto_install/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

B

b_cmake/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 bld_cmake_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 bld_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 build/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 build_doc/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 build_docs_readme/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 43

build_docs_readme_html/3. . . . . . . . . . . . . . . . . . . . . 43

build_eng_exec_header/1 . . . . . . . . . . . . . . . . . . . . . . 39 build_libs/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 builddir_clean/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 builder_cleanup/0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_cmd/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 builder_cmd_nobndl/1 . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_cmd_on_set/2 . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_run/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 bundle_commit_info/3 . . . . . . . . . . . . . . . . . . . . . . . . . 63 bundle_fetch/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 bundle_fetch_cleanup/0 . . . . . . . . . . . . . . . . . . . . . . . 75 bundle_flags_sh_file/1 . . . . . . . . . . . . . . . . . . . . . . . 45

bundle_gen_commit_info/1. . . . . . . . . . . . . . . . . . . . . 63

bundle_has_config/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 71 bundle_info/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 bundle_manual_base/2 . . . . . . . . . . . . . . . . . . . . . . . . . 13 bundle_rm/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

bundle_share_workspace/2. . . . . . . . . . . . . . . . . . . . . 20

bundleset_configure/2 . . . . . . . . . . . . . . . . . . . . . . . . 71

C

cachedir_prefix/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 check_builder_update/0 . . . . . . . . . . . . . . . . . . . . . . . 71 check_bundle_alias/3 . . . . . . . . . . . . . . . . . . . . . . . . . 76 checksum/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 clean/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 clean_eng_exec_header/1 . . . . . . . . . . . . . . . . . . . . . . 40 clean_mods/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 clean_tree/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

                                                  cmd.allow_unknown_targets/1. . . . . . . . . . . 20, 23, 27

cmd.comment/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 23, 27 cmd.do.decl/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.do/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.do_after.decl/1 . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.do_after/2. . . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.do_before.decl/1 . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.do_before/2. . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd.grade/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 23, 27 cmd.needs_config/1 . . . . . . . . . . . . . . . . . . . . 20, 23, 27 cmd.needs_rescan/1 . . . . . . . . . . . . . . . . . . . . 20, 23, 27

                                                  cmd.needs_update_builder/1. . . . . . . . . . . . 20, 23, 27

cmd.no_manifest_load/1 . . . . . . . . . . . . . . . . 21, 23, 27

                                                  cmd.only_global_instype/1 . . . . . . . . . . . . . 20, 23, 27

cmd.recursive/2. . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 cmd_build/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cmd_build_copy/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cmd_build_link/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 cmd_message/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 compose_target/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 config_describe_flag/1 . . . . . . . . . . . . . . . . . . . . . . . 72 config_get_flag/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 config_list_flags/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 72 config_set_flag/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 configure/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 create_windows_bat/6 . . . . . . . . . . . . . . . . . . . . . . . . . 40

D

deactivate/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 decompress_and_patch/2 . . . . . . . . . . . . . . . . . . . . . . . 34 default_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 detect_c_headers/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 dir_to_bundle/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 dirfile_install_info/2 . . . . . . . . . . . . . . . . . . . . . . . 59

                                                  dirfile_uninstall_info/2. . . . . . . . . . . . . . . . . . . . . 59

dmc_message/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 do_unload/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 do_use_module/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 download/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

84 Build Automation for Ciao

E

emugen_code_dir/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_active_bld/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 eng_build/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 eng_bundle/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_cfg/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_clean/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 eng_h_alias/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainbase/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainmod/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainspec/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_opts/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 eng_srcdirs/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 ensure_builddir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 ensure_load_manifest/1 . . . . . . . . . . . . . . . . . . . . . . . 12 exists_and_compilable/1 . . . . . . . . . . . . . . . . . . . . . . 40

F

final_builddir_path/3 . . . . . . . . . . . . . . . . . . . . . . . . 54 final_bundle_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 54 final_ciao_root/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 final_cmd_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

G

gen_pbundle_hook/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 generate_config_auto/2 . . . . . . . . . . . . . . . . . . . . . . . 52 generate_version_auto/2 . . . . . . . . . . . . . . . . . . . . . . 52 get_bundle_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75 get_bundle_readme/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 13 grade.cmd/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 grade.prim_do/4. . . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 grade.prim_kind/2 . . . . . . . . . . . . . . . . . . . . . 21, 24, 28 grade.requires/3 . . . . . . . . . . . . . . . . . . . . . . 21, 24, 28

I

inst_builddir_path/2 . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_bundle_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_ciao_root/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_cmd_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 inst_eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 inst_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 install/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 install_bin_dirs/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 install_bundlereg/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 54 install_cachedir/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 install_doc/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 installed/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 instdir_install/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 instdir_uninstall/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 55 instype/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 invoke_ant/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke_boot_ciaoc/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaoc/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaosh_batch/1 . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaosh_batch/2 . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_gmake/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke_lpdoc/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 is_bundledir/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

L

list_bundles/0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 locate_manifest_file/2 . . . . . . . . . . . . . . . . . . . . . . . 12 lookup_bundle_root/2 . . . . . . . . . . . . . . . . . . . . . . . . . 12 lookup_workspace/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

M

m_bundle_config_call/2 . . . . . . . . . . . . . . . . 14, 36, 73

                                                  m_bundle_config_entry/3 . . . . . . . . . . . . . . . 14, 36, 73
                                                  m_bundle_foreign_config_tool/3 . . . . . . . 14, 36, 73

m_bundle_foreign_dep/4. . . . . . . . . . . . . 14, 36, 37, 73 m_bundlehook_decl/3 . . . . . . . . . . . . . . . . . . . 13, 35, 72 m_bundlehook_do/3 . . . . . . . . . . . . . . . . . . . . . 13, 35, 72

                                                  m_third_party_build_system/2 . . . . . . . . . 14, 35, 73
                                                  m_third_party_custom_build/2 . . . . . . . . . 14, 35, 73
                                                  m_third_party_custom_configure/2 . . . . . 14, 35, 73
                                                  m_third_party_custom_install/2 . . . . . . . 14, 36, 73

m_third_party_name/1 . . . . . . . . . . . . . . . . . . 13, 35, 72

                                                  m_third_party_option1/2 . . . . . . . . . . . . . . . 14, 35, 73
                                                  m_third_party_option2/3 . . . . . . . . . . . . . . . 14, 35, 73

m_third_party_patch/2 . . . . . . . . . . . . . . . . . 14, 35, 72

                                                  m_third_party_source_md5/2. . . . . . . . . . . . 14, 35, 72
                                                  m_third_party_source_url/2. . . . . . . . . . . . 13, 35, 72
                                                  m_third_party_version/2 . . . . . . . . . . . . . . . 13, 35, 72

main_file_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 main_file_relpath/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 13 make_bundlereg/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 manifest_call/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

                                                  manifest_current_predicate/2 . . . . . . . . . . . . . . . . 12

N

norm_underscores/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 normal_message/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Predicate Index 85

P

parse_cmd/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 perms/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 print_clauses_to_file/2 . . . . . . . . . . . . . . . . . . . . . . 52 promote_bootstrap/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 39

R

register_in_script/3 . . . . . . . . . . . . . . . . . . . . . . . . . 61 remove_dir_nofail/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 rescan_targets/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 resolve_targets/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 root_target/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 rootprefix/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 runtests_dir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 runtests_dir/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

S

set_prolog_flags_from_bundle_flags/1. . . . . . . . 72

show_doc/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 show_help/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 show_help_cmd/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 split_target/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 sysconf_arch/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 sysconf_os/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

T

target_is_bundle/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 target_is_workspace/1 . . . . . . . . . . . . . . . . . . . . . . . . 20 third_party_aux/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

                                                  third_party_custom_install/1 . . . . . . . . . . . . . . . . 37
                                                  third_party_custom_path/2. . . . . . . . . . . . . . . . . . . . 37

third_party_path/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

U

uninstall/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 uninstall_bin_dirs/1 . . . . . . . . . . . . . . . . . . . . . . . . . 54 uninstall_bundlereg/1 . . . . . . . . . . . . . . . . . . . . . . . . 55 uninstall_cachedir/1 . . . . . . . . . . . . . . . . . . . . . . . . . 55 uninstall_doc/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

                                                  unregister_from_script/2. . . . . . . . . . . . . . . . . . . . . 61
                                                  update_file_from_clauses/3 . . . . . . . . . . . . . . . . . . 52
                                                  update_file_from_string/3. . . . . . . . . . . . . . . . . . . . 52

update_stat_config_sh/2 . . . . . . . . . . . . . . . . . . . . . . 52

V

verbose_message/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

W

wr_template/4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

86 Build Automation for Ciao Property Index 87

Property Index

(Index is nonexistent)

88 Build Automation for Ciao Regular Type Index 89

Regular Type Index

(Index is nonexistent)

90 Build Automation for Ciao Declaration Index 91

Declaration Index

(Index is nonexistent)

92 Build Automation for Ciao Concept Index 93

Concept Index

builder, standalone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

94 Build Automation for Ciao Author Index 95

Author Index

J

Jose F. Morales …. 5, 7, 9, 11, 19, 23, 27, 31, 33, 39, 43, 45, 47, 57, 61, 63, 75, 77

R

Remy Haemmerle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

T

The Ciao Development Team. . 5, 7, 9, 37, 39, 43, 45, 47, 51, 53, 59, 61, 63, 69, 71

96 Build Automation for Ciao

Global Index 97

Global Index

This is a global index containing pointers to places where concepts, predicates, modes, properties, types, applications, authors, etc., are referred to in the text of the document.

A

act_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 activate/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 activated/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 active_bindir/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 active_bld_eng_path/3 . . . . . . . . . . . . . . . . . . . . 48, 49 active_cmd_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 active_docdir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 active_eng_name/3 . . . . . . . . . . . . . . . . . . . . . . . . . 48, 49 active_inst_eng_path/3 . . . . . . . . . . . . . . . . . . . 48, 49 add_bundle_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75 add_rpath/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51, 52 aggregates . . . . . . 9, 15, 22, 36, 37, 41, 49, 52, 74, 76 ask_option_value/6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ask_yesno/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 assertions … 7, 9, 15, 22, 25, 29, 32, 36, 37, 41, 44,

46, 49, 52, 55, 57, 59, 61, 63, 65, 67, 70, 74, 76

assertions/assertions_basic . . 7, 9, 15, 22, 25, 29,

32, 36, 37, 41, 44, 46, 49, 52, 55, 57, 59, 61, 63, 65, 67, 70, 74, 76

auto_install/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34

B

b_cmake/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 basicmodes . . . . . . . . . . . . . . . . . . . . . . 37, 61, 63, 70, 74 bld_cmake_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 49 bld_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 build/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 build_doc/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 build_docs_readme/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 43

build_docs_readme_html/3. . . . . . . . . . . . . . . . . . . . . 43

build_eng_exec_header/1 . . . . . . . . . . . . . . . . . . . . . . 39 build_libs/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 builddir_clean/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 builder, standalone . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 builder_aux …. 15, 22, 25, 29, 32, 41, 44, 46, 51, 55 builder_cleanup/0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_cmd/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 20 builder_cmd_nobndl/1 . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_cmd_on_set/2 . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_cmds . . . . . . . . . . . . . . . . . . . . . . . 11, 19, 25, 29 builder_flags . . . . . . . . . . . . . . . . . . . . . . 22, 55, 63, 74 builder_run/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 builder_targets . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 31 bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3, 5 bundle_commit_info/3 . . . . . . . . . . . . . . . . . . . . . . . . . 63 bundle_configure . . . . . . . . . . . . . . . . . . . 11, 22, 41, 71 bundle_fetch . . . . . . . . . . . . . . . . . . . . . . . 15, 22, 32, 75 bundle_fetch/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75, 76 bundle_fetch_cleanup/0 . . . . . . . . . . . . . . . . . . . . . . . 75 bundle_flags. . . . . . . . . . . . . . . . . 41, 49, 52, 55, 71, 74 bundle_flags_sh_file/1 . . . . . . . . . . . . . . . . . . . . . . . 45

bundle_gen_commit_info/1. . . . . . . . . . . . . . . . . . . . . 63

bundle_has_config/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 71 bundle_hash . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 46, 63 bundle_info . . . . . . . . . . . . . . 15, 29, 46, 52, 63, 74, 76 bundle_info/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 13 bundle_manual_base/2. . . . . . . . . . . . . . . . . . . . . . 11, 13 bundle_paths . . 15, 22, 25, 36, 41, 44, 46, 49, 52, 55,

57, 63, 74 bundle_rm/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75, 76 bundle_scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 76

bundle_share_workspace/2 . . . . . . . . . . . . . . . . . 19, 20

bundle_src_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75 bundlehooks_holder . . . . . . . . . . . . . . . . . . . . . . . . 15, 17 bundleset_configure/2 . . . . . . . . . . . . . . . . . . . . . . . . 71

C

c_itf_props. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 cachedir_prefix/2 . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 car_maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 45, 74 check_builder_update/0 . . . . . . . . . . . . . . . . . . . . . . . 71 check_bundle_alias/3. . . . . . . . . . . . . . . . . . . . . . 75, 76 checksum/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 ciao . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 9 ciao-boot.bat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ciao-boot.sh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ciao_builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 5, 6 ciaoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ciaoc_aux . . . . . . . . . . . . . . . . . . . . . . . 22, 25, 39, 46, 55 ciaocl_help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ciaocl_parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 clean/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

clean_eng_exec_header/1 . . . . . . . . . . . . . . . . . . 39, 40

clean_mods/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 clean_tree/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 cmake_aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

cmd.allow_unknown_targets/1 . . . . . . . 19, 20, 23, 27

cmd.comment/2 . . . . . . . . . . . . . . . . . . . . . . 19, 20, 23, 27 cmd.do.decl/1 . . . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.do/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.do_after.decl/1 . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.do_after/2 . . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.do_before.decl/1 . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.do_before/2 . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd.grade/2 . . . . . . . . . . . . . . . . . . . . . . . . 19, 20, 23, 27 cmd.needs_config/1 . . . . . . . . . . . . . . . . . 19, 20, 23, 27 cmd.needs_rescan/1 . . . . . . . . . . . . . . . . . 19, 20, 23, 27

cmd.needs_update_builder/1 . . . . . . . . 19, 20, 23, 27

cmd.no_manifest_load/1. . . . . . . . . . . . . 19, 21, 23, 27

cmd.only_global_instype/1 . . . . . . . . . 19, 20, 23, 27

cmd.recursive/2 . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 cmd_build/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 cmd_build_copy/4 . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 cmd_build_link/4 . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 cmd_message/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 compose_target/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 condcomp . . 7, 9, 15, 17, 22, 25, 29, 32, 36, 37, 41, 44,

46, 49, 52, 55, 57, 59, 61, 63, 65, 67, 70, 74, 76 config_common. . . . . . . . . 22, 29, 41, 44, 49, 52, 55, 67 config_describe_flag/1 . . . . . . . . . . . . . . . . . . . 71, 72 config_get_flag/2 . . . . . . . . . . . . . . . . . . . . . . . . . 71, 72 config_list_flags/1. . . . . . . . . . . . . . . . . . . . . . . 71, 72 config_set_flag/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 configure/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 cpx_process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 44 create_windows_bat/6. . . . . . . . . . . . . . . . . . . . . . 39, 40

D

datafacts . . . . . . . . . . . . . . . . . 9, 15, 22, 32, 63, 74, 76 datafacts_rt . . . . . . . . . . . . . . 9, 15, 22, 32, 63, 74, 76 dcg . . . . . . . . . . . . . . . . . . 7, 9, 41, 46, 57, 61, 65, 70, 76 deactivate/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 decompress_and_patch/2 . . . . . . . . . . . . . . . . . . . 33, 34 default_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75, 76 detcheader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 detect_c_headers/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 dir_to_bundle/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 dirfile_install_info/2 . . . . . . . . . . . . . . . . . . . . . . . 59

dirfile_uninstall_info/2. . . . . . . . . . . . . . . . . . . . . 59

dmc_message/3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 do_unload/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 do_use_module/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 download/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 dynmod_holder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

E

emugen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 45, 47 emugen_code_dir/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_active_bld/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55 eng_build/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 eng_bundle/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_cfg/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_clean/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 eng_defs . . . . . . . . . . . . . . . . . 41, 45, 46, 47, 52, 55, 57 eng_h_alias/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainbase/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainmod/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_mainspec/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_opts/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 49 eng_srcdirs/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 ensure_builddir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 ensure_load_manifest/1 . . . . . . . . . . . . . . . . . . . 11, 12

                                                  exists_and_compilable/1 . . . . . . . . . . . . . . . . . . 39, 40

F

fastrw. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 15 final_builddir_path/3 . . . . . . . . . . . . . . . . . . . . 53, 54 final_bundle_path/3. . . . . . . . . . . . . . . . . . . . . . . 53, 54 final_ciao_root/1 . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 final_cmd_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 foreign_compilation . . . . . . . . . . . . . . . . . . . . . . . . . . 65 format . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 22, 37, 52, 67 fsyntax . . 9, 15, 22, 25, 29, 32, 37, 41, 44, 46, 49, 52,

55, 57, 59, 61, 63, 70, 74, 76

G

gen_pbundle_hook/3 . . . . . . . . . . . . . . . . . . . . . . . . 19, 21 generate_config_auto/2 . . . . . . . . . . . . . . . . . . . 51, 52

                                                  generate_version_auto/2 . . . . . . . . . . . . . . . . . . 51, 52

get_bundle_origin/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 75 get_bundle_readme/2. . . . . . . . . . . . . . . . . . . . . . . 11, 13 grade.cmd/3 . . . . . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 grade.prim_do/4 . . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 grade.prim_kind/2 . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 grade.requires/3 . . . . . . . . . . . . . . . . . . . 19, 21, 24, 28 grade_analyze. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 grade_bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 22, 23 grade_docs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 22, 27 grade_holder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

H

hiord … 15, 22, 25, 29, 32, 37, 41, 44, 46, 52, 55, 57,

63, 67, 70, 74, 76 hiordlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 32, 52, 74 http_get. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 76

I

info_installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55, 59 initial … 7, 9, 15, 17, 22, 25, 29, 32, 36, 37, 41, 44,

46, 49, 52, 55, 57, 59, 61, 63, 65, 67, 70, 74, 76 inst_builddir_path/2 . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_bundle_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_ciao_root/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 inst_cmd_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 inst_eng_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 49 inst_manual_path/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 install/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 install_aux . . . . . . . . . . . . . . 22, 25, 29, 41, 44, 49, 53 install_bin_dirs/1 . . . . . . . . . . . . . . . . . . . . . . . . 53, 54 install_bundlereg/1. . . . . . . . . . . . . . . . . . . . . . . 53, 54 install_cachedir/1 . . . . . . . . . . . . . . . . . . . . . . . . 53, 55 install_doc/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55 installed/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 instdir_install/1 . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55 instdir_uninstall/1. . . . . . . . . . . . . . . . . . . . . . . 53, 55 instype/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 interactive_aux. . . . . . . . . . . . . . . . . . . . . . . . 22, 69, 74 invoke_ant/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke_boot_ciaoc/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaoc/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaosh_batch/1 . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_ciaosh_batch/2 . . . . . . . . . . . . . . . . . . . . . . . . 39 invoke_gmake/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 invoke_lpdoc/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 is_bundledir/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 isomodes . . . . . . . . . . . . . 7, 9, 15, 22, 25, 29, 32, 44, 76

J

Jose F. Morales … 5, 7, 9, 11, 19, 23, 27, 31, 33, 39, 43, 45, 47, 57, 61, 63, 75, 77

L

list_bundles/0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 lists . . 7, 9, 15, 22, 25, 36, 41, 46, 49, 52, 61, 65, 67,

70, 74, 76 llists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 locate_manifest_file/2 . . . . . . . . . . . . . . . . . . . 11, 12 logged_process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 lookup_bundle_root/2. . . . . . . . . . . . . . . . . . . . . . 11, 12 lookup_workspace/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 lpdoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 lpdoc_aux. . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 29, 43, 55

M

m_bundle_config_call/2 . . . . . . 11, 14, 33, 36, 71, 73

m_bundle_config_entry/3. . . . . 11, 14, 33, 36, 71, 73
m_bundle_foreign_config_tool/3 . . . 11, 14, 33, 36,

71, 73

m_bundle_foreign_dep/4 . . 11, 14, 33, 36, 37, 71, 73

m_bundlehook_decl/3 . . . . . . . . . 11, 13, 33, 35, 71, 72 m_bundlehook_do/3 . . . . . . . . . . . 11, 13, 33, 35, 71, 72

m_third_party_build_system/2 . . 11, 14, 33, 35, 71,

73

m_third_party_custom_build/2 . . 11, 14, 33, 35, 71,

73

m_third_party_custom_configure/2. . . . . 11, 14, 33,

35, 71, 73

m_third_party_custom_install/2 . . . 11, 14, 33, 36,

71, 73 m_third_party_name/1 . . . . . . . . 11, 13, 33, 35, 71, 72

m_third_party_option1/2. . . . . 11, 14, 33, 35, 71, 73
m_third_party_option2/3. . . . . 11, 14, 33, 35, 71, 73

m_third_party_patch/2 . . . . . . . 11, 14, 33, 35, 71, 72

m_third_party_source_md5/2. . 11, 14, 33, 35, 71, 72
m_third_party_source_url/2. . 11, 13, 33, 35, 71, 72
m_third_party_version/2. . . . . 11, 13, 33, 35, 71, 72

main_file_path/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 13 main_file_relpath/2. . . . . . . . . . . . . . . . . . . . . . . 11, 13 make_bundlereg/4 . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 manifest_call/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 manifest_compiler …. 11, 22, 25, 29, 32, 55, 74, 76

manifest_current_predicate/2 . . . . . . . . . . . . . 11, 12

md5sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 messages . . . . . . . . . . . . . . . . . . . . . . . . 15, 41, 52, 55, 74 messages_aux . . . . . . 22, 25, 29, 37, 41, 46, 52, 67, 76 modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

N

native_props. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 nativeprops. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 norm_underscores/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 normal_message/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

P

parse_cmd/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 path alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 pathnames . . 15, 22, 25, 36, 37, 41, 44, 46, 49, 52, 55,

59, 63, 76 pbundle_gen_bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 pbundle_gen_mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 pbundle_gen_rpm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 pbundle_gen_src . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 pbundle_gen_win32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 pbundle_generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 perms/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 port_reify. . . . . . . . . . . . . . . . . . . . . . . . . . 15, 37, 65, 74 prelude … 7, 9, 15, 17, 22, 25, 29, 32, 36, 37, 41, 44,

46, 49, 52, 55, 57, 59, 61, 63, 65, 67, 70, 74, 76

print_clauses_to_file/2 . . . . . . . . . . . . . . . . . . 51, 52

process . . . . . . . . . . . . 36, 37, 41, 52, 57, 59, 65, 74, 76 promote_bootstrap/1 . . . . . . . . . . . . . . . . . . . . . . . . . . 39

R

read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 register_in_script . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 register_in_script/3 . . . . . . . . . . . . . . . . . . . . . . . . . 61 regtypes . . 7, 9, 15, 22, 25, 29, 32, 44, 59, 61, 63, 67,

76 remove_dir_nofail/1. . . . . . . . . . . . . . . . . . . . . . . 51, 52 Remy Haemmerle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 rescan_targets/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 resolve_targets/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 root_target/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 20 rootprefix/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55 runtests_dir/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40 runtests_dir/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 40

S

set_prolog_flags_from_bundle_flags/1 . . . . 71, 72

sh_process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 46 show_doc/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 show_help/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 show_help_cmd/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 41 source_tree . . . . . . . . . . . . . . . . . . . . . 41, 44, 52, 55, 76 split_target/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 stream_utils . . . . . . . 9, 15, 41, 52, 61, 63, 65, 70, 74 streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 sysconf_arch/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 sysconf_os/1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 system … 9, 15, 32, 36, 37, 41, 44, 46, 52, 55, 59, 61,

63, 65, 74, 76 system_extra . . 15, 37, 41, 46, 52, 55, 57, 61, 63, 65,

74, 76

T

target_is_bundle/1 . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 target_is_workspace/1 . . . . . . . . . . . . . . . . . . . . 19, 20 terms . . . . . . . . . . . . . . 15, 29, 36, 41, 46, 49, 52, 63, 76 text_template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

The Ciao Development Team . . . 5, 7, 9, 37, 39, 43, 45,

47, 51, 53, 59, 61, 63, 69, 71 third_party_aux/3 . . . . . . . . . . . . . . . . . . . . . . . . . 51, 52 third_party_custom . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

third_party_custom_install/1 . . . . . . . . . . . . . . . . 37
third_party_custom_path/2. . . . . . . . . . . . . . . . . . . . 37

third_party_install . . . . . . . . . . . . . . . . 22, 33, 37, 52 third_party_path/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

U

uninstall/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 uninstall_bin_dirs/1. . . . . . . . . . . . . . . . . . . . . . 53, 54 uninstall_bundlereg/1 . . . . . . . . . . . . . . . . . . . . 53, 55 uninstall_cachedir/1. . . . . . . . . . . . . . . . . . . . . . 53, 55 uninstall_doc/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55

unregister_from_script/2. . . . . . . . . . . . . . . . . . . . . 61
update_file_from_clauses/3 . . . . . . . . . . . . . . . 51, 52
update_file_from_string/3 . . . . . . . . . . . . . . . . 51, 52
update_stat_config_sh/2 . . . . . . . . . . . . . . . . . . 51, 52

V

vcs_git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 vcs_svn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 verbose_message/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 version_strings . . . . . . . . . . . . . . . . . . . . 15, 46, 63, 74

W

workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 wr_template/4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

102 Build Automation for Ciao