Skip to content

Commit

Permalink
build: bootstrap overhaul
Browse files Browse the repository at this point in the history
Put an end to the constant autoreconfs when switching branches. Use make to
determine when bootstrapping for xbmc and subprojects needs to happen
(hint: rarely).

bootstrapping can now be done in parallel, but I didn't obseve much (any?)
speed increase.

Also allows for easier skipping of reconfigures for minor/cosmetic configure.in
changes.

This should be transparent to users, other than the fact that it's much faster.

Same build procedure as always: ./bootstrap && ./configure && make
  • Loading branch information
Cory Fields committed Sep 20, 2012
1 parent c31aca2 commit d24d30a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 32 deletions.
9 changes: 2 additions & 7 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include bootstrap.mk

AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@

EC_DIRS= \
Expand Down Expand Up @@ -280,13 +282,6 @@ Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
@echo "done"

config.status: configure
@echo "Build system configuration is stale."
@echo "Please (re)run configure."
@test -n "$$XBMC_IGNORE_STALE"

configure: configure.in
@echo 'configure is outdated, regenerating...'
@./bootstrap

# skin textures
ifeq (@USE_TEXTUREPACKER@,1)
Expand Down
26 changes: 1 addition & 25 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,26 +1,2 @@
#!/bin/sh

set -e

autoreconf -vif
autoreconf -vif lib/libid3tag/libid3tag
autoreconf -vif xbmc/screensavers/rsxs-0.9
autoreconf -vif xbmc/visualizations/Goom/goom2k4-0
autoreconf -vif lib/libapetag
autoreconf -vif lib/cpluff
# order matters with libdvd and friends
[ -d lib/libdvd/libdvdcss ] && \
autoreconf -vif lib/libdvd/libdvdcss
autoreconf -vif lib/libdvd/libdvdread
autoreconf -vif lib/libdvd/libdvdnav
autoreconf -vif lib/gtest

if [ -f pvr-addons/Makefile.am ]; then
autoreconf -vif pvr-addons
fi

# Clean the generated files
find . -depth -type d -name "autom4te.cache" -exec rm -rf {} \;

echo "Please (re)run configure..."

BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk
39 changes: 39 additions & 0 deletions bootstrap.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
BOOTSTRAP_SUBDIRS += configure.in
BOOTSTRAP_SUBDIRS += lib/libid3tag/libid3tag/configure.ac
BOOTSTRAP_SUBDIRS += xbmc/screensavers/rsxs-0.9/configure.ac
BOOTSTRAP_SUBDIRS += xbmc/visualizations/Goom/goom2k4-0/configure.in
BOOTSTRAP_SUBDIRS += lib/libapetag/configure.in
BOOTSTRAP_SUBDIRS += lib/cpluff/configure.ac
BOOTSTRAP_SUBDIRS += lib/gtest/configure.ac

ifneq ($(wildcard lib/libdvd/libdvdcss/configure.ac),)
BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdcss/configure.ac
DVD_CSS=lib/libdvd/libdvdcss/configure
endif
BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdread/configure.ac
BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdnav/configure.ac

ifneq ($(wildcard pvr-addons/Makefile.am),)
BOOTSTRAP_SUBDIRS += pvr-addons/configure.ac
endif

BOOTSTRAP_TARGETS=$(basename $(BOOTSTRAP_SUBDIRS))
all: $(BOOTSTRAP_TARGETS)

#preserve order for libdvd. dvdcss (if present) -> dvdread -> dvdnav.
lib/libdvd/libdvdread/configure: $(DVD_CSS)
lib/libdvd/libdvdnav/configure: lib/libdvd/libdvdread/configure

%: %.ac
autoreconf -vif $(@D)
-@rm -rf $(@D)/autom4te.cache

%: %.in
autoreconf -vif $(@D)
-@rm -rf $(@D)/autom4te.cache

configure: configure.in
autoreconf -vif $(@D)
-@rm -rf $(@D)/autom4te.cache
@test -n "$$BOOTSTRAP_STANDALONE" || ( echo "Configuration is stale. You should almost certainly reconfigure" && false )

0 comments on commit d24d30a

Please sign in to comment.