[Freeipa-devel] [PATCHES][SSSD] Convert SSSD build system to Automake
Sumit Bose
sbose at redhat.com
Thu May 14 12:24:03 UTC 2009
Stephen Gallagher schrieb:
>
> 2) Change the syntax to:
> make CFLAGS="-g -Wall -Wextra"
> (The variable substitution needs to follow the command in order to be
> treated as a substitution in the Makefile)
>
great, please consider the following patch to avoid to add the flags twice.
diff --git a/server/Makefile.am b/server/Makefile.am
index 822c8c2..d8fdc6d 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -95,7 +95,7 @@ AM_CPPFLAGS = -Wall \
-DSHADOW_UTILS_PATH=\"$(SHADOW_UTILS_PATH)\" \
-DSSSD_INTROSPECT_PATH=\"$(dbusinstropectdir)\" \
-DSSSD_CONF_DIR=\"$(sssdconfdir)\" \
- -DUSE_MMAP=1 $(CFLAGS)
+ -DUSE_MMAP=1
SSSD_DEBUG_OBJ = \
util/debug.c
> 3) As far as storing the .o files in the top level directory, this is
> just how automake is doing it internally. However, one of the distinct
> advantages to automake is the availability of parallel builds. E.g.
> create a directory called x86_64, then run ../configure from that
> directory. It will generate symlinks for the source files and headers,
> etc. and then you can perform the build there. Cleanup is as simple as
> rm -Rf x86_64.
>
> In order to have them build individually from the subdirectories, I'd
> need to set up a recursive automake to generate static libraries in each
> of the directories, which is something I intentionally avoided, because
> most of those object files need to be linked into the shared objects
> such as the plugins. Linking static libraries into a shared object is
> non-portable (and throws a noisy warning if you do it)
>
yes, I like this build directory feature. I have tried the following
patch which at least keeps the .o and .lo files together with the .c files.
diff --git a/server/configure.ac b/server/configure.ac
index b533385..abec03b 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -17,7 +17,8 @@ AC_CONFIG_AUX_DIR([build])
AC_LIBREPLACE_ALL_CHECKS
-AM_INIT_AUTOMAKE([-Wall foreign])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
bye,
Sumit
More information about the Freeipa-devel
mailing list