From: Joel Rosdahl Date: Sat, 20 Jul 2019 12:49:17 +0000 (+0200) Subject: Move third party source code to src/third_party X-Git-Tag: v4.0~881 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0689910ae4a586c3548e1f77db0e0cf1238adb9b;p=thirdparty%2Fccache.git Move third party source code to src/third_party --- diff --git a/LICENSE.adoc b/LICENSE.adoc index feb951f81..b9944470a 100644 --- a/LICENSE.adoc +++ b/LICENSE.adoc @@ -52,8 +52,8 @@ the GPL: that is, if separated from the ccache sources, they may be usable 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: @@ -91,8 +91,8 @@ 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: @@ -413,8 +413,8 @@ This Autoconf M4 snippet comes from http://www.python.org[Python] 2.6's ------------------------------------------------------------------------------- -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 . @@ -443,8 +443,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 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: @@ -467,8 +467,8 @@ 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 . diff --git a/Makefile.in b/Makefile.in index 85630acf8..a58cdb660 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ v_at_ = $(v_at_0) quiet := $(v_at_$(V)) Q=$(if $(quiet),@) -non_3pp_sources = \ +non_third_party_sources = \ src/args.c \ src/ccache.c \ src/cleanup.c \ @@ -60,17 +60,17 @@ generated_sources = \ 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) @@ -116,7 +116,7 @@ install: ccache$(EXEEXT) @disable_man@ccache.1 .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@ @@ -125,8 +125,8 @@ libzstd_options = \ 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) diff --git a/configure.ac b/configure.ac index 594aa7921..60637d6a9 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ AC_SUBST(test_suites) 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 @@ -154,11 +154,11 @@ else 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, @@ -173,7 +173,7 @@ AC_ARG_ENABLE(tracing, [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 diff --git a/dev.mk.in b/dev.mk.in index d15493177..c815cb434 100644 --- a/dev.mk.in +++ b/dev.mk.in @@ -42,22 +42,22 @@ headers = \ 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 = \ @@ -71,8 +71,8 @@ files_to_distclean += $(built_dist_files) src/version.c unittest/suites.h 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 \ @@ -97,7 +97,7 @@ source_dist_files = \ src/envtoconfitems.gperf \ src/envtoconfitems_lookup.c \ src/main.c \ - src/minitrace.c \ + src/third_party/minitrace.c \ test/run \ test/suites/*.bash @@ -187,7 +187,7 @@ docs: $(generated_docs) $(Q)$(ASCIIDOC) -a revnumber=$(version) -d manpage -b docbook -o - $< | \ perl -pe 's!(.*?)!\1!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 $@") @@ -208,7 +208,7 @@ cppcheck: $(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 @@ -216,7 +216,7 @@ 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: diff --git a/src/ccache.c b/src/ccache.c index e4fc54fcc..b178bed27 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -22,11 +22,11 @@ #ifdef HAVE_GETOPT_LONG #include #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" diff --git a/src/ccache.h b/src/ccache.h index ceab99441..61c4d5166 100644 --- a/src/ccache.h +++ b/src/ccache.h @@ -23,7 +23,7 @@ #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))) diff --git a/src/common_header.h b/src/common_header.h index 5286152c4..45514f321 100644 --- a/src/common_header.h +++ b/src/common_header.h @@ -20,7 +20,7 @@ #define COMMON_HEADER_H #include "compression.h" -#include "xxhash.h" +#include "third_party/xxhash.h" #define COMMON_HEADER_SIZE 15 diff --git a/src/compression.h b/src/compression.h index e05fa2deb..1b272070d 100644 --- a/src/compression.h +++ b/src/compression.h @@ -20,7 +20,7 @@ #define COMPRESSION_H #include "system.h" -#include "xxhash.h" +#include "third_party/xxhash.h" struct compr_state; diff --git a/src/hashutil.c b/src/hashutil.c index c0475215f..548b30767 100644 --- a/src/hashutil.c +++ b/src/hashutil.c @@ -19,7 +19,7 @@ #include "ccache.h" #include "hashutil.h" #include "macroskip.h" -#include "xxhash.h" +#include "third_party/xxhash.h" unsigned hash_from_string(void *str) diff --git a/src/manifest.c b/src/manifest.c index a50eb9868..791c8ebdc 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -17,13 +17,13 @@ // 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 // ==================== diff --git a/src/manifest.h b/src/manifest.h index 2e5cd2fad..adf0db380 100644 --- a/src/manifest.h +++ b/src/manifest.h @@ -21,7 +21,7 @@ #include "conf.h" #include "hashutil.h" -#include "hashtable.h" +#include "third_party/hashtable.h" extern const char MANIFEST_MAGIC[4]; #define MANIFEST_VERSION 2 diff --git a/src/getopt_long.c b/src/third_party/getopt_long.c similarity index 100% rename from src/getopt_long.c rename to src/third_party/getopt_long.c diff --git a/src/getopt_long.h b/src/third_party/getopt_long.h similarity index 100% rename from src/getopt_long.h rename to src/third_party/getopt_long.h diff --git a/src/hashtable.c b/src/third_party/hashtable.c similarity index 100% rename from src/hashtable.c rename to src/third_party/hashtable.c diff --git a/src/hashtable.h b/src/third_party/hashtable.h similarity index 100% rename from src/hashtable.h rename to src/third_party/hashtable.h diff --git a/src/hashtable_itr.c b/src/third_party/hashtable_itr.c similarity index 100% rename from src/hashtable_itr.c rename to src/third_party/hashtable_itr.c diff --git a/src/hashtable_itr.h b/src/third_party/hashtable_itr.h similarity index 100% rename from src/hashtable_itr.h rename to src/third_party/hashtable_itr.h diff --git a/src/hashtable_private.h b/src/third_party/hashtable_private.h similarity index 100% rename from src/hashtable_private.h rename to src/third_party/hashtable_private.h diff --git a/src/minitrace.c b/src/third_party/minitrace.c similarity index 100% rename from src/minitrace.c rename to src/third_party/minitrace.c diff --git a/src/minitrace.h b/src/third_party/minitrace.h similarity index 100% rename from src/minitrace.h rename to src/third_party/minitrace.h diff --git a/src/snprintf.c b/src/third_party/snprintf.c similarity index 100% rename from src/snprintf.c rename to src/third_party/snprintf.c diff --git a/src/xxhash.c b/src/third_party/xxhash.c similarity index 100% rename from src/xxhash.c rename to src/third_party/xxhash.c diff --git a/src/xxhash.h b/src/third_party/xxhash.h similarity index 100% rename from src/xxhash.h rename to src/third_party/xxhash.h diff --git a/unittest/main.c b/unittest/main.c index 4ed8e8f24..40f528fee 100644 --- a/unittest/main.c +++ b/unittest/main.c @@ -20,7 +20,7 @@ #ifdef HAVE_GETOPT_LONG #include #else -#include "../src/getopt_long.h" +#include "../src/third_party/getopt_long.h" #endif // *INDENT-OFF* disable uncrustify