summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-10-01 09:25:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-10-01 09:25:19 +0200
commitac2c2cf23573e400e014628af22467ca43573c21 (patch)
tree87e189de756cd783f95387ccb03be452185c6bb4
parentb29fafbefd8b195e344bf3fd013a370b7cf930c8 (diff)
build: Make ccache opt-in rather than opt-out
Using ccache by default for compilation if it is available on the system might confuse people and in rare cases also lead to unexpected results. Thus, from now on the use of ccache for compilation has to explicitely specified by setting the CCACHE make variable to the name/path of the ccache binary, i.e. `make CCACHE=ccache' Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--Makefile4
-rw-r--r--Misc4
-rwxr-xr-xconfigure14
3 files changed, 4 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index f76fa10..968f9b7 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,8 @@ TOOLS ?= netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun mausezahn
# For packaging purposes, prefix can define a different path.
PREFIX ?= /usr/local
-# Disable if you don't want it
-CCACHE ?= $(CONFIG_CCACHE)
+# Set to use ccache for compilation
+CCACHE ?=
# Location of an alternative destination directory for installation
# Useful when cross-compiling and installing in a dedicated target directory
diff --git a/Misc b/Misc
index 4639280..818c4a3 100644
--- a/Misc
+++ b/Misc
@@ -67,7 +67,7 @@ coverity:
$(Q)$(call RM,cov-int)
$(Q)$(call MKDIR,cov-int)
$(Q)./configure
- $(Q)cov-build --dir cov-int $(MAKE) CCACHE=
+ $(Q)cov-build --dir cov-int $(MAKE)
$(Q)tar czvf netsniff-ng-coverity.tgz cov-int
$(Q)echo "Uploading snapshot to Coverity scanner"
$(Q)curl --form file=@netsniff-ng-coverity.tgz --form project=netsniff-ng \
@@ -113,6 +113,6 @@ help:
$(Q)echo " CFLAGS=\"-O2 -Wall ...\" - Overwrite CFLAGS for compilation"
$(Q)echo " CPPFLAGS=\"-I <path> ...\" - Additional CFLAGS for compilation"
$(Q)echo " LDFLAGS=\"-L <path> ...\" - Additional LDFLAGS for compilation"
- $(Q)echo " CCACHE= - Do not use ccache for compilation"
+ $(Q)echo " CCACHE=ccache - Use ccache for compilation"
$(Q)echo " C=1 - Check all C source files with sparse"
$(Q)echo " Q= - Show verbose garbage"
diff --git a/configure b/configure
index fa60764..2e553cb 100755
--- a/configure
+++ b/configure
@@ -55,19 +55,6 @@ check_pkg_config()
fi
}
-check_ccache()
-{
- echo -n "[*] Checking ccache ... "
-
- if [ "x$(which ccache 2>> config.log)" == "x" ] ; then
- echo "[NO]"
- echo "CONFIG_CCACHE=" >> Config
- else
- echo "[YES]"
- echo "CONFIG_CCACHE=ccache" >> Config
- fi
-}
-
check_flex()
{
echo -n "[*] Checking flex ... "
@@ -590,7 +577,6 @@ if [ "$MISSING_PKG_CONFIG" == "1" ] ; then
exit 1
fi
-check_ccache
check_flex
check_bison
check_nacl