[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] cleanup build system a bit.



Hi all,

the patch in attachment if the first big pass to cleanup the entire build
system on CVS HEAD as of 24-Apr-2007. Sorry if it's a bz2 file but otherwise it
won't pass the mailing list filtering limit of 100KB and it's one of those
patches that either you take in full or not (except a bunch of small details).

 193 files changed, 1927 insertions(+), 8223 deletions(-)

This patch does:

 - centralize all the configure scripts into the top level one:
   - all configurable options are now available as such with details and help.
   - no more need to run configure N times for each subdir.
   - better autodetection for kernel_src.
   - add tons of other options such as alternate CC or LD_FLAGS override and
     more.
   - allow override of release_major and release_minor.
 - centralize all the different subproject/make/* files in the top level:
   - expanded and integraded all the defines.mk.input into a clean one.
 - centralize copyright.cf file at the toplevel. config/copyright.cf
   and make it a default include directory for all projects so that there
   is no more need to specify it manually.
 - centralize scripts at the top level as appropriate.
 - remove all the projects/configure projects/make/* projects/scripts/*
 - change top level Makefile includes:
   - implement several targets and add appropriate dependencies.
   - split between kernel and userland targets.
 - changes to all subprojects Makefiles:
   - make use of the top level defines.mk.
   - make use of centralized scripts.
   - make use of all configurable options.
   - cleanup TARGET= OBJS= CFLAGS= LDFLAGS= usage and make it consistent
     across the entire tree. (see below for a more detailed explanation)
   - fix make targets for libs.
   - call linker with proper options and fix static/dynamic linking.
   - attempt to use the use the same targets all over for consistency.
   - fix install/uninstall targets.
   - convert some toplevel project Makefile to be just "passtrough".
     This is no different from what it was before except it takes 4 lines
     instead of N duplicates lines. It will change in the next patch set
     to integrate proper dependency calculation. See for example
     cman/Makefile.
 - probably more...

The way in which I rewrote the Makefile follows some kind of template.
For (or what i believe to be) better readability, I used this schema:

TARGET= foo
OBJS= foo.o

CFLAGS += -Ddefinition
CFLAGS += compiler options such as -O2 or -Wall
CFLAGS += system includes or configured includes
CFLAGS += includes coming from inside the project for ex: -I../include

similar order applies to LDFLAGS.

While at it i also fixed these 4 details:

cluster/fence/agents/xvm/vm_states.c: fix include path for openais.

cluster/gfs/gfs_quota/layout.c: fix include path to be consistent with the
                                rest of the tree.
(see: https://www.redhat.com/archives/cluster-devel/2007-April/msg00115.html)

cluster/group/lib/libgroup.c: add missing include. Spotted after fixing the
                              Makefile and triggered by adding -Wall.

cluster/rgmanager/src/clulib/clulog.c: remove unrequired include.

TODO:

somebody from RH should please verify that config/copyright.cf is correct.
The oldest RH copyright is from 2004 and i updated from 2006 to 2007.

top level configure:
        - fix hardencoded use of xml2-config and make it optional

top level makefile:
        - verify latest_tags: srpms: tarballs: targets.
        I have personally never used them and for what i can tell they haven't
        been in used for ages.

verify rgmanager/src/Makefile for check: target

verify rgmanager/src/daemon/Makefile dtest and rg_test OBJ list.
        - see OBJS2 and OBJS3 build of resrule*.o.

While I did pay an awful amount of attention not to break anything, there is
a chance that something might have gone wrong.

Please double check and apply.

Thanks
Fabio

-- 
I'm going to make him an offer he can't refuse.

Attachment: cleanup_configure.bz2
Description: application/bzip

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]