Independence from (g)make

Adriaan de Groot adridg at cs.kun.nl
Wed Apr 17 21:49:21 BST 2002


On Wednesday 17 April 2002 19:16, Stephan Kulow wrote:
> On Mittwoch, 17. April 2002 17:23, Adriaan de Groot wrote:
> > make (gmake);  while it is possible to install and use gmake, some of us
> > would prefer to use the original BSD make. There's several steps involved
...
> > work with BSD make: a configure check to output the correct include
> > directive in Makefiles, (Lauri already has one) and some fixes to
> Hmm, what are the correct include directives? The cvs.sh thing is no big
> problem to me. But I'd like to see patches first.

automake 1.5 does this (checking style of include), perhaps earlier versions 
do too.

There are two files attached: one is a patch for kdebase ; the other is a 
tarfile containing the files admin/cvs.sh and admin/Makefile.common.

- cvs.sh contains most of the shell commands that were in Makefile.common.

- a boatload of stuff from admin/Makefile.common moves to cvs.sh and is 
replaced by calls to cvs.sh with a suitable parameter.

The patch does the following:

- Adds additional targets configure.in, subdirs ... to the bottom of 
Makefile.am. This is needed for BSD make, which doesn't consider ./subdirs 
the same target as subdirs; gmake complains about a circular dependency but 
does work because it identifies the two.

- Adds a very subtle change to am_edit to make the build system build all the 
mocs first in a subdirectory. The reason for this is that gmake was (perhaps 
with the aid of the .P files) finding that the .moc needed to be created 
before compiling the .cpp files, but BSD make wasn't. Moving the meta_unload 
file forwards in the list of dependencies makes it compile earlier, forcing 
the creation of the mocs.

I've just built most of base and libs with both BSD make and GNU make on a 
FreeBSD system and encountered no weirdness. Well, just the following: some 
of the Makefile.am's have typical GNU make extensions in them, like

VAR = bla \
	foo # not really \
	blurfl

where gmake sees that as a continued line, and BSD make doesn't.

Please comment - except about things like "it should have been written in 
scheme" or "you've forgotten to optimize away recursive calls to make in 
cvs.sh" - and I'll continue to fiddle with the build system here and commit 
when I get some go-ahead.

[ade]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-make.diff
Type: text/x-diff
Size: 1371 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020417/2f687933/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-make.tar.gz
Type: application/x-tgz
Size: 4828 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020417/2f687933/attachment.bin>


More information about the kde-core-devel mailing list