2018-11-16 03:13:33 -05:00
|
|
|
# Is redo compatible with autoconf?
|
|
|
|
|
|
2019-03-05 23:33:11 -05:00
|
|
|
Yes. You don't have to do anything special, other than making sure you
|
|
|
|
|
`redo-ifchange config.h` (where `config.h` is generated by autoconf) in
|
|
|
|
|
whatever redo script you use to compile your object files. This
|
|
|
|
|
is about the same as what you would have to do with make.
|
2018-11-16 03:13:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Is redo compatible with automake?
|
|
|
|
|
|
2019-03-05 23:33:11 -05:00
|
|
|
Not exactly; there is no point in generating Makefiles if you aren't going
|
|
|
|
|
to use make. However, we now include a similar project,
|
|
|
|
|
[redoconf](/cookbook/redoconf-simple/), which provides a lot of the same
|
|
|
|
|
features in a redo project that automake provides for a make project.
|
2018-11-16 03:13:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Is redo compatible with make?
|
|
|
|
|
|
|
|
|
|
Yes. If you have an existing Makefile (for example, in one of your
|
|
|
|
|
subprojects), you can just call make from a .do script to build that
|
|
|
|
|
subproject.
|
|
|
|
|
|
|
|
|
|
In a file called myproject.stamp.do:
|
|
|
|
|
|
|
|
|
|
redo-ifchange $(find myproject -name '*.[ch]')
|
|
|
|
|
make -C myproject all
|
|
|
|
|
|
|
|
|
|
So, to amend our answer to the previous question, you *can* use
|
2019-03-05 23:33:11 -05:00
|
|
|
automake-generated Makefiles as part of your hybrid redo/make-based project.
|
2018-11-16 03:13:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Is redo -j compatible with make -j?
|
|
|
|
|
|
|
|
|
|
Yes! redo implements the same jobserver protocol as GNU make, which means
|
|
|
|
|
that redo running under make -j, or make running under redo -j, will do the
|
|
|
|
|
right thing. Thus, it's safe to mix-and-match redo and make in a recursive
|
|
|
|
|
build system.
|
|
|
|
|
|
|
|
|
|
Just make sure you declare your dependencies correctly;
|
|
|
|
|
redo won't know all the specific dependencies included in
|
|
|
|
|
your Makefile, and make won't know your redo dependencies,
|
|
|
|
|
of course.
|
|
|
|
|
|
|
|
|
|
One way of cheating is to just have your make.do script
|
|
|
|
|
depend on *all* the source files of a subproject, like
|
|
|
|
|
this:
|
|
|
|
|
|
|
|
|
|
make -C subproject all
|
|
|
|
|
find subproject -name '*.[ch]' | xargs redo-ifchange
|
|
|
|
|
|
|
|
|
|
Now if any of the .c or .h files in subproject are changed,
|
|
|
|
|
your make.do will run, which calls into the subproject to
|
|
|
|
|
rebuild anything that might be needed. Worst case, if the
|
|
|
|
|
dependencies are too generous, we end up calling 'make all'
|
|
|
|
|
more often than necessary. But 'make all' probably runs
|
|
|
|
|
pretty fast when there's nothing to do, so that's not so
|
|
|
|
|
bad.
|