Independence from (g)make

Michael Matz matz at kde.org
Wed Apr 17 17:17:44 BST 2002


Hi,

On Wed, 17 Apr 2002, Adriaan de Groot wrote:

> The shell-commands used in Makefile.common are *huge* and complicated.

Of course this will not change by moving them to other files (except the
final ";\" and the $$'s, but a coloring editor does wonders).

> Some variables need to be set and passed on through a number of shell
> commands, there are complicated statements, and some perl code as well.
> I'd like to move those shell commands to separate shell scripts in admin/

I'm not that sure I want to have 10 more files in admin/.  Probably you
can put them all into one script (POSIX knows shell functions!), and
delegate the work depending on an argument.  This OTOH is something I
would like.

> For example, the cvs target has a shell command that is 96 lines long.

Incorrect.  It has _multiple_ shell commands, the longest (the second last
one) being 27 lines, but unnecessarily so, it can be broken up into 11
smaller statements, the longest being 7 lines.  The longest shell command
is the one command in 'cvs-clean', which contains a 74 line string.  Just
to get the numbers straight ;-)

> The shell-command for the cvs target in Makefile.common could then be:
>
> 	MAKE=$(MAKE) $(SHELL) admin/cvs.sh

With the above in mind, this would become
  $(SHELL) admin/whatever.sh cvs

> With that done, very little is needed to make the whole KDE build system
> work with BSD make: a configure check to output the correct include
> directive in Makefiles,

You mean for depfiles, right?  Which automake version are you using?
automake 2.5x supports GNU and BSD make already.

> What does -core-devel think? Is making the KDE build system
> make-agnostic a worthy goal?

Yes, I think so.  But factoring out the shell code into one real shell
script is worthy also for other reasons.  That said, I'm not sure how long
we can maintain GNU make independence in the future, but we'll try.


Ciao,
Michael.





More information about the kde-core-devel mailing list