]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Move third party source code to src/third_party
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 20 Jul 2019 12:49:17 +0000 (14:49 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Jul 2019 21:05:06 +0000 (23:05 +0200)
24 files changed:
LICENSE.adoc
Makefile.in
configure.ac
dev.mk.in
src/ccache.c
src/ccache.h
src/common_header.h
src/compression.h
src/hashutil.c
src/manifest.c
src/manifest.h
src/third_party/getopt_long.c [moved from src/getopt_long.c with 100% similarity]
src/third_party/getopt_long.h [moved from src/getopt_long.h with 100% similarity]
src/third_party/hashtable.c [moved from src/hashtable.c with 100% similarity]
src/third_party/hashtable.h [moved from src/hashtable.h with 100% similarity]
src/third_party/hashtable_itr.c [moved from src/hashtable_itr.c with 100% similarity]
src/third_party/hashtable_itr.h [moved from src/hashtable_itr.h with 100% similarity]
src/third_party/hashtable_private.h [moved from src/hashtable_private.h with 100% similarity]
src/third_party/minitrace.c [moved from src/minitrace.c with 100% similarity]
src/third_party/minitrace.h [moved from src/minitrace.h with 100% similarity]
src/third_party/snprintf.c [moved from src/snprintf.c with 100% similarity]
src/third_party/xxhash.c [moved from src/xxhash.c with 100% similarity]
src/third_party/xxhash.h [moved from src/xxhash.h with 100% similarity]
unittest/main.c

index feb951f81227cdf05aa6b13741e62a2995480623..b9944470a4ca98b4ae9c2f0deea41e3da87eb14c 100644 (file)
@@ -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 <https://github.com/hrydgard/minitrace>.
@@ -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 <https://github.com/Cyan4973/xxHash/releases>.
index 85630acf89433bb6087b477e3dcbfeef5dd6c7b5..a58cdb6608b096d0bdc82aa36f8d78e6cedb3057 100644 (file)
@@ -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)
index 594aa7921654b45be11f501d9ce8330279a2a60b..60637d6a9aed435a2fa1119d0f990a771126e272 100644 (file)
@@ -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
index d15493177e1ae371b0f111e56f946683e77171ec..c815cb434c402ad47de675f9980e5c5db1c16793 100644 (file)
--- 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!<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      $@")
@@ -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:
index e4fc54fcc626409704b5b14c5bd24c1bf5bf75bd..b178bed27727b5681a055f7344c62fba7c8b53fd 100644 (file)
 #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"
index ceab99441888df0c3af739d8d38cadba9e154f39..61c4d51668c63beb93074a052a61f26f4aa4d1da 100644 (file)
@@ -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)))
index 5286152c453783a67f729af2af20c11ffb08335a..45514f3219f24c37e6053fcd590be2f65e684da5 100644 (file)
@@ -20,7 +20,7 @@
 #define COMMON_HEADER_H
 
 #include "compression.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
 
 #define COMMON_HEADER_SIZE 15
 
index e05fa2deb725381210a8ff77bf7bf0ba6b315ce2..1b272070d1252786577b20cd3e4170e0c02014e3 100644 (file)
@@ -20,7 +20,7 @@
 #define COMPRESSION_H
 
 #include "system.h"
-#include "xxhash.h"
+#include "third_party/xxhash.h"
 
 struct compr_state;
 
index c0475215f264efbe7289edf92add00305cd1144f..548b307677067bc043793a5e560d4cc6c6d655b2 100644 (file)
@@ -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)
index a50eb9868f43c59a586c8fc672dfef8d9050a4a6..791c8ebdc415b530f397e84af02b80772ce7b1ca 100644 (file)
 // 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
 // ====================
index 2e5cd2fad219b75937e4d0d00aa4c14460750bae..adf0db38057a87121c926d58ec52c2db8bede042 100644 (file)
@@ -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
similarity index 100%
rename from src/hashtable.c
rename to src/third_party/hashtable.c
similarity index 100%
rename from src/hashtable.h
rename to src/third_party/hashtable.h
similarity index 100%
rename from src/minitrace.c
rename to src/third_party/minitrace.c
similarity index 100%
rename from src/minitrace.h
rename to src/third_party/minitrace.h
similarity index 100%
rename from src/snprintf.c
rename to src/third_party/snprintf.c
similarity index 100%
rename from src/xxhash.c
rename to src/third_party/xxhash.c
similarity index 100%
rename from src/xxhash.h
rename to src/third_party/xxhash.h
index 4ed8e8f24096b01dadc227f54d1fbcd964b1528b..40f528feed96129a72f0788fe8d8c3722abfc4d8 100644 (file)
@@ -20,7 +20,7 @@
 #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