On Thu, Apr 22, 2004 at 12:32:24AM +1000, Peter Moulder wrote:
Advantages:
Can depend on things from other directories. E.g. some files in display/ depend on helper/sp-marshal.h having been built, and various */*-test programs depend on libraries in other directories (previously hacked with a `check-recursive: all-recursive' dependency in src/Makefile.am).
Compilation is expected to be faster:
Fewer invocations of automake and make.
Better parallelization is possible with make -j / make -l (e.g.
when using distcc).
However, making CPPFLAGS per-target means much longer generated Makefile content. I haven't yet done timing tests (underway).
Disadvantages:
All files mentioned in the makefile fragments need to specify their directory. E.g. if blah/Makefile.am used to contain
libblah_a_SOURCES = \ foo.cpp foo.h
then blah/Makefile_insert will now contain
blah_libblah_a_SOURCES = \ blah/foo.cpp \
blah/foo.h
+ Only partial support for typing `make whatever' from inside src/blah/ directories.
+ Small amount of extra clutter: an extra makefile per subdirectory of src (or lose all support for `make whatever' from inside subdirectories of src); and src has both Makefile.am and Makefile_insert.
+ Makefile_insert scheme will be unfamiliar to most new developers.
+ Easier to have problems due to variables in one Makefile_insert having an effect on other parts. automake detects the most common errors (two variables with the same name).
+ Looks like we'll want to remove support for automake1.6 if we go to non-recursive makefiles. However, automake1.7 has been around since about 2002-09-25, and automake1.8 is already available.
(Problems with automake1.6: problem if we have two .cpp files of same name in different directories. Appears not to handle blah_libblah_a_CPPFLAGS properly.)
Any other advantages/disadvantages?
Checks to be done before switching:
`make install' creates same directory tree.
- Done. Some differences in the inkscape/inkview executable files, all other files bytewise-identical.
`make check' works.
- Done. Works. Hmm, haven't checked that all expected checks are getting run.
`make check' works immediately after `make clean'.
- Not yet checked.
`make distcheck' works.
- Not yet checked.
+ Test with automake1.7, 1.8. Probably just testing `make && make check'.
- automake1.6 seems not to work well enough (see above).
+ Check that warnings/errors are parsed ok by xemacs21. (Other editors are likely to be ok iff xemacs21 has no problem.)
+ Try gdb, to check that it has no problem with filenames.
Any other checks to be done?
pjrm.