getting rid of mkproto.sh from Samba3

tridge at samba.org tridge at samba.org
Mon Jun 4 22:06:22 GMT 2007


Volker,

 > Just FYI: I'm scared of the Samba 4 build system, so it
 > would take a bit to persuade me. The Samba 3 Makefile is a
 > huge mess, but you have a chance. In Samba 4, no way to
 > figure out anything if something goes wrong.

You don't need to use the Samba4 build system to have separate
includes for generated prototypes. Just have a target in Makefile.in
for each subsys_proto.h you want. It is a couple of Makefile lines per
subsystem.

 > And, I would *like* to keep our includes.h. It is a
 > nightmare in Samba 4 to pick all necessary includes, and
 > this will fill very quickly with obsolete includes if you
 > change something.

See the script/minimal_includes.h script, which works out which
include files can be removed. So you run:

  script/minimal_includes.pl

and it tells you things like this:

 Processing common/ctdb_recover.c (with 709 lines)
   common/ctdb_recover.c: might be able to remove #include "lib/events/events.h"
   common/ctdb_recover.c: might be able to remove #include "lib/tdb/include/tdb.h"
   common/ctdb_recover.c: might be able to remove #include "system/wait.h"
   common/ctdb_recover.c: might be able to remove #include "lib/util/dlinklist.h"

As for the 'nightmare' to pick the right includes, I think you will
find it is not so hard, and it is essential if you want to get rid of
the problems raised in this thread. With a single includes.h you won't
get the incremental builds for example.

Cheers, Tridge


More information about the samba-technical mailing list