forked from mrtazz/restclient-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
82 lines (61 loc) · 2.81 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
ACLOCAL_AMFLAGS=-I m4
CPPFLAGS=-Iinclude -Ivendor/gtest-1.7.0/include -Ivendor/jsoncpp-0.10.5/dist
check_PROGRAMS = test-program
pkginclude_HEADERS = include/restclient-cpp/restclient.h include/restclient-cpp/meta.h
test_program_SOURCES = vendor/jsoncpp-0.10.5/dist/jsoncpp.cpp test/test_restclient_delete.cpp test/test_restclient_get.cpp test/test_restclient_post.cpp test/test_restclient_put.cpp test/tests.cpp
test_program_LDADD = .libs/librestclient-cpp.a
test_program_LDFLAGS=-Lvendor/gtest-1.7.0/lib/.libs -lgtest
lib_LTLIBRARIES=librestclient-cpp.la
librestclient_cpp_la_SOURCES=source/restclient.cpp
librestclient_cpp_la_CXXFLAGS=-fPIC
librestclient_cpp_la_LDFLAGS=-version-info 1:0:1
.PHONY: test check clean-coverage-files coverage-html docs clean-docs deploy-docs doxygen jekyll packages rpm deb
test: check
./test-program
clean-local:
find . -name "*.gcda" -print0 | xargs -0 rm
coverage.info: test
lcov --compat-libtool --capture --directory source --output-file coverage.info
lcov --compat-libtool --remove coverage.info "/usr*" -o coverage.info
coverage-html: coverage.info
genhtml -t "restclient-cpp coverage report" --legend --show-details coverage.info --output-directory html
local-install:
$(MAKE) install PREFIX=usr
NAME=restclient-cpp
VERSION = $(shell git describe --tags --always --dirty)
BUILDER = $(shell echo "`git config user.name` <`git config user.email`>")
PKG_RELEASE ?= 1
PROJECT_URL="https://github.com/mrtazz/$(NAME)"
FPM_FLAGS= --name $(NAME) --version $(VERSION) --iteration $(PKG_RELEASE) --epoch 1 --license MIT --maintainer "$(BUILDER)" --url $(PROJECT_URL) --vendor mrtazz usr
rpm:
fpm -t rpm -s dir $(FPM_FLAGS)
deb:
fpm -t deb -s dir $(FPM_FLAGS)
packages: local-install rpm deb
include/snyder/version.h:
m4 -I m4 --define=M4_SNYDER_VERSION=$(VERSION) version.h.m4 > $@
GAUGES_CODE="539c6c8de32bb442640005f3"
doxygen:
doxygen doxygen.config
jekyll:
echo "gaugesid: $(GAUGES_CODE)" > docs/_config.yml
echo "projecturl: $(PROJECT_URL)" >> docs/_config.yml
echo "basesite: http://www.unwiredcouch.com" >> docs/_config.yml
echo "markdown: redcarpet" >> docs/_config.yml
echo "---" > docs/index.md
echo "layout: project" >> docs/index.md
echo "title: restclient-cpp" >> docs/index.md
echo "---" >> docs/index.md
cat README.md >> docs/index.md
docs: doxygen jekyll
clean-docs:
rm -rf ./docs
deploy-docs: docs
@cd docs && git init && git remote add upstream "https://${GH_TOKEN}@github.com/mrtazz/$(NAME).git" && \
git submodule add https://github.com/mrtazz/jekyll-layouts.git ./_layouts && \
git submodule update --init && \
git fetch upstream && git reset upstream/gh-pages && \
git config user.name 'Daniel Schauenberg' && git config user.email [email protected] && \
touch . && git add -A . && \
git commit -m "rebuild pages at $(VERSION)" && \
git push -q upstream HEAD:gh-pages