summaryrefslogblamecommitdiffstats
path: root/Documentation/howto-build-sys.txt
blob: 1e774360921178cb82816b08533b61b6d35ef335 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12




                                                         
                                                                            





                                            


                                                                                 

















                                                                               


















                                                                               



                                                                                



                                                                              
util-linux build system
=======================

 - all util-linux specific autoconf macros use UL_ prefix

 - utils in Makefile.am files are enabled/disabled according to BUILD_<NAME>
   conditions (AM_CONDITIONAL), for example:

	if BUILD_HWCLOCK
	...
	endif

 - "if BUILD_<NAME>" blocks are never nested within another "if BUILD_<NAME>",
   all dependencies have to be resolved in configure.ac (see UL_REQUIRES_BUILD())

 - all BUILD_<NAME> in configure.am are always based on build_<name> variables,
   for example:

	AM_CONDITIONAL([BUILD_HWCLOCK], test "x$build_hwclock" = xyes)

   the $build_<name> should be available in whole configure script

 - AC_ARG_ENABLE() status is always stored in $enable_<name> variable, possible
   setting:

	"check" - util/feature is optional, if any subcomponent (function, lib,
                  ...) is missing a warning is printed and the util/feature is
                  disabled

	"yes"	- util/feature is required, if any subcomponent (function, lib,
                  ...) is missing an error is printed and ./configure aborted

	"no"	- the util/feature is unwanted


 - some basic scenarios for the ./configure script are defined in the
   tools/config-gen.d/ directory. If you want to use these predefined scenarios
   then call

	./tools/config-gen [<scenario> ...]

   for example

	./tools/config-gen all selinux

   will build all utils with enabled selinux support. You can also define some
   CFLAGS, for example:

	CFLAGS=$(rpm --eval '%optflags') ./tools/config-gen all

   will use the default distro flags.

   WARNING: config-gen is not designed for end-user or downstream distributions!
            It's for development purpose only. All end-users and downstream have
            to use standard ./configure script only.

 - the tools/config-gen script is also used for build system regression tests,
   the test is not enabled by default, you have to use

	tests/run.sh build-sys --force