Skip to content

Commit

Permalink
BUILD: Change the autotools setup to a non-recursive automake
Browse files Browse the repository at this point in the history
Instead of recursive automake with subdirs, we're now using non-
recursive automake using (recursive) includes.

This should speed up parallel builds because these aren't blocked
across subdirectory boundaries anymore now. Dependency change
detection and therefore subsequent partial builds are also faster with
a non-recursive setup.

On the downside, the gitstamp hackery had to be reorganized, because
build order can't be predicted anymore now.

CMake building is currently still broken as well.
  • Loading branch information
DrMcCoy committed Oct 16, 2016
1 parent 344aa2c commit 3d57d6e
Show file tree
Hide file tree
Showing 22 changed files with 894 additions and 822 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Makefile.am.cmake
/dists/debian/xoreos-tools/

# git versioning stamp
/gitstamp/gitstamp
/src/version/gitstamp

# Unix binaries
/src/gff2xml
Expand Down
123 changes: 58 additions & 65 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,71 +17,64 @@
# You should have received a copy of the GNU General Public License
# along with xoreos. If not, see <http://www.gnu.org/licenses/>.

# Top-level automake build recipe.

include $(top_srcdir)/Makefile.common
# The main "controller" automake recipe. We're setting up all our
# global build variables here, then recursively include all other
# build recipe, creating a flat non-recursive automake setup.

# Use the m4 directory for extra m4 autoconf scripts.
ACLOCAL_AMFLAGS = -I m4 --install
# Build objects in the same directory as their source files.
AUTOMAKE_OPTIONS = subdir-objects

# Empty element to make the source lists easier editable.
EMPTY =

# Initialize the global lists.

noinst_HEADERS =
noinst_LTLIBRARIES =

bin_PROGRAMS =

CLEANFILES =

EXTRA_DIST =
dist_doc_DATA =
dist_man1_MANS =

# Library compile flags

LIBSF_XOREOS = $(XOREOSTOOLS_CFLAGS)
LIBSF_GENERAL = $(ZLIB_CFLAGS) $(XML2_CFLAGS)

LIBSF = $(LIBSF_XOREOS) $(LIBSF_GENERAL)

# Library linking flags

LIBSL_XOREOS = $(XOREOSTOOLS_LIBS)
LIBSL_GENERAL = $(LTLIBICONV) $(ZLIB_LIBS) $(XML2_LIBS)

LIBSL = $(LIBSL_XOREOS) $(LIBSL_GENERAL)

# Other compiler flags

FLAGS_DIR = -I$(srcdir)
FLAGS_DEBUG = $(GGDB)
FLAGS_STD = $(STD)
FLAGS_OPT = $(LTO) $(NATIVE)
FLAGS_WARN = $(WARN) $(WERROR)

FLAGS = $(FLAGS_DIR) $(FLAGS_DEBUG) $(FLAGS_STD) \
$(FLAGS_OPT) $(FLAGS_WARN)

# Putting it all together...

AM_CXXFLAGS = $(FLAGS) $(LIBSF)
AM_LDFLAGS = $(FLAGS_OPT)
LDADD = $(LIBSL)
LIBS =

# Now include the top-level recipe file and through it, all the
# other build recipes.

EXTRA_DIST = \
autogen.sh \
BUILDDEP.md \
dists/arch/PKGBUILD \
dists/debian/changelog \
dists/debian/compat \
dists/debian/control \
dists/debian/copyright \
dists/debian/rules \
dists/debian/xoreos-tools.lintian-overrides \
dists/debian/source/format \
dists/fedora/build-from-git.sh \
dists/fedora/xoreos-tools.spec \
.uncrustifyrc \
CMakeLists.txt \
cmake/CMakeAM.cmake \
cmake/FindIconv.cmake \
cmake/SetCheckCompilerFlag.cmake \
cmake/toolchain/i686-windows-mingw.cmake \
cmake/toolchain/x86_64-windows-mingw.cmake \
$(EMPTY)

dist_doc_DATA = \
COPYING \
COPYING.GPLv2 \
AUTHORS \
ChangeLog \
NEWS.md \
TODO \
README.md \
CONTRIBUTING.md \
CODE_OF_CONDUCT.md \
$(EMPTY)

dist_man1_MANS = \
man/cbgt2tga.1 \
man/cdpth2tga.1 \
man/convert2da.1 \
man/fixpremiumgff.1 \
man/desmall.1 \
man/gff2xml.1 \
man/nbfs2tga.1 \
man/ncgr2tga.1 \
man/tlk2xml.1 \
man/ssf2xml.1 \
man/xml2tlk.1 \
man/xml2ssf.1 \
man/unerf.1 \
man/unherf.1 \
man/unkeybif.1 \
man/unnds.1 \
man/unnsbtx.1 \
man/unrim.1 \
man/xoreostex2tga.1 \
man/ncsdis.1 \
$(EMPTY)

SUBDIRS = \
utf8cpp \
gitstamp \
src \
$(EMPTY)
include rules.mk
56 changes: 0 additions & 56 deletions Makefile.common

This file was deleted.

9 changes: 0 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,6 @@ esac;
AC_SUBST(XOREOSTOOLS_CFLAGS)
AC_SUBST(XOREOSTOOLS_LIBS)

AC_CONFIG_FILES([utf8cpp/Makefile])
AC_CONFIG_FILES([gitstamp/Makefile])
AC_CONFIG_FILES([src/version/Makefile])
AC_CONFIG_FILES([src/common/Makefile])
AC_CONFIG_FILES([src/aurora/Makefile])
AC_CONFIG_FILES([src/nwscript/Makefile])
AC_CONFIG_FILES([src/xml/Makefile])
AC_CONFIG_FILES([src/images/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([Makefile])

AC_OUTPUT
42 changes: 42 additions & 0 deletions dists/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# xoreos - A reimplementation of BioWare's Aurora engine
#
# xoreos is the legal property of its developers, whose names
# can be found in the AUTHORS file distributed with this source
# distribution.
#
# xoreos is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# xoreos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with xoreos. If not, see <http://www.gnu.org/licenses/>.

# Our distribution files.

# Arch Linux
EXTRA_DIST += \
dists/arch/PKGBUILD \
$(EMPTY)

# Debian
EXTRA_DIST += \
dists/debian/changelog \
dists/debian/compat \
dists/debian/control \
dists/debian/copyright \
dists/debian/rules \
dists/debian/xoreos-tools.lintian-overrides \
dists/debian/source/format \
$(EMPTY)

# Fedora
EXTRA_DIST += \
dists/fedora/build-from-git.sh \
dists/fedora/xoreos-tools.spec \
$(EMPTY)
42 changes: 0 additions & 42 deletions gitstamp/Makefile.am

This file was deleted.

43 changes: 43 additions & 0 deletions man/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# xoreos - A reimplementation of BioWare's Aurora engine
#
# xoreos is the legal property of its developers, whose names
# can be found in the AUTHORS file distributed with this source
# distribution.
#
# xoreos is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# xoreos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with xoreos. If not, see <http://www.gnu.org/licenses/>.

# Man pages.

dist_man1_MANS += \
man/cbgt2tga.1 \
man/cdpth2tga.1 \
man/convert2da.1 \
man/fixpremiumgff.1 \
man/desmall.1 \
man/gff2xml.1 \
man/nbfs2tga.1 \
man/ncgr2tga.1 \
man/tlk2xml.1 \
man/ssf2xml.1 \
man/xml2tlk.1 \
man/xml2ssf.1 \
man/unerf.1 \
man/unherf.1 \
man/unkeybif.1 \
man/unnds.1 \
man/unnsbtx.1 \
man/unrim.1 \
man/xoreostex2tga.1 \
man/ncsdis.1 \
$(EMPTY)

0 comments on commit 3d57d6e

Please sign in to comment.