Opened 11 years ago

Closed 11 years ago

#703 closed discussion (fixed)

using a non-recursive Makefile

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.9
Component: build Version: trunk
Keywords: Cc:


I'd like to change the build system to use one non-recursive Makefile rather than 10 (or whatever number it is) Makefiles. The reason is two-fold: 1) One can have dependencies between things in different directories and it will actually trigger a make rule if necessary. See e.g. our hack for doxygen that we did to get around this weakness with a recursive Makefile 2) When building in parallel (make -j) one is wasting a lot of time in for $(SUBDIRS) do make... i.e. one subdir is traversed at the time. For example, currently everything in yat is compiled and linked before looking into test directory, but there is nothing that stops us from compiling test programs before libyat has be created.

There are two downsides that I can see: 1) The Makefile gets rather large which could in theory create problems for Make 2) As there is no Makefile in subdirs one can no longer 'cd yat/utility && make'.

One could solve 2) partially by hand-craft Makefiles that - at least for 'make all' - that in, for example, yat/utility does 'cd ../.. && make yat/utility/'.

If no objections I will squeeze this in before yat 0.9.

Change History (4)

comment:1 Changed 11 years ago by Peter

Status: newassigned

comment:2 Changed 11 years ago by Peter

(In [2739]) refs #703 using a non-recursive Makefile. Old are kept but rather than being source for sub-Makefiles they are included into topdir This implies Make rules must be modified to work from topdir. A temporary code snippet will remove old Makefiles and Makefile.ins at configure time. This code will be removed in a week or so and is mainly there for autobuilds and prepare for future sub-Makefiles (that will have a all: rule in sub-directories.

comment:3 Changed 11 years ago by Peter

(In [2740]) refs #703. remove cleanup code in (only needed in configure)

comment:4 Changed 11 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [2749]) add small convenience Makefiles in subdirs. closes #703

Note: See TracTickets for help on using tickets.