The top directory has become too crowded.
under less restrictive terms.
-getopt_long.[hc]
-~~~~~~~~~~~~~~~~
+src/getopt_long.[hc]
+~~~~~~~~~~~~~~~~~~~~
This implementation of `getopt_long()` was copied from
http://www.postgresql.org[PostgreSQL] and has the following license text:
-------------------------------------------------------------------------------
-hashtable*.[hc]
-~~~~~~~~~~~~~~~
+src/hashtable*.[hc]
+~~~~~~~~~~~~~~~~~~~
This code comes from http://www.cl.cam.ac.uk/~cwc22/hashtable/ with the
following license:
-------------------------------------------------------------------------------
-murmurhashneutral2.[hc]
-~~~~~~~~~~~~~~~~~~~~~~~
+src/murmurhashneutral2.[hc]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fast hash implementation is released to the public domain by Austin
Appleby. See http://murmurhash.googlepages.com.
-snprintf.c and m4/snprintf.m4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src/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:
-------------------------------------------------------------------------------
-zlib/*.[hc]
-~~~~~~~~~~~
+src/zlib/*.[hc]
+~~~~~~~~~~~~~~~
This is a bundled subset of zlib 1.2.8 from <http://zlib.net> with the
following license:
RANLIB = @RANLIB@
all_cflags = $(CFLAGS)
-all_cppflags = @DEFS@ -DSYSCONFDIR=$(sysconfdir) -I. -I$(srcdir) $(CPPFLAGS)
+all_cppflags = @DEFS@ -DSYSCONFDIR=$(sysconfdir) -I. -I$(srcdir)/src $(CPPFLAGS)
extra_libs = @extra_libs@
non_3pp_sources = \
- args.c \
- ccache.c \
- cleanup.c \
- compopt.c \
- conf.c \
- counters.c \
- execute.c \
- exitfn.c \
- hash.c \
- hashutil.c \
- language.c \
- lockfile.c \
- manifest.c \
- mdfour.c \
- stats.c \
- unify.c \
- util.c \
- version.c
+ src/args.c \
+ src/ccache.c \
+ src/cleanup.c \
+ src/compopt.c \
+ src/conf.c \
+ src/counters.c \
+ src/execute.c \
+ src/exitfn.c \
+ src/hash.c \
+ src/hashutil.c \
+ src/language.c \
+ src/lockfile.c \
+ src/manifest.c \
+ src/mdfour.c \
+ src/stats.c \
+ src/unify.c \
+ src/util.c \
+ src/version.c
3pp_sources = \
- getopt_long.c \
- hashtable.c \
- hashtable_itr.c \
- murmurhashneutral2.c \
- snprintf.c
+ src/getopt_long.c \
+ src/hashtable.c \
+ src/hashtable_itr.c \
+ src/murmurhashneutral2.c \
+ src/snprintf.c
base_sources = $(non_3pp_sources) $(3pp_sources)
base_objs = $(base_sources:.c=.o)
-ccache_sources = main.c $(base_sources)
+ccache_sources = src/main.c $(base_sources)
ccache_objs = $(ccache_sources:.c=.o)
zlib_sources = \
.PHONY: perf
perf: ccache$(EXEEXT)
- $(srcdir)/perf.py --ccache ccache$(EXEEXT) $(CC) $(all_cppflags) $(all_cflags) $(srcdir)/ccache.c
+ $(srcdir)/perf/perf.py --ccache ccache$(EXEEXT) $(CC) $(all_cppflags) $(all_cflags) $(srcdir)/src/ccache.c
.PHONY: test
test: ccache$(EXEEXT) unittest/run$(EXEEXT)
fi
if test x${use_bundled_zlib} = xyes; then
- CPPFLAGS="$CPPFLAGS -I\$(srcdir)/zlib"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/src/zlib"
extra_libs="zlib/libz.a"
mkdir -p zlib
else
AC_MSG_NOTICE(Developer mode disabled)
fi
-if test ! -f $srcdir/version.c; then
+if test ! -f $srcdir/src/version.c; then
AC_MSG_WARN(unable to determine ccache version)
- echo "const char CCACHE_VERSION@<:@@:>@ = \"unknown\";" >version.c
+ echo "const char CCACHE_VERSION@<:@@:>@ = \"unknown\";" >src/version.c
fi
dnl Find test suite files.
echo '#endif' >>config.h.tmp
mv config.h.tmp config.h
-mkdir -p .deps unittest
+mkdir -p .deps src unittest
AC_MSG_NOTICE(now build ccache by running make)
ASCIIDOC = asciidoc
CPPCHECK = cppcheck
-CPPCHECK_SUPPRESSIONS = cppcheck-suppressions.txt
+CPPCHECK_SUPPRESSIONS = misc/cppcheck-suppressions.txt
SCAN_BUILD = scan-build
DOCKER = docker
GPERF = gperf
dist_archives += ccache-$(version).tar.xz
endif
-generated_docs = ccache.1 AUTHORS.html LICENSE.html MANUAL.html NEWS.html
+generated_docs = ccache.1 doc/AUTHORS.html LICENSE.html doc/MANUAL.html doc/NEWS.html
built_dist_files = $(generated_docs)
headers = \
- ccache.h \
- compopt.h \
- conf.h \
- counters.h \
- getopt_long.h \
- hashtable.h \
- hashtable_itr.h \
- hashtable_private.h \
- hashutil.h \
- language.h \
- macroskip.h \
- manifest.h \
- mdfour.h \
- murmurhashneutral2.h \
- system.h \
+ src/ccache.h \
+ src/compopt.h \
+ src/conf.h \
+ src/counters.h \
+ src/getopt_long.h \
+ src/hashtable.h \
+ src/hashtable_itr.h \
+ src/hashtable_private.h \
+ src/hashutil.h \
+ src/language.h \
+ src/macroskip.h \
+ src/manifest.h \
+ src/mdfour.h \
+ src/murmurhashneutral2.h \
+ src/system.h \
unittest/framework.h \
unittest/suites.h \
unittest/util.h
$(base_sources) \
$(headers) \
$(test_sources) \
- AUTHORS.txt \
CONTRIBUTING.md \
GPL-3.0.txt \
LICENSE.txt \
- MANUAL.txt \
Makefile.in \
- NEWS.txt \
README.md \
autogen.sh \
config.guess \
config.sub \
configure \
configure.ac \
- confitems.gperf \
- confitems_lookup.c \
dev.mk.in \
- envtoconfitems.gperf \
- envtoconfitems_lookup.c \
+ doc/AUTHORS.txt \
+ doc/MANUAL.txt \
+ doc/NEWS.txt \
install-sh \
m4 \
- main.c \
+ src/confitems.gperf \
+ src/confitems_lookup.c \
+ src/envtoconfitems.gperf \
+ src/envtoconfitems_lookup.c \
+ src/main.c \
+ src/zlib/*.c \
+ src/zlib/*.h \
test/run \
- test/suites/* \
- zlib/*.c \
- zlib/*.h
+ test/suites/*
dist_files = \
$(addprefix $(srcdir)/, $(source_dist_files)) \
$(built_dist_files)
uncrustify_exclude_files = \
- getopt_long.c \
- hashtable.c \
- hashtable_itr.c \
- snprintf.c
+ src/getopt_long.c \
+ src/hashtable.c \
+ src/hashtable_itr.c \
+ src/snprintf.c
ifneq ($(shell sed 's/.*"\(.*\)".*/\1/' version.c 2>/dev/null),$(version))
$(shell echo 'const char CCACHE_VERSION[] = "$(version)";' >version.c)
mkdir $$dir && \
(cd $(srcdir) && \
rsync -r --relative $(source_dist_files) $$dir) && \
- cp $(srcdir)/INSTALL-from-release-archive.md $$dir/INSTALL.md && \
+ cp $(srcdir)/doc/INSTALL-from-release-archive.md $$dir/INSTALL.md && \
cp $(built_dist_files) $$dir && \
echo "Remove this file to enable developer mode." >$$dir/dev_mode_disabled && \
(cd $$tmpdir && \
%.xml: %.txt
$(ASCIIDOC) -a revnumber=$(version) -d manpage -b docbook $<
-ccache.1: MANUAL.xml
+ccache.1: doc/MANUAL.xml
$(XSLTPROC) --nonet $(MANPAGE_XSL) $<
.PHONY: check-syntax
cppcheck:
$(CPPCHECK) --suppressions-list=$(CPPCHECK_SUPPRESSIONS) \
--inline-suppr -q --enable=all --force \
- $(non_3pp_sources) main.c $(test_sources)
+ $(non_3pp_sources) src/main.c $(test_sources)
.PHONY: uncrustify
uncrustify:
- uncrustify -c uncrustify.cfg --no-backup --replace $(filter-out $(uncrustify_exclude_files), $(base_sources)) $(test_sources)
+ uncrustify -c misc/uncrustify.cfg --no-backup --replace $(filter-out $(uncrustify_exclude_files), $(base_sources)) $(test_sources)
.PHONY: analyze
analyze:
$(SCAN_BUILD) --use-cc=$(CC) --status-bugs $(MAKE) -B
.PHONY: docker
-docker: Dockerfile
+docker: misc/Dockerfile
$(DOCKER) build $(srcdir)
-include .deps/*.d
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "../ccache.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
#ifndef TEST_FRAMEWORK_H
#define TEST_FRAMEWORK_H
-#include "../ccache.h"
+#include "../src/ccache.h"
// ============================================================================
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#else
-#include "../getopt_long.h"
+#include "../src/getopt_long.h"
#endif
// *INDENT-OFF* disable uncrustify
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for the functions operating on struct args.
-#include "../ccache.h"
+#include "../src/ccache.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2017 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for the processing of compiler arguments.
-#include "../ccache.h"
-#include "../conf.h"
+#include "../src/ccache.h"
+#include "../src/conf.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for the compopt_* functions.
-#include "../ccache.h"
-#include "../compopt.h"
+#include "../src/ccache.h"
+#include "../src/compopt.h"
#include "framework.h"
TEST_SUITE(compopt)
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "../conf.h"
+#include "../src/conf.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2011 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "../ccache.h"
-#include "../counters.h"
+#include "../src/ccache.h"
+#include "../src/counters.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for functions in hash.c.
-#include "../ccache.h"
+#include "../src/ccache.h"
#include "framework.h"
TEST_SUITE(hash)
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for functions in hashutil.c.
-#include "../ccache.h"
-#include "../hashutil.h"
+#include "../src/ccache.h"
+#include "../src/hashutil.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for functions in lockfile.c.
-#include "../ccache.h"
+#include "../src/ccache.h"
#include "framework.h"
#include "util.h"
-// Copyright (C) 2010-2011 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// This file contains tests for statistics handling.
-#include "../ccache.h"
-#include "../counters.h"
+#include "../src/ccache.h"
+#include "../src/counters.h"
#include "framework.h"
#include "util.h"
// This file contains tests for functions in util.c.
-#include "../ccache.h"
+#include "../src/ccache.h"
#include "framework.h"
TEST_SUITE(util)
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "../system.h"
+#include "../src/system.h"
#include "util.h"
#ifdef _WIN32