ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Fabricate: the better "make". Finds dependencies automatically for any language

(1/4) > >>

berwyn:
fabricate is a build tool that finds dependencies automatically for any language. It's small and just works. No hidden stuff behind your back. It was inspired by Bill McCloskey's "make" replacement, memoize, but fabricate works on Windows as well as Linux.

Features

*     Never have to list dependencies.
*     Never have to specify cleanup rules.
*     The tool is a single Python file.
*     It uses MD5 (not timestamps) to check inputs and outputs.
*     You can learn it all in about 10 minutes.
*     You can still read your build scripts 3 months later.
Show me an example!


--- Code: Python ---from fabricate import * sources = ['program', 'util'] def build():    compile()    link() def compile():    for source in sources:        run('gcc -c ' + source + '.c') def link():    objects = ' '.join(s + '.o' for s in sources)    run('gcc -o program ' + objects) def clean():    autoclean() main()
Continued on google code ...

mouser:
syntax looks nice.
would be interesting to read a comparison of the various make replacements.

jgpaiva:
That looks interesting..
But is there any way for it to parallelize the build? (like 'make -j 4' runs 4 concurrent processes?)

berwyn:
No, there is currently no way to parallelize the build.  There was quite a discussion on fabricate's google group on the subject, and I believe a reasonable solution was proposed.  You could ask there to see how far it got.

jgpaiva:
Oh, that's sort of a killer for me, it makes a big difference to compile using 5 threads in a quadcore :)
But I really like the syntax of fabricate. I went through hell to write a makefile with multiple targets and build directories for my final project, I bet it'd been easier with fabricate!

Navigation

[0] Message Index

[#] Next page

Go to full version