Skip to content

Commit

Permalink
fixes valhalla/conf#34
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkreiser committed Jan 11, 2016
0 parents commit ae7c1ab
Show file tree
Hide file tree
Showing 40 changed files with 2,522 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# editor temporary / backup files
*~

# artefacts from autotools
INSTALL
Makefile.in
aclocal.m4
autom4te.cache/
compile
config.guess
config.sub
config.log
config.status
configure
install-sh
missing
depcomp
Makefile
include/config.h
include/config.h.in
include/stamp-h1
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
libtool

# built objects
skadi_benchmark
loki_benchmark
*.o
.deps/
.dirstamp
*.lo
.libs/
conf

# tests
test-suite.log
test-driver
test/*.log
test/*.trs

# test coverage stuff
*.gcno
*.gcda
coverage.info
coverage/

# tools
.cproject
.project
.settings
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Duane Gearhart <[email protected]>
Greg Knisely <[email protected]>
Kevin Kreiser <[email protected]>
Dave Nesbitt <[email protected]>
Kristen DiLuca <[email protected]>
22 changes: 22 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Mapzen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Empty file added ChangeLog
Empty file.
1 change: 1 addition & 0 deletions LICENSE.md
72 changes: 72 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
ACLOCAL_AMFLAGS = -I m4
AM_LDFLAGS = @BOOST_LDFLAGS@ @COVERAGE_LDFLAGS@
AM_CPPFLAGS = -Ivalhalla @BOOST_CPPFLAGS@
AM_CXXFLAGS = -Ivalhalla @COVERAGE_CXXFLAGS@
VALHALLA_LDFLAGS = @VALHALLA_MIDGARD_LDFLAGS@ @VALHALLA_MIDGARD_LIB@ @VALHALLA_BALDR_LDFLAGS@ @VALHALLA_BALDR_LIB@ @VALHALLA_SIF_LDFLAGS@ @VALHALLA_SIF_LIB@ @VALHALLA_SKADI_LIB@ @VALHALLA_MJOLNIR_LDFLAGS@ @VALHALLA_MJOLNIR_LIB@ @VALHALLA_LOKI_LDFLAGS@ @VALHALLA_LOKI_LIB@ @VALHALLA_THOR_LDFLAGS@ @VALHALLA_THOR_LIB@ @VALHALLA_ODIN_LDFLAGS@ @VALHALLA_ODIN_LIB@
VALHALLA_CPPFLAGS = @VALHALLA_MIDGARD_CPPFLAGS@ @VALHALLA_BALDR_CPPFLAGS@ @VALHALLA_SIF_CPPFLAGS@ @VALHALLA_SKADI_CPPFLAGS@ @VALHALLA_MJOLNIR_CPPFLAGS@ @VALHALLA_LOKI_CPPFLAGS@ @VALHALLA_THOR_CPPFLAGS@ @VALHALLA_ODIN_CPPFLAGS@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status libtool

#config files for tools, you can put a commit hash here if you are ahead of master
CONF=master
conf:
-wget -q -O conf-$(CONF).zip https://github.com/valhalla/conf/archive/$(CONF).zip
-unzip conf-$(CONF).zip
-rm -rf conf-$(CONF).zip conf
-mv conf-$(CONF) conf
clean-conf:
-rm -rf conf

# conditional test coverage
if ENABLE_COVERAGE
.PHONY: clean-coverage
clean-coverage:
-find -name '*.gcda' -exec rm -rf {} \;
-$(LCOV) --directory $(top_builddir) -z
-rm -rf coverage.info coverage/

.PHONY: coverage-report
coverage-report: clean-coverage
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) coverage/index.html

coverage.info:
$(LCOV) --directory $(top_builddir) --base-directory $(top_builddir) --no-external --capture --output-file $@ --no-checksum --compat-libtool

coverage/index.html: coverage.info
$(GENHTML) --prefix $(top_builddir) --output-directory $(@D) --title "Test Coverage" --legend --show-details $<


.PHONY: clean-gcno
clean-gcno:
-find -name '*.gcno' -exec rm -rf {} \;

clean-local: clean-coverage clean-gcno clean-conf
else
clean-local: clean-conf
endif

#everybody needs confs
src/*.cc: conf

#distributed executables
bin_PROGRAMS = loki_benchmark skadi_benchmark
loki_benchmark_SOURCES = src/loki_benchmark.cc
loki_benchmark_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
loki_benchmark_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)
skadi_benchmark_SOURCES = src/skadi_benchmark.cc
skadi_benchmark_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
skadi_benchmark_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)

# tests
#check_PROGRAMS = test/something
#test_something_SOURCES = test/something.cc test/test.cc
#test_something_CPPFLAGS = $(DEPS_CFLAGS) $(VALHALLA_CPPFLAGS) @BOOST_CPPFLAGS@
#test_something_LDADD = $(DEPS_LIBS) $(VALHALLA_LDFLAGS) @BOOST_LDFLAGS@ $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)

TESTS = $(check_PROGRAMS)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = sh

test: check
Empty file added NEWS
Empty file.
1 change: 1 addition & 0 deletions README
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
██▒ █▓ ▄▄▄ ██▓ ██░ ██ ▄▄▄ ██▓ ██▓ ▄▄▄
▓██░ █▒▒████▄ ▓██▒ ▓██░ ██▒▒████▄ ▓██▒ ▓██▒ ▒████▄
▓██ █▒░▒██ ▀█▄ ▒██░ ▒██▀▀██░▒██ ▀█▄ ▒██░ ▒██░ ▒██ ▀█▄
▒██ █░░░██▄▄▄▄██ ▒██░ ░▓█ ░██ ░██▄▄▄▄██ ▒██░ ▒██░ ░██▄▄▄▄██
▒▀█░ ▓█ ▓██▒░██████▒░▓█▒░██▓ ▓█ ▓██▒░██████▒░██████▒▓█ ▓██▒
░ ▐░ ▒▒ ▓▒█░░ ▒░▓ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░▓ ░░ ▒░▓ ░▒▒ ▓▒█░
░ ░░ ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░ ▒ ░░ ░ ▒ ░ ▒ ▒▒ ░
░░ ░ ▒ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░

Valhalla is an open source routing engine and accompanying libraries for use with Open Street Map data. This repository is comprised of tools build on top of the various other valhalla libraries.

Build Status
------------

[![Circle CI](https://circleci.com/gh/valhalla/tools.svg?style=svg)](https://circleci.com/gh/valhalla/tools)

Building
--------

Our tools use the [GNU Build System](http://www.gnu.org/software/automake/manual/html_node/GNU-Build-System.html) to configure and build itself. To install on a Debian or Ubuntu system you need to install its dependencies with:

scripts/dependencies.sh

And then run to install it:

scripts/install.sh

Please see `./configure --help` for more options on how to control the build process.

Using
-----

For detailed information about what algorithms, data structures and executables are contained within tools, please see the more [detailed documentation](docs/index.md).

The build will produce binaries mostly in the form of command line executable tools. Tools, and all of the projects under the Valhalla organization use the [MIT License](COPYING).

Contributing
------------

We welcome contributions to our tools. If you would like to report an issue, or even better fix an existing one, please use the [tools issue tracker](https://github.com/valhalla/tools/issues) on GitHub.

If you would like to make an improvement to the code, please be aware that all valhalla projects are written mostly in C++11, in the K&R (1TBS variant) with two spaces as indentation. We welcome contributions as pull requests to the [repository](https://github.com/valhalla/tools) and highly recommend that your pull request include a test to validate the addition/change of functionality.

Tests
-----

We highly encourage running and updating the tests to make sure no regressions have been made. We use the Automake test suite to run our tests by simply making the `check` target:

make check

You can also build a test coverage report. This requires that the packages `lcov`, `gcov` and `genhtml` be installed. On Ubuntu you can get these with:

sudo apt-get install lcov

To make the coverage report, configure the build for it:

./configure --enable-coverage

And generate an HTML coverage report in the `coverage/` directory:

make coverage-report

Note also that, because calculating the coverage requires compiler support, you will need to clean any object files from a non-coverage build by running `make clean` before `make coverage-report`.
3 changes: 3 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
aclocal -I m4
autoreconf -fi --warning=no-portability
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
checkout:
post:
- git submodule sync
- git submodule update --init

dependencies:
override:
- scripts/dependencies.sh deps

test:
override:
- scripts/install.sh

general:
artifacts:
- config.log
- test/*.log
- Makefile
60 changes: 60 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
AC_INIT([tools],
[0.0.1],
[https://github.com/valhalla/tools/issues],
[tools-0.0.1],
[https://github.com/valhalla/tools])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([subdir-objects parallel-tests])
LT_INIT
AC_SUBST([LIBTOOL_DEPS])

AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_MACRO_DIR([m4])

AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET

AC_HEADER_STDC
AC_LANG_CPLUSPLUS

# require c++11
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])

# require other valhalla dependencies
CHECK_VALHALLA_MIDGARD
CHECK_VALHALLA_BALDR
CHECK_VALHALLA_SIF
CHECK_VALHALLA_SKADI
CHECK_VALHALLA_MJOLNIR
CHECK_VALHALLA_LOKI
CHECK_VALHALLA_THOR
CHECK_VALHALLA_ODIN
CHECK_VALHALLA_TYR

# check for boost and make sure we have the program options library
AX_BOOST_BASE([1.54], , [AC_MSG_ERROR([cannot find Boost libraries, which are are required for building tools. Please install libboost-dev.])])
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_SYSTEM
AX_BOOST_THREAD
AX_BOOST_FILESYSTEM

# check pkg-config dependencies
PKG_CHECK_MODULES([DEPS], [libzmq >= 4.0 libprime_server >= 0.3.1])

# optionally enable coverage information
CHECK_COVERAGE

AC_CONFIG_FILES([Makefile])

# Debian resets this to no, but this break both Spot and the libtool
# test suite itself. Instead of requiring developer to install a
# non-patched version of Libtool on any Debian they use, we just
# cancel the effect of Debian's patch here.
# see: http://git.lrde.epita.fr/?p=spot.git;a=commitdiff;h=0e74b76521341f670f6b76f8ef24a6dcf6e3813b
link_all_deplibs=yes
link_all_deplibs_CXX=yes

AC_OUTPUT

15 changes: 15 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Tools #

The tools repository is essentially a set command line executables testing the various data structures and alogrithms found in the valhalla libraries.

## Components ##

What follows are some notable tools.

### Skadi Benchmark ###

TODO:

### Loki Benchmark ###

TODO:
Empty file added include/.keep
Empty file.
1 change: 1 addition & 0 deletions lib
Loading

0 comments on commit ae7c1ab

Please sign in to comment.