README revision 493
d1d38b5e9e4ca0810cc364e9aca7a1a8577776e6JucaBluesThis is documentation of the Makefile system used in this tree.
d1d38b5e9e4ca0810cc364e9aca7a1a8577776e6JucaBluesGeneral Overview:
d1d38b5e9e4ca0810cc364e9aca7a1a8577776e6JucaBlues-----------------
d5c4ddf4e43797503e5a5629cdbab74e834bc549JucaBluesThis tree builds dozens of open source modules that are each released
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesseparately and delivered as source in seperate tarballs. These modules
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesare organized in subdirectories based on the X.Org module list, though
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmodules from other sources are included as appropriate. For instance,
7fcaa5a74fb9115a7110b16473821458f39afaa5Alex Valavanisthe application xterm is built in open-src/app/xterm, while the fontconfig
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesIn this tree, the term "module" is used for a specific set of source built
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesgenerally from a single tarball from upstream, such as xterm or fontconfig.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesThe directories grouping these together are referred to as "module type"
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesdirectories - app, lib, font, etc. Each module is thus found in a
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluessubdirectory of the form open-src/<module type>/<module> . Various flags
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluescan be set at either the individual module level or for all modules of a
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesFor each module, at build time the tarball is unpacked, patches applied for
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluespost-release bug fixes or customizations, and then the build is run.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesTo allow building both 32-bit and 64-bit versions in the same build,
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesthis all happens in subdirectories named build_32 & build_64 in each
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmodules' directory. Since those subdirectories are competely recreatable
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesfrom the source tarball and patches, rebuilding the tree or running make clean
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluessimply removes them entirely and recreates them.
14d74a6e5a2787d4c05a9a487e3d050c4247fce8Alex ValavanisYou should be able to run make commands in any module directory or
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmodule-type directory, though since most of the intermodule dependencies
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesare not declared, many modules will break unless you've done a full-tree
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesbuild at some point to populate the proto area with the bits needed.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues=============================================================================
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesMake targets you can build in each module:
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues------------------------------------------
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesFor most of these you can append _32 or _64 to do just the 32-bit or 64-bit
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesversions of the targets, while the version listed here repeats for all build
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluestypes set in the BUILD_TYPES variable. These are defined in the
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesopen-src/common/Makefile.inc file, though open-src/<module type>/Makefile.inc
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesmay add additional rules needed for modules of that type.
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Completely removes build_* directories.
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Creates build_* directories by unpacking sources from tarball
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues and applying patches.
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesmake configure
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Runs GNU autoconf script or similar configuration steps if
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues needed, including autoreconf or delibtoolize if variables are set.
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues (Runs make source first if needed.)
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Compile the software into the binaries that get installed.
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues (Runs make configure first if needed.)
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Install files into the proto area where make_release_packages
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues will pull them from to make packages and where other parts of
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues the build will use them. (Runs make build first if needed.)
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesmake all (or just "make" with no arguments)
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues equivalent to make build for most modules
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues same as make all, but with compiler optimization flags changed
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues to "-g". (Note that if you haven't done a make clean first,
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues doesn't force a recompile, so running make debug in a directory
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues you already built non-debug may not actually build debug versions.)
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmake debug-install
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues same as make install, but with compiler optimization flags changed
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues to "-g". (See warning on make debug about doing a make clean first.)
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmake download
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues If open-src/tarballs does not contain the tarball needed for this
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues module, download it from $(SOURCE_URL). (See "Building from git"
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues section below if MODULE_VERSION=git.)
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBluesmake regen-patches
332c67c87b4074ca4414f3d84349f5d7f9dffd95JucaBlues Create a directory new/ containing patches generated against the
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues current tarball. Useful when updating to a new version and patches
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues still apply, but you want to get rid of warnings about patch fuzz
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues and line offsets.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmake git-update
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues See "Building from git" section below.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues=============================================================================
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesMake targets you can build in parent directories:
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues-------------------------------------------------
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesIn the top-level open-src directory, or any of the module type directories,
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesyou can run these make commands to run the appropriate targets for all modules
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesin that directory. The Makefiles at each level all include the same rules
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesfrom open-src/common/Makefile.subdirs to define these.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make all in all subdirectories.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make clean in all subdirectories.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make clean in all subdirectories, then make all in all subdirs.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make install in all subdirectories.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBluesmake download
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make download in all subdirectories.
ef8951e23bbe332bc38842a832281ecf8b00d78eJucaBlues Run make source in all subdirectories.
14d74a6e5a2787d4c05a9a487e3d050c4247fce8Alex Valavanismake git-update
14d74a6e5a2787d4c05a9a487e3d050c4247fce8Alex Valavanis Run make git-update in all subdirectories.
d5c4ddf4e43797503e5a5629cdbab74e834bc549JucaBluesmake debug-build
man page conventions to, via the open-src/common/suntouch-manpages.pl
- Additional flags to pass to open-src/common/suntouch-manpages.pl, such as
- Names of pkgconfig .pc or .pc.in files in the module, which will be
unnecessary Requires.privates lines from.
- Makefile targets/rules that the default_* rules list as dependencies
running configure, to regenerate autoconf/automake/libtool created
open-src/common/delibtoolize.pl to remove libtool calls from Makefiles
libtool/compiler etc. Used by default_build & default_install rules.
Makefile.inc is included to prevent the default from being set. For
SOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
Default: $(DEFAULT_COMPILER) setting in common/Makefile.init,
Default: $(X11_DIR) (aka /usr/X11).
- Name of tarball file under open-src/tarballs directory for this module.
Default: $(SOURCE_DIRNAME).tar.bz2
- For X.Org sources, what directory the source tarball & git repo is in
on freedesktop.org - usually the same as the module type directory in
the binaries built (32 and/or 64), but may be set to any string if other
- Makefile targets/rules to run for "make source", "make configure",
for use by include statements in package copyright.add files, where
Variables that can be set in the Makefile.inc for each module type:
open-src/<module_type>/Makefile.inc - they have the same meanings and uses
directory for the module type in X.Org's source trees.
open-src/common/Makefile.init defines $MACH to be either sparc or i386
on x86/x64, you can do:
Variables you may want to customize for your site/tree:
XORG_RELEASES_URL & SF_DOWNLOADS_URL (set in open-src/common/Makefile.init)
- urls for X.Org & sourceforge mirrors to download tarballs from
FDO_GIT_URL (set in open-src/common/Makefile.init)
- url for git repositories hosted on freedesktop.org, including
X.Org, Mesa, pixman, etc. - defaults to anonymous git over http, can
Some tools to ease development are available in the util/build-tools
find-build-errors - looks for a log/buildit-XW file (or another file you
a X.org release still in development, you can choose to to check out a
- Setting up proper parallel make rules so that multi-core/cpu
makefiles - you can't bringover the tree and just cd open-src/xserver/xorg
dependencies will probably take a while - getting them done for xserver/xorg
distribute, and/or sell copies of the Software, and to permit persons