aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-06-17 15:40:16 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-06-17 15:40:16 +0200
commit5cc4daf4d51c4f17a824bd8a3ce04257e865f02c (patch)
treecb006cf813ab9c9dbe0ccb334e7537ca661226ef
parent15409bae5ffdfce4ef17c4ccf14c8cd4c1b8f37e (diff)
downloadsciteco-5cc4daf4d51c4f17a824bd8a3ce04257e865f02c.tar.gz
improved build speed by refining the rules for building Scintilla
* Scintilla was built as a .PHONY target, so we trigger its build process always when we depend on scintilla.a. The problem was that a real file (scintilla.a) was declared .PHONY which meant that it was always considered updated by Make. This triggered a relink of everything depending on scintilla.a. Always. When doing a bootstrap build, this would always result in rebuilding the symbols-*.cpp files, etc... * Now the Scintilla build process will always be triggered, but scintilla.a is handled like an ordinary target. When we depend on scintilla.a our recipe will only be executed if the recursive make for Scintilla actually did update scintilla.a
-rw-r--r--scintilla.am23
1 files changed, 16 insertions, 7 deletions
diff --git a/scintilla.am b/scintilla.am
index 0398cce..94877b2 100644
--- a/scintilla.am
+++ b/scintilla.am
@@ -1,10 +1,6 @@
# Scintilla/Scinterm are cloned as submodules
# of this repository, so we may give a rule
# for building scintilla.a here.
-# It is built as a phony target since we do not
-# know its dependencies.
-# If it is up to date, the additional recursive
-# Make call does not hurt.
if INTERFACE_GTK
SCINTILLA_MAKE_DIR = @SCINTILLA_PATH@/gtk
@@ -12,11 +8,25 @@ else
SCINTILLA_MAKE_DIR = @SCINTERM_PATH@
endif
-.PHONY: @SCINTILLA_PATH@/bin/scintilla.a
-@SCINTILLA_PATH@/bin/scintilla.a :
+# Build as phony target - we do not know
+# scintilla.a's dependencies.
+# If it's up to date, the additional recursive
+# make call does not hurt.
+# NOTE: We can pass the (cross-)compiler to
+# Scintilla's build process, but no CFLAGS :-(
+.PHONY: make-scintilla
+make-scintilla:
$(MAKE) -C $(SCINTILLA_MAKE_DIR) \
CXX=@CXX@ AR=@AR@
+# scintilla.a itself is not phony.
+# This avoids unnecessary relinking if it is
+# up to date.
+# Also note the ; which defines this recipe as
+# empty.
+@SCINTILLA_PATH@/bin/scintilla.a : make-scintilla;
+
+.PHONY: clean-local-scintilla
clean-local-scintilla:
$(MAKE) -C $(SCINTILLA_MAKE_DIR) clean
@@ -24,4 +34,3 @@ clean-local-scintilla:
# target allows us to add more custom rules to the
# including Automake file
clean-local: clean-local-scintilla
-.PHONY: clean-local-scintilla