From cdb58cdfd2976bae55218eda2a10c355f2a1693a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= <52813+xyproto@users.noreply.github.com> Date: Thu, 27 Feb 2020 11:44:29 +0100 Subject: [PATCH] Build: Use ccache if it's available (#1315) --- Documentation/BuildInstructions.md | 2 -- Makefile | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index 2e50800ee62..c1ca06c96e5 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -54,8 +54,6 @@ Once you've built the toolchain, go into the `Kernel/` directory, then run **./makeall.sh**, and if nothing breaks too much, take it for a spin by using **./run**. -You can vastly reduce the build time of successive rebuilds of Serenity by installing `ccache` and `export`ing ```PRE_CXX=ccache``` - Bare curious users may even consider sourcing suitable hardware to [install Serenity on a physical PC.](https://github.com/SerenityOS/serenity/blob/master/INSTALL.md) Later on, when you `git pull` to get the latest changes, there's no need to rebuild the toolchain. You can simply rerun **./makeall.sh** in the `Kernel/` directory and you'll be good to **./run** again. diff --git a/Makefile b/Makefile index fa134665b8f..f59dd7517d9 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ SUBDIRS += \ Games \ Demos +ifneq (, $(shell which ccache)) + export PRE_CXX=ccache +endif + include Makefile.subdir all: subdirs