82 lines · 3.3 KB · Text
RawDownload
DESCRIPTION Credo calls scripts to create files, after doing the same for files onwhich they depend.  Libdo copies templates of those scripts, and listsof default dependencies, from a library, and customizes them for agiven target.  Libenv composes shell variable settings from a varietyof aspects. Credo is a set of small shell scripts, which stores its data (such asa checksum for each file on which a target depends) in flat files inthe current directory.  This creates clutter, but also an interfacefor higher-level tools. Credo is currently only implemented in Inferno’s sh: I really like itsshell language (especially apply, <{}, and quoting rules); and Infernoexposes all the shell variables of a process as files in /env, whichmakes writing dependencies on them much simpler.  I expect that itwill need a port to Linux for wider adoption, either as shell scriptsor a program.  LITERATE TESTS Literate programs to test credo and describe its features.Credo’s test suite also serves as its expository documentation. Credo example: Hello, world!  A view over credo.  Generate and run abuild system.  So, what’s going on here?  What are all these otherfiles in my source code directory, how can I ignore them, and how do Iget rid of them?https://github.com/catenate/credo/blob/master/test/1/credo/hello/hello.test Set the shell variable crecho to echo, to print instead of execute keyproduction commands in do scripts.https://github.com/catenate/credo/blob/master/test/1/credo/hello/crecho.test Crelay walks the dependency graph from a file to targets which depend on it.https://github.com/catenate/credo/blob/master/test/1/credo/hello/relay.test  ARTICLES A new credo: no more complex makefiles.http://groups.google.com/group/redo-list/browse_thread/thread/643db9316b09c47a How credo handles manual changes to generated files; default do scripts.http://groups.google.com/group/redo-list/browse_thread/thread/e048dd2a3f473822/ Credo example: from lex and c source to cygwin executable, across directories.http://swtools.wordpress.com/2011/07/03/credo-example-from-lex-and-c-source-to-cygwin-executable-across-directories/ One change since the example is new addenv/rmenv commands, tomanage target dependencies on environment variables.  For example,these commands can replace the echo commands in the example: 	addenv default srcdir ../src/	addenv default cpp cpp-3	addenv default cppflags -I../src/	addenv default cc gcc-3  RELATED WORK Credo is an adaptation of the unpublished build tool redo,proposed and sketched by D.J. Bernstein.http://cr.yp.to/redo.html Avery Pennarun implemented redo in python.https://github.com/apenwarr/redo In 2006 and 2007 Alan Grosskurth gave a talk¹ and wrote a master’sthesis² on purely top-down software rebuilding.  The thesis implementsredo in sh-bourne and compares it to make. ¹ http://grosskurth.ca/talks/2006.04.10/slides.pdf ² http://grosskurth.ca/papers/mmath-thesis.pdf Credo’s most significant differences from redo is that there are noredo-* commands in the do scripts; credo has a new set of shellscript commands to create, examine, and maintain the build system(for higher-level tools to automatically generate a build system);and credo exposes all of its record-keeping in flat files in thecurrent directory.