under less restrictive terms.
-src/getopt_long.[hc]
-~~~~~~~~~~~~~~~~~~~~
+src/third_party/getopt_long.[hc]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This implementation of `getopt_long()` was copied from
http://www.postgresql.org[PostgreSQL] and has the following license text:
-------------------------------------------------------------------------------
-src/hashtable*.[hc]
-~~~~~~~~~~~~~~~~~~~
+src/third_party/hashtable*.[hc]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This code comes from http://www.cl.cam.ac.uk/~cwc22/hashtable/ with the
following license:
-------------------------------------------------------------------------------
-src/minitrace.[hc]
-~~~~~~~~~~~~~~~~~~
+src/third_party/minitrace.[hc]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A library for producing JSON traces suitable for Chrome's built-in trace viewer
(chrome://tracing). Downloaded from <https://github.com/hrydgard/minitrace>.
SOFTWARE.
-------------------------------------------------------------------------------
-src/snprintf.c and m4/snprintf.m4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src/third_party/snprintf.c and m4/snprintf.m4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This implementation of `snprintf()` and similar functions was downloaded from
http://www.jhweiss.de/software/snprintf.html and has the following license:
modified) versions of this file, nor is leaving this notice intact mandatory.
-------------------------------------------------------------------------------
-src/xxhash.[hc]
-~~~~~~~~~~~~~~~
+src/third_party/xxhash.[hc]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
xxHash - Extremely Fast Hash algorithm. Copied from xxHash v0.6.5 downloaded
from <https://github.com/Cyan4973/xxHash/releases>.
quiet := $(v_at_$(V))
Q=$(if $(quiet),@)
-non_3pp_sources = \
+non_third_party_sources = \
src/args.c \
src/ccache.c \
src/cleanup.c \
src/confitems_lookup.c \
src/envtoconfitems_lookup.c \
src/version.c
-3pp_sources = \
- src/getopt_long.c \
- src/hashtable.c \
- src/hashtable_itr.c \
- src/snprintf.c \
- src/xxhash.c
+third_party_sources = \
+ src/third_party/getopt_long.c \
+ src/third_party/hashtable.c \
+ src/third_party/hashtable_itr.c \
+ src/third_party/snprintf.c \
+ src/third_party/xxhash.c
extra_sources = @extra_sources@
-base_sources = $(non_3pp_sources) $(generated_sources) $(3pp_sources) $(extra_sources)
+base_sources = $(non_third_party_sources) $(generated_sources) $(third_party_sources) $(extra_sources)
base_objs = $(base_sources:.c=.o)
-non_3pp_objs = $(non_3pp_sources:.c=.o)
+non_third_party_objs = $(non_third_party_sources:.c=.o)
ccache_sources = src/main.c $(base_sources)
ccache_objs = $(ccache_sources:.c=.o)
.PHONY: clean
clean:
rm -rf $(files_to_clean)
- [ ! -d src/zstd ] || $(MAKE) -C src/zstd/lib clean
+ [ ! -d src/third_party/zstd ] || $(MAKE) -C src/third_party/zstd/lib clean
src/snprintf.o: CFLAGS += @no_implicit_fallthrough_warning@
ZSTD_LIB_DEPRECATED=0 \
ZSTD_LIB_DICTBUILDER=0
-src/zstd/lib/libzstd.a:
- $(MAKE) -C src/zstd/lib libzstd.a $(libzstd_options) CC="$(CC)"
+src/third_party/zstd/lib/libzstd.a:
+ $(MAKE) -C src/third_party/zstd/lib libzstd.a $(libzstd_options) CC="$(CC)"
.PHONY: performance
performance: ccache$(EXEEXT)
m4_include(m4/feature_macros.m4)
m4_include(m4/clang.m4)
-mkdir -p .deps src unittest
+mkdir -p .deps src/third_party unittest
dnl Checks for programs.
AC_PROG_CC
fi
fi
fi
- (cd src && tar -xzf ../${zstd_archive})
- rm -rf src/zstd
- mv src/zstd-${zstd_version} src/zstd
- CPPFLAGS="$CPPFLAGS -I$srcdir/src/zstd/lib"
- extra_libs="src/zstd/lib/libzstd.a"
+ (cd src/third_party && tar -xzf ../../${zstd_archive})
+ rm -rf src/third_party/zstd
+ mv src/third_party/zstd-${zstd_version} src/third_party/zstd
+ CPPFLAGS="$CPPFLAGS -I$srcdir/src/third_party/zstd/lib"
+ extra_libs="src/third_party/zstd/lib/libzstd.a"
fi
AC_ARG_ENABLE(man,
[enable possibility to use internal ccache tracing])])
if test x${enable_tracing} = xyes; then
CPPFLAGS="$CPPFLAGS -DMTR_ENABLED"
- extra_sources="src/minitrace.c"
+ extra_sources="src/third_party/minitrace.c"
fi
dnl Linking on Windows needs ws2_32
src/confitems.h \
src/counters.h \
src/envtoconfitems.h \
- src/getopt_long.h \
src/hash.h \
- src/hashtable.h \
- src/hashtable_itr.h \
- src/hashtable_private.h \
src/hashutil.h \
src/int_bytes_conversion.h \
src/language.h \
src/macroskip.h \
src/manifest.h \
src/mdfour.h \
- src/minitrace.h \
src/result.h \
src/system.h \
+ src/third_party/getopt_long.h \
+ src/third_party/hashtable.h \
+ src/third_party/hashtable_itr.h \
+ src/third_party/hashtable_private.h \
+ src/third_party/minitrace.h \
+ src/third_party/xxhash.h \
src/unify.h \
- src/xxhash.h \
unittest/framework.h \
unittest/util.h
generated_headers = \
files_to_distclean += .deps dev.mk
source_dist_files = \
- $(non_3pp_sources) \
- $(3pp_sources) \
+ $(non_third_party_sources) \
+ $(third_party_sources) \
$(headers) \
$(test_sources) \
CONTRIBUTING.md \
src/envtoconfitems.gperf \
src/envtoconfitems_lookup.c \
src/main.c \
- src/minitrace.c \
+ src/third_party/minitrace.c \
test/run \
test/suites/*.bash
$(Q)$(ASCIIDOC) -a revnumber=$(version) -d manpage -b docbook -o - $< | \
perl -pe 's!<literal>(.*?)</literal>!<emphasis role="strong">\1</emphasis>!g' >$@
-$(non_3pp_objs) $(test_objs): CFLAGS += @more_warnings@
+$(non_third_party_objs) $(test_objs): CFLAGS += @more_warnings@
doc/ccache.1: doc/MANUAL.xml
$(if $(quiet),@echo " A2X $@")
$(CPPCHECK) --suppressions-list=$(CPPCHECK_SUPPRESSIONS) \
--inline-suppr -q --enable=all --force -I . \
--template='cppcheck: warning: {id}:{file}:{line}: {message}' \
- $(non_3pp_sources) src/confitems_lookup.c src/main.c $(test_sources)
+ $(non_third_party_sources) src/confitems_lookup.c src/main.c $(test_sources)
.PHONY: shellcheck
shellcheck: test/suites/*.bash
.PHONY: uncrustify
uncrustify:
- uncrustify -c misc/uncrustify.cfg --no-backup --replace $(non_3pp_sources) $(test_sources)
+ uncrustify -c misc/uncrustify.cfg --no-backup --replace $(non_third_party_sources) $(test_sources)
# pip install compiledb
compile_commands.json:
#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#else
-#include "getopt_long.h"
+#include "third_party/getopt_long.h"
#endif
#include "hash.h"
-#include "hashtable.h"
-#include "hashtable_itr.h"
+#include "third_party/hashtable.h"
+#include "third_party/hashtable_itr.h"
#include "hashutil.h"
#include "language.h"
#include "manifest.h"
#include "system.h"
#include "conf.h"
#include "counters.h"
-#include "minitrace.h"
+#include "third_party/minitrace.h"
#ifdef __GNUC__
#define ATTR_FORMAT(x, y, z) __attribute__((format (ATTRIBUTE_FORMAT_PRINTF, y, z)))
#define COMMON_HEADER_H
#include "compression.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
#define COMMON_HEADER_SIZE 15
#define COMPRESSION_H
#include "system.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
struct compr_state;
#include "ccache.h"
#include "hashutil.h"
#include "macroskip.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
unsigned
hash_from_string(void *str)
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "ccache.h"
-#include "hashtable_itr.h"
+#include "third_party/hashtable_itr.h"
#include "hashutil.h"
#include "common_header.h"
#include "compression.h"
#include "int_bytes_conversion.h"
#include "manifest.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
// Manifest data format
// ====================
#include "conf.h"
#include "hashutil.h"
-#include "hashtable.h"
+#include "third_party/hashtable.h"
extern const char MANIFEST_MAGIC[4];
#define MANIFEST_VERSION 2
#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#else
-#include "../src/getopt_long.h"
+#include "../src/third_party/getopt_long.h"
#endif
// *INDENT-OFF* disable uncrustify