forked from Juniper/libxo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
160 lines (130 loc) · 4.51 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#
# $Id$
#
# Copyright 2014, Juniper Networks, Inc.
# All rights reserved.
# This SOFTWARE is licensed under the LICENSE provided in the
# ../Copyright file. By downloading, installing, copying, or otherwise
# using the SOFTWARE, you agree to be bound by the terms of that
# LICENSE.
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = bin libxo xo xopo xolint xohtml tests doc encoder
bin_SCRIPTS=libxo-config
dist_doc_DATA = Copyright
EXTRA_DIST = \
libxo-config.in \
warnings.mk \
README.md \
INSTALL.md \
packaging/libxo.spec
.PHONY: test tests
test tests:
@(cd tests ; ${MAKE} test)
errors:
@(cd tests/errors ; ${MAKE} test)
docs:
@(cd doc ; ${MAKE} docs)
DIST_FILES_DIR = ~/Dropbox/dist-files/
GH_PAGES_DIR = gh-pages/
GH_PAGES_DIR_VER = gh-pages/${PACKAGE_VERSION}
PACKAGE_FILE = ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.gz
XOHTML_FILES = \
${top_srcdir}/xohtml/xohtml.css \
${top_srcdir}/xohtml/xohtml.js \
${top_srcdir}/xohtml/external/jquery.js \
${top_srcdir}/xohtml/external/jquery.qtip.css \
${top_srcdir}/xohtml/external/jquery.qtip.js
upload: dist upload-docs upload-xohtml-files
@echo "Remember to run:"
@echo " gt tag ${PACKAGE_VERSION}"
upload-docs: docs upload-html
upload-html:
@echo "Uploading html ... "
@-[ -d ${GH_PAGES_DIR} -a -d doc/html ] \
&& echo "Updating html on gh-pages ..." \
&& mkdir -p ${GH_PAGES_DIR_VER}/html \
&& cp doc/top-link.html ${GH_PAGES_DIR}/libxo.html \
&& cp -r doc/html/* ${GH_PAGES_DIR_VER}/html/ \
&& (cd ${GH_PAGES_DIR} \
&& git add libxo.html \
&& git add ${PACKAGE_VERSION}/html \
&& git commit -m 'new docs' \
libxo.html ${PACKAGE_VERSION}/html \
&& git push origin gh-pages ) ; true
upload-xohtml-files:
@echo "Uploading xohtml files ... "
@-[ -d ${GH_PAGES_DIR} ] \
&& echo "Updating xohtml files on gh-pages ..." \
&& mkdir -p ${GH_PAGES_DIR_VER}/xohtml \
&& cp ${XOHTML_FILES} ${GH_PAGES_DIR_VER}/xohtml \
&& (cd ${GH_PAGES_DIR} \
&& git add ${PACKAGE_VERSION}/xohtml \
&& git commit -m 'new xohtml files' \
${PACKAGE_VERSION}/xohtml \
&& git push origin gh-pages ) ; true
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = packaging/${PACKAGE_NAME}.pc
get-wiki:
git clone https://github.com/Juniper/${PACKAGE_NAME}.wiki.git wiki
get-gh-pages:
git clone https://github.com/Juniper/${PACKAGE_NAME}.git \
gh-pages -b gh-pages
UPDATE_PACKAGE_FILE = \
-e "s;__SHA1__;$$SHA1;" \
-e "s;__SHA256__;SHA256 (textproc/${PACKAGE_FILE}) = $$SHA256;" \
-e "s;__SIZE__;SIZE (textproc/${PACKAGE_FILE}) = $$SIZE;"
GH_PACKAGING_DIR = ${PACKAGE_VERSION}/packaging
GH_PAGES_PACKAGE_DIR = ${GH_PAGES_DIR}/${GH_PACKAGING_DIR}
packages:
@-[ -d ${GH_PAGES_DIR} ] && set -x \
&& echo "Updating packages on gh-pages ..." \
&& mkdir -p ${GH_PAGES_DIR}/${GH_PACKAGING_DIR} \
&& SHA1="`openssl sha1 ${PACKAGE_FILE} | awk '{print $$2}'`" \
&& SHA256="`openssl sha256 ${PACKAGE_FILE} | awk '{print $$2}'`" \
&& SIZE="`ls -l ${PACKAGE_FILE} | awk '{print $$5}'`" \
&& echo "... ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.rb ..." \
&& sed ${UPDATE_PACKAGE_FILE} \
packaging/${PACKAGE_NAME}.rb.base \
> ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.rb \
&& echo "... ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.spec ..." \
&& cp packaging/${PACKAGE_NAME}.spec \
${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.spec \
&& (cd ${GH_PAGES_DIR} \
&& git add ${GH_PACKAGING_DIR} \
&& git add ${GH_PACKAGING_DIR}/libxo.rb \
${GH_PACKAGING_DIR}/libxo.spec \
&& git commit -m 'new packaging data' \
${GH_PACKAGING_DIR} \
&& git push origin gh-pages ) ; true
ANALYZE_DIR = ~/trash/libxo
ANALYZE_CMD = scan-build-mp-3.6
analyze:
${MAKE} clean
${ANALYZE_CMD} -o ${ANALYZE_DIR} ${MAKE}
SANIFLAGS=-fno-omit-frame-pointer -g -O2
sanitize-address:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=address ${SANIFLAGS}"
${MAKE} install
${MAKE} test
sanitize-undefined:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=undefined ${SANIFLAGS}"
${MAKE} install
${MAKE} test
sanitize-memory:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=memory ${SANIFLAGS}"
${MAKE} install
${MAKE} test
TEST=tests/core/.libs/test_13
TEST_ARGS=big 10m null
TEST_TYPE=Time Profiler
instruments: instruments.prep instruments.run instruments.open
instruments.prep:
dsymutil ${TEST}.test
instruments.run:
rm -fr ${TEST}.trace
instruments -t '${TEST_TYPE}' -D ${TEST}.trace ${TEST}.test ${TEST_ARGS}
instruments.open:
open -a Instruments ${TEST}.trace