]> sourceware.org Git - systemtap.git/blame - Makefile.am
Add the testsuite parallel testing feature.
[systemtap.git] / Makefile.am
CommitLineData
2f1a1aea
FCE
1# Makefile.am --- automake input file for systemtap
2## process this file with automake to produce Makefile.in
3
398edb63
JS
4# we don't maintain a ChangeLog, which makes us non-GNU -> foreign
5AUTOMAKE_OPTIONS = no-dist foreign
42b926b7 6
e460639f 7pkglibexecdir = ${libexecdir}/${PACKAGE}
b899aa79 8oldincludedir = ${includedir}/sys
e460639f 9
5e3b8687
RM
10AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \
11 -DSYSCONFDIR='"$(sysconfdir)"' \
8f223b3e 12 -DPKGDATADIR='"$(pkgdatadir)"' \
5e3b8687 13 -DPKGLIBDIR='"$(pkglibexecdir)"' \
8f223b3e 14 -DLOCALEDIR='"$(localedir)"' \
5e3b8687 15 -I$(srcdir)/includes -I$(builddir)/includes/sys
f00a8372 16
dabd71bb
MW
17AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Wextra -Werror -Wunused -Wformat=2 -W
18AM_CXXFLAGS = -Wall -Wextra -Werror
77de5e9e 19
a0fc7f8e 20bin_SCRIPTS = stap-report
961588fd 21pkglibexec_SCRIPTS = stap-env
5e3b8687 22oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h
6d14a4a9 23
1bb80d04
FCE
24bin_PROGRAMS =
25
6d14a4a9 26if BUILD_TRANSLATOR
645d2e52 27bin_PROGRAMS += stap
6d14a4a9
EB
28bin_SCRIPTS += dtrace
29
29000306 30pkglibexec_PROGRAMS =
1bb80d04 31
a0fc7f8e 32if HAVE_NSS
aeb9cc10 33pkglibexec_PROGRAMS += stap-sign-module stap-authorize-cert
a0fc7f8e 34
19a0d4b6 35if BUILD_SERVER
aeb9cc10 36pkglibexec_PROGRAMS += stap-serverd stap-gen-cert
1114c4f2 37bin_SCRIPTS += stap-server
aeb9cc10 38pkglibexec_SCRIPTS += stap-start-server stap-stop-server
19a0d4b6 39endif
a0fc7f8e 40endif
6d14a4a9 41
e2012a7a 42stap_SOURCES = main.cxx session.cxx \
f4b28491 43 parse.cxx staptree.cxx elaborate.cxx translate.cxx \
1b78aef5 44 tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \
912e8c59 45 cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \
8d9609f5 46 tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx tapset-netfilter.cxx \
93646f4d 47 tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \
3db9c843 48 tapset-utrace.cxx task_finder.cxx dwflpp.cxx rpm_finder.cxx \
f31a77f5 49 setupdwfl.cxx remote.cxx privilege.cxx cmdline.cxx \
0de35d9e
FCE
50 tapset-dynprobe.cxx tapset-method.cxx translator-output.cxx \
51 stapregex.cxx stapregex-tree.cxx stapregex-parse.cxx \
9ac12b89 52 stapregex-dfa.cxx stringtable.cxx
4d0d9e8a 53noinst_HEADERS = sdt_types.h
9ac12b89 54stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ -lpthread
6d14a4a9 55stap_DEPENDENCIES =
64b53440 56
9ac12b89
DS
57if HAVE_LIBREADLINE
58stap_SOURCES += interactive.cxx
59stap_LDADD += @READLINE_LIBS@
60endif
61
b0c670f4 62if BUILD_VIRT
64b53440
JL
63bin_PROGRAMS += stapvirt
64stapvirt_SOURCES = stapvirt.c
65stapvirt_CFLAGS = $(AM_CFLAGS)
66stapvirt_CFLAGS += $(libvirt_CFLAGS) $(libxml2_CFLAGS)
67stapvirt_LDFLAGS = $(AM_LDFLAGS)
68stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS)
69endif
64b53440 70
6d14a4a9 71endif
e9d58a72 72
8c0bea1f
FCE
73install: all
74 $(MAKE) $(AM_MAKEFLAGS) install-recursive
75
e434132f
FCE
76BUILT_SOURCES =
77CLEANFILES =
78
79# Arrange for git_version.h to be regenerated at every "make".
4040e9ea 80# Code fragment is based upon RadeonHD.am.
e434132f
FCE
81
82# The stamp file which is never created ensures that git_version.h is updated
83# before every build. Having git_version.h in foo_SOURCES ensures a recompile
84# of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES
85# instead of foo_SOURCES prevents shipping git_version.h in dist tarballs,
86# which may cause false GIT_FOO readings.
87BUILT_SOURCES += git_version.stamp
88CLEANFILES += git_version.h
89GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
90git_version.stamp:
91 @if test -f "$(srcdir)/git_version.h"; then \
92 if test -f "git_version.h"; then :; \
93 else \
94 cp "$(srcdir)/git_version.h" "git_version.h"; \
95 fi; \
96 fi
97 $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h
98 @if test -s "$(srcdir)/git_version.h"; then \
99 if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \
100 else \
101 echo "Error: $(srcdir)/git_version.h and git_version.h differ."; \
102 echo " You probably want to remove the former."; \
103 exit 1; \
104 fi; \
105 fi
106
c0f9d4b0
FCE
107git_version.h:
108 $(srcdir)/git_version.sh -k --srcdir $(srcdir) -o git_version.h
e9d58a72 109
8437928b 110cscope:
6cf88792
FCE
111 cd $(srcdir) && \
112 (echo -q ; git ls-files '*.cxx' '*.c' '*.h' | grep -v '^testsuite' ) > cscope.files && \
60c493ce 113 cscope -b -q @DYNINST_CXXFLAGS@
e434132f 114
6d14a4a9
EB
115PHONIES =
116if BUILD_TRANSLATOR
97859b9d 117stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@
0de35d9e 118stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ @cxx11@
a794dbeb 119stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2
8730f377 120stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
19a0d4b6 121
2dce8c42
DB
122if HAVE_AVAHI
123stap_CXXFLAGS += $(avahi_CFLAGS)
124stap_CPPFLAGS += $(avahi_CFLAGS)
f5a118c0 125stap_LDADD += $(avahi_LIBS)
2dce8c42
DB
126endif
127
2035bcd4 128if HAVE_NSS
c4fd15b4 129stap_SOURCES += nsscommon.cxx csclient.cxx cscommon.cxx
f5a118c0
DEP
130stap_CFLAGS += $(nss_CFLAGS) -DSTAP
131stap_CXXFLAGS += $(nss_CFLAGS)
132stap_CPPFLAGS += $(nss_CFLAGS)
133stap_LDADD += $(nss_LIBS)
a0fc7f8e 134
a0fc7f8e
DB
135install-exec-local: install-scripts
136
137PHONIES += install-scripts
138# scripts must be installed before this rule is run
961588fd 139install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS
a0fc7f8e 140 for f in $(bin_SCRIPTS); do \
961588fd
DB
141 sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \
142 done
143 for f in $(pkglibexec_SCRIPTS); do \
1114c4f2 144 sed -i -e "/INSTALL-HOOK/d;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \
a0fc7f8e
DB
145 done
146endif
337cd273 147
e460639f
RM
148if BUILD_ELFUTILS
149stap_CPPFLAGS += -Iinclude-elfutils
150stap_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \
151 -Wl,--enable-new-dtags,-rpath,$(pkglibdir)
b976b20e
FCE
152
153
e434132f 154BUILT_SOURCES += stamp-elfutils
e460639f
RM
155CLEANFILES += stamp-elfutils
156stamp-elfutils: config.status
b01369ba 157 $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all bin_PROGRAMS=
e460639f 158 for dir in libelf libebl libdw libdwfl backends; do \
e6364d79 159 $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils/$$dir bin_PROGRAMS= install; \
e460639f 160 done
e050d62f 161 $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils install-pkgincludeHEADERS;
e460639f 162 touch $@
1cecb3c5 163stap_DEPENDENCIES += lib-elfutils/libdw.so
e460639f
RM
164lib-elfutils/libdw.so: stamp-elfutils ;
165
337cd273 166PHONIES += install-elfutils
e460639f 167install-elfutils:
17a127da 168 mkdir -p $(DESTDIR)$(pkglibdir)
a3e695ac 169 for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \
17a127da 170 $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \
a3e695ac 171 done
e460639f
RM
172install-exec-local: install-elfutils
173endif
6d14a4a9 174endif
552276c8 175
c32d53de 176CLEANFILES += $(pkglibexec_PROGRAMS)
e460639f 177
6d14a4a9 178if BUILD_TRANSLATOR
a0fc7f8e 179if HAVE_NSS
aeb9cc10 180stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx
a530cfe0 181stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS)
f5a118c0
DEP
182stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)
183stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS)
e7081358 184stap_sign_module_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
f5a118c0 185stap_sign_module_LDADD = $(nss_LIBS)
aeb9cc10
DB
186
187stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx
188stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS)
f5a118c0
DEP
189stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)
190stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS)
e7081358 191stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
f5a118c0 192stap_authorize_cert_LDADD = $(nss_LIBS)
a0fc7f8e 193
6d14a4a9 194if BUILD_SERVER
73f52eb4 195stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx privilege.cxx nsscommon.cxx cmdline.cxx
f5a118c0
DEP
196stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)
197stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS)
e7081358 198stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
f7707c31 199stap_serverd_LDADD = $(nss_LIBS) -lpthread
43951734 200if HAVE_AVAHI
f5a118c0
DEP
201stap_serverd_CFLAGS += $(avahi_CFLAGS)
202stap_serverd_CXXFLAGS += $(avahi_CFLAGS)
203stap_serverd_LDADD += $(avahi_LIBS)
43951734 204endif
aeb9cc10
DB
205
206stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx
f5a118c0
DEP
207stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS)
208stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS)
e7081358 209stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
f5a118c0 210stap_gen_cert_LDADD = $(nss_LIBS)
a0fc7f8e 211endif
6d14a4a9
EB
212endif
213
5a5e5134 214noinst_PROGRAMS = loc2c-test
51e874a1 215loc2c_test_SOURCES = loc2c-test.c loc2c.c
5574ef2c 216loc2c_test_CFLAGS = $(stap_CFLAGS)
e460639f
RM
217loc2c_test_CPPFLAGS = $(stap_CPPFLAGS)
218loc2c_test_LDFLAGS = $(stap_LDFLAGS)
219loc2c_test_LDADD = $(stap_LDADD)
6d14a4a9 220endif
51e874a1 221
35a04c8e
FCE
222# crash(8) extension
223if BUILD_CRASHMOD
224STAPLOG=staplog.so
225
226$(STAPLOG): staplog.c
564eb0a8
DS
227 $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \
228 $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $<
551a4f58 229all-local: $(STAPLOG) example_index
35a04c8e 230install-exec-local: $(STAPLOG)
674427d3 231 $(MKDIR_P) $(DESTDIR)$(pkglibdir)
17a127da 232 $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
551a4f58
MW
233else
234all-local: example_index
35a04c8e
FCE
235endif
236
2f1a1aea
FCE
237# Get extra libs as needed
238LDADD =
239
ec4d1558 240EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples
551a4f58 241EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta
551a4f58 242
751f8288 243example_index: $(EXAMPLE_SOURCE_DIR)/index.html
551a4f58 244
751f8288 245$(EXAMPLE_SOURCE_DIR)/index.html: $(EXAMPLE_META_FILES) $(EXAMPLE_INDEX_GEN)
59ec9408
FCE
246 @echo "The script example index is outdated, run"
247 @echo " cd $(EXAMPLE_SOURCE_DIR) && \\ "
248 @echo " perl examples-index-gen.pl"
249 @echo "to regenerate it."
ec4d1558 250
ecfa3e8b 251install-data-local:
ef9e124a 252 (cd $(srcdir)/runtime; for f in *.[ch]; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/$$f; done)
b61527e5
JS
253if HAVE_DYNINST
254 (cd $(srcdir)/runtime/dyninst; find . \( -name '*.[ch]' \) -print \
255 | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/dyninst/$$f; done)
256endif
aaf2af3e
FCE
257 (cd $(srcdir)/runtime/unwind; find . \( -name '*.[ch]' \) -print \
258 | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/unwind/$$f; done)
ef9e124a
MH
259 (cd $(srcdir)/runtime/transport; for f in *.[ch]; \
260 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/transport/$$f; done)
7eaca571
JS
261 (cd $(srcdir)/runtime/linux; for f in *.[ch]; \
262 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/$$f; done)
263 (cd $(srcdir)/runtime/linux/uprobes; for f in Makefile *.[ch]; \
264 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes/$$f; done)
265 (cd $(srcdir)/runtime/linux/uprobes2; for f in *.[ch]; \
266 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes2/$$f; done)
b2103a16 267 (cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name '*.stpm' -o -name README \) -print \
ef9e124a 268 | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done)
751f8288 269 (cd $(srcdir)/testsuite/systemtap.examples; find . -type f -print \
7a92fcf7 270 | egrep -v 'check.exp|ChangeLog|examples-index-gen.pl|html/.*\.tmpl$$' \
5b8561dc
MW
271 | while read f; do if test -x $$f; then \
272 i_cmd="$(INSTALL_PROGRAM)"; else \
273 i_cmd="$(INSTALL_DATA)"; fi; \
274 $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done)
552276c8 275 test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap
60045090
DB
276if BUILD_SERVER
277 test -e $(DESTDIR)$(localstatedir)/run/stap-server || mkdir -p $(DESTDIR)$(localstatedir)/run/stap-server
278 test -e $(DESTDIR)$(localstatedir)/log || mkdir -p $(DESTDIR)$(localstatedir)/log
279endif
b46393fc 280
ecfa3e8b 281
e885b2ec
WC
282TEST_COV_DIR = coverage
283
af56020f 284gcov:
62700107
FCE
285 find . -name '*.gc*' | xargs rm -f
286 $(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" CFLAGS="-g -fprofile-arcs -ftest-coverage" all install
287 -sudo $(MAKE) installcheck $${RUNTESTFLAGS+RUNTESTFLAGS=$${RUNTESTFLAGS}}
288 for dir in $(SUBDIRS); do \
289 (cd $$dir; gcov *.gcno > SUMMARY.gcov 2>&1 || true); \
290 done
291 find . -name '*.gcov'
e885b2ec 292
1e7ad3bf 293clean-local:
62700107 294 rm -rf ${PACKAGE_TARNAME}-*.tar.gz
f00a8372 295 rm -rf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}
e885b2ec
WC
296 rm -rf $(TEST_COV_DIR)
297 rm -rf stap.info
35a04c8e 298 rm -rf staplog.so
1c4cf93d
MW
299
300distclean-local:
daae650d 301 rm -rf build-elfutils include-elfutils lib-elfutils
5409bb17 302 rm -f doc/beginners/en-US doc/beginners/build/en-US/testsuite
4d4f412b
FCE
303
304uninstall-local:
305 rm -rf $(DESTDIR)$(pkgdatadir)
35a04c8e 306 rm -rf $(DESTDIR)$(libdir)/$(PACKAGE)
4d4f412b 307 -rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE)
ec4d1558
MW
308 @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
309 echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \
310 rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \
311 done
312 @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \
313 echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \
314 rm -f "$(DEMO_INSTALL_DIR)/$$p"; \
315 done
316 @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
317 echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \
318 rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \
319 done
8cd5d9f0 320 rm -rf $(DESTDIR)$(sysconfdir)/systemtap
e1335449 321 rm -rf $(DESTDIR)$(docdir)/examples
60045090
DB
322if BUILD_SERVER
323 rm -rf $(DESTDIR)$(localstatedir)/run/stap-server
2648a9b4 324 rm -f $(DESTDIR)$(localstatedir)/log/stap-server/log
60045090 325endif
8129fd92 326
db887d2c 327SUBDIRS = . java stapdyn staprun doc man po
62700107 328# NB: the gcov target above uses this to enumarate linked binaries' build directories
2a650e10 329DIST_SUBDIRS = testsuite $(SUBDIRS)
e6e2c7bb 330EXTRA_DIST = m4/ChangeLog
5ba96b90 331
4b3c90da 332check-local:
17a127da 333 SRCDIR=`cd $(srcdir); pwd`; \
818ba2bc 334 PWD=`pwd`; \
645d2e52 335 $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$LD_LIBRARY_PATH$${LD_LIBRARY_PATH:+:}$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)" PKGLIBDIR="$(pkglibexecdir)";
5ba96b90
FCE
336
337installcheck:
20fb5020
MW
338 if test \! -e $(DESTDIR)$(bindir)/stap; then \
339 echo $(DESTDIR)$(bindir)/stap doesn\'t exist, run make install; \
340 exit -1; \
0e47827d 341 fi; \
20fb5020
MW
342 if test $(builddir)/stap -nt $(DESTDIR)$(bindir)/stap; then \
343 echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \
344 exit -1; \
d5658775 345 fi;
a5b17365 346 $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)"
8f3c45cc 347
8093ef39
MC
348installcheck-parallel:
349 if test \! -e $(DESTDIR)$(bindir)/stap; then \
350 echo $(DESTDIR)$(bindir)/stap doesn\'t exist, run make install; \
351 exit -1; \
352 fi; \
353 if test $(builddir)/stap -nt $(DESTDIR)$(bindir)/stap; then \
354 echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \
355 exit -1; \
356 fi;
357 $(MAKE) -C testsuite installcheck-parallel RUNTESTFLAGS="$(RUNTESTFLAGS)"
358
cb3f3970
RM
359PHONIES += runcheck
360# All the variables are overridden by run-stap, but SYSTEMTAP_RUNTIME
361# is used by the testsuite scripts themselves.
29000306 362runcheck: testsuite/stap testsuite/dtrace
cb3f3970
RM
363 $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" \
364 SYSTEMTAP_PATH="`cd testsuite; pwd`" \
365 SYSTEMTAP_RUNTIME="`cd $(srcdir)/runtime; pwd`"
366testsuite/stap: run-stap
7c28c54e 367 (echo '#!/bin/sh'; echo "exec `pwd`/run-stap" '$${1+"$$@"}') > $@.new
29000306
RM
368 chmod 555 $@.new
369 mv -f $@.new $@
370testsuite/dtrace: dtrace
7c28c54e 371 (echo '#!/bin/sh'; echo "exec `pwd`/dtrace" '$${1+"$$@"}') > $@.new
cb3f3970
RM
372 chmod 555 $@.new
373 mv -f $@.new $@
4040e9ea 374
4075df88
FCE
375PHONIES += update-po
376update-po:
a54d79ce 377 (cd $(srcdir); ls -1d *.c *.cxx *.h staprun/*.c staprun/*.h) \
ce0f6648 378 | grep -v loc2c-test.c \
eeacd9d4
LB
379 | grep -v config.h \
380 | grep -v git_version.h \
02311ab4 381 | grep -v staprun/config.h \
4075df88
FCE
382 | sort > $(srcdir)/po/POTFILES.in
383 $(MAKE) -C po update-po
efbfa04e 384 @echo
977e0c06 385 @echo if systemtam.pot is shown as modified ...
efbfa04e 386 @echo
977e0c06
FCE
387 (cd $(srcdir)/po; git status *.pot)
388 @echo
389 @echo ... then check in with zanata ...
390 @echo
391 @echo % cd $(srcdir)
3296a1a2
FCE
392 @echo % zanata-cli -B push -s po -t po
393 @echo % zanata-cli -B pull -s po -t po
977e0c06
FCE
394 @echo
395 @echo if the .po files are shown as modified ...
396 @echo
397 (cd $(srcdir)/po; git status *.po)
398 @echo
399 @echo ... regenerate just once ...
400 @echo
401 @echo % $(MAKE) -C `pwd` update-po
4075df88
FCE
402
403
4040e9ea
FCE
404# Any extra flags, such as:
405# --define "with_docs 0"
406# --define "with_bundled_elfutils 1" --define "elfutils_version 0.135"
407RPMBUILDFLAGS=
408
0265eef0 409PHONIES += dist-gzip rpm srpm
337cd273 410
3620fb20
JS
411PHONIES += uprobes install-uprobes
412uprobes:
413 $(MAKE) -C $(srcdir)/runtime/uprobes clean default
414install-uprobes:
415 $(MAKE) -C $(DESTDIR)$(pkgdatadir)/runtime/uprobes clean default
416
337cd273
FCE
417.PHONY: $(PHONIES)
418
813ed4cb 419dist-gzip:
4040e9ea
FCE
420 cd $(srcdir); git status | grep working.directory.clean || (echo "You should commit your changes before 'make rpm'.")
421 (cd $(srcdir); git archive --prefix=systemtap-$(VERSION)/ --format=tar HEAD) | gzip > systemtap-$(VERSION).tar.gz
813ed4cb 422
9b2e2b58 423rpm: dist-gzip
08f99919 424 if [ `id -u` = 0 ]; then echo NOTE: do not run this as root; exit 1; fi
7ec1c6bc
JL
425 if [ ! -w `rpm --eval %_topdir` ]; then \
426 echo WARNING: you do not have access to `rpm --eval %_topdir`; \
427 echo WARNING: you may receive a permission denied error; \
428 echo WARNING: consider adding \'%_topdir $(HOME)/rpmbuild\' to $(HOME)/.rpmmacros; \
429 fi
4040e9ea
FCE
430 mkdir -p `rpm --eval %_specdir`
431 mkdir -p `rpm --eval %_srcrpmdir`
432 mkdir -p `rpm --eval %_rpmdir`
433 mkdir -p `rpm --eval %_builddir`
434 mkdir -p `rpm --eval %_buildroot`
435 rpmbuild --define "_sourcedir $(PWD)/" -ta systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS)
8f223b3e 436
0265eef0
JS
437srpm: dist-gzip
438 mkdir -p `rpm --eval %_srcrpmdir`
439 rpmbuild --define "_sourcedir $(PWD)/" -ts systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS)
440
8f223b3e 441ACLOCAL_AMFLAGS = -I m4
This page took 0.193337 seconds and 5 git commands to generate.