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