All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] cleanup build system a bit.
@ 2007-04-24 12:56 Fabio Massimo Di Nitto
  2007-04-24 13:34 ` Fabio Massimo Di Nitto
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Fabio Massimo Di Nitto @ 2007-04-24 12:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup_configure.bz2
Type: application/x-bzip
Size: 32594 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070424/b42b5aa8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 890 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070424/b42b5aa8/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-04-27 13:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24 12:56 [Cluster-devel] [PATCH] cleanup build system a bit Fabio Massimo Di Nitto
2007-04-24 13:34 ` Fabio Massimo Di Nitto
2007-04-25 18:05   ` Lon Hohberger
2007-04-25 18:29     ` Fabio Massimo Di Nitto
2007-04-25 21:13 ` Chris Feist
2007-04-26  3:17   ` Fabio Massimo Di Nitto
2007-04-27 12:52     ` Robert Peterson
2007-04-27 13:15       ` Fabio Massimo Di Nitto
2007-04-26 16:55 ` Fabio Massimo Di Nitto
2007-04-27  9:24   ` Fabio Massimo Di Nitto
2007-04-27  9:28     ` [Cluster-devel] [PATCH 001/008] Fix configure help typo Fabio Massimo Di Nitto
2007-04-27  9:29     ` [Cluster-devel] [PATCH 002/008] Fabio Massimo Di Nitto
2007-04-27  9:30     ` [Cluster-devel] [PATCH 003/008] Fix --release_* check Fabio Massimo Di Nitto
2007-04-27  9:32     ` [Cluster-devel] [PATCH 004/008] gnbd_export: convert harcoded DEFAULT_GETUID to build flag Fabio Massimo Di Nitto
2007-04-27  9:33     ` [Cluster-devel] [PATCH 005/008] Fix userland: target depends Fabio Massimo Di Nitto
2007-04-27  9:34     ` [Cluster-devel] [PATCH 006/008] Fix make all target in passtrough Makefiles and make them more consistent Fabio Massimo Di Nitto
2007-04-27  9:35     ` [Cluster-devel] [PATCH 007/008] Readd -Werror to rgmanager dropped by mistake in the big cleanup Fabio Massimo Di Nitto
2007-04-27  9:36     ` [Cluster-devel] [PATCH 008/008] Readd SHAREDIR define to rgmanager/src/daemons/Makefile Fabio Massimo Di Nitto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.