]>
Commit | Line | Data |
---|---|---|
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 |
5 | AUTOMAKE_OPTIONS = no-dist foreign | |
42b926b7 | 6 | |
e460639f | 7 | pkglibexecdir = ${libexecdir}/${PACKAGE} |
b899aa79 | 8 | oldincludedir = ${includedir}/sys |
e460639f | 9 | |
79a7b65c | 10 | AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' -I$(srcdir)/includes |
f00a8372 | 11 | |
8558d392 | 12 | AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W |
a4531d21 | 13 | AM_CXXFLAGS = -Wall -Werror |
77de5e9e | 14 | |
6d14a4a9 | 15 | man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap stapex.3stap \ |
e97c0b29 WC |
16 | staprun.8 \ |
17 | man/stapprobes.iosched.3stap man/stapprobes.netdev.3stap \ | |
18 | man/stapprobes.nfs.3stap man/stapprobes.nfsd.3stap \ | |
1f65cc4f | 19 | man/stapprobes.pagefault.3stap man/stapprobes.kprocess.3stap \ |
e97c0b29 WC |
20 | man/stapprobes.rpc.3stap man/stapprobes.scsi.3stap \ |
21 | man/stapprobes.signal.3stap man/stapprobes.socket.3stap \ | |
22 | man/stapprobes.tcp.3stap man/stapprobes.udp.3stap | |
4040e9ea FCE |
23 | # see also configure.ac |
24 | ||
6d14a4a9 | 25 | bin_PROGRAMS = staprun |
a0fc7f8e | 26 | bin_SCRIPTS = stap-report |
edecda6c | 27 | pkglibexec_PROGRAMS = stapio |
961588fd | 28 | pkglibexec_SCRIPTS = stap-env |
818ba2bc | 29 | oldinclude_HEADERS = includes/sys/sdt.h |
6d14a4a9 EB |
30 | |
31 | if BUILD_TRANSLATOR | |
32 | bin_PROGRAMS += stap | |
33 | man_MANS += stap.1 | |
34 | bin_SCRIPTS += dtrace | |
35 | ||
a0fc7f8e | 36 | if HAVE_NSS |
31f9baea | 37 | man_MANS += stap-authorize-signing-cert.8 |
edecda6c DB |
38 | bin_SCRIPTS += stap-authorize-signing-cert |
39 | pkglibexec_PROGRAMS += stap-sign-module | |
40 | pkglibexec_SCRIPTS += stap-gen-cert stap-authorize-cert | |
a0fc7f8e | 41 | |
19a0d4b6 | 42 | if BUILD_SERVER |
31f9baea | 43 | man_MANS += stap-client.8 stap-server.8 stap-authorize-server-cert.8 |
edecda6c | 44 | pkglibexec_PROGRAMS += stap-client-connect stap-server-connect |
60045090 DB |
45 | bin_SCRIPTS += stap-client stap-server stap-authorize-server-cert |
46 | pkglibexec_SCRIPTS += stap-serverd stap-server-request stap-find-servers \ | |
edecda6c | 47 | stap-start-server stap-find-or-start-server stap-stop-server |
19a0d4b6 | 48 | endif |
a0fc7f8e | 49 | endif |
6d14a4a9 | 50 | |
56e12059 | 51 | stap_SOURCES = main.cxx \ |
f4b28491 | 52 | parse.cxx staptree.cxx elaborate.cxx translate.cxx \ |
1b78aef5 | 53 | tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ |
912e8c59 | 54 | cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \ |
01c2eefe | 55 | tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx \ |
93646f4d | 56 | tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \ |
3db9c843 MW |
57 | tapset-utrace.cxx task_finder.cxx dwflpp.cxx rpm_finder.cxx \ |
58 | setupdwfl.cxx | |
2ed04863 | 59 | stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @rpm_LIBS@ |
6d14a4a9 EB |
60 | stap_DEPENDENCIES = |
61 | endif | |
e9d58a72 | 62 | |
e434132f FCE |
63 | BUILT_SOURCES = |
64 | CLEANFILES = | |
65 | ||
66 | # Arrange for git_version.h to be regenerated at every "make". | |
4040e9ea | 67 | # Code fragment is based upon RadeonHD.am. |
e434132f FCE |
68 | |
69 | # The stamp file which is never created ensures that git_version.h is updated | |
70 | # before every build. Having git_version.h in foo_SOURCES ensures a recompile | |
71 | # of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES | |
72 | # instead of foo_SOURCES prevents shipping git_version.h in dist tarballs, | |
73 | # which may cause false GIT_FOO readings. | |
74 | BUILT_SOURCES += git_version.stamp | |
75 | CLEANFILES += git_version.h | |
76 | GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh | |
77 | git_version.stamp: | |
78 | @if test -f "$(srcdir)/git_version.h"; then \ | |
79 | if test -f "git_version.h"; then :; \ | |
80 | else \ | |
81 | cp "$(srcdir)/git_version.h" "git_version.h"; \ | |
82 | fi; \ | |
83 | fi | |
84 | $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h | |
85 | @if test -s "$(srcdir)/git_version.h"; then \ | |
86 | if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \ | |
87 | else \ | |
88 | echo "Error: $(srcdir)/git_version.h and git_version.h differ."; \ | |
89 | echo " You probably want to remove the former."; \ | |
90 | exit 1; \ | |
91 | fi; \ | |
92 | fi | |
93 | ||
c0f9d4b0 FCE |
94 | git_version.h: |
95 | $(srcdir)/git_version.sh -k --srcdir $(srcdir) -o git_version.h | |
e9d58a72 | 96 | |
8437928b | 97 | cscope: |
6cf88792 FCE |
98 | cd $(srcdir) && \ |
99 | (echo -q ; git ls-files '*.cxx' '*.c' '*.h' | grep -v '^testsuite' ) > cscope.files && \ | |
8437928b | 100 | cscope -b -q |
e434132f | 101 | |
6d14a4a9 EB |
102 | PHONIES = |
103 | if BUILD_TRANSLATOR | |
6ca3a004 | 104 | stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ -D_FILE_OFFSET_BITS=64 |
5574ef2c | 105 | stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ |
e460639f | 106 | stap_CPPFLAGS = $(AM_CPPFLAGS) |
8730f377 | 107 | stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ |
19a0d4b6 | 108 | |
2035bcd4 | 109 | if HAVE_NSS |
1cecb3c5 DB |
110 | stap_client_connect_LDFLAGS = $(AM_LDFLAGS) |
111 | stap_server_connect_LDFLAGS = $(AM_LDFLAGS) | |
b9c1510e | 112 | stap_sign_module_LDFLAGS = $(AM_LDFLAGS) |
a0fc7f8e DB |
113 | |
114 | if BUILD_SERVER | |
115 | install-exec-local: install-scripts | |
116 | ||
117 | PHONIES += install-scripts | |
118 | # scripts must be installed before this rule is run | |
961588fd | 119 | install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS |
a0fc7f8e | 120 | for f in $(bin_SCRIPTS); do \ |
961588fd DB |
121 | sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ |
122 | done | |
123 | for f in $(pkglibexec_SCRIPTS); do \ | |
60045090 | 124 | sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ |
a0fc7f8e DB |
125 | done |
126 | endif | |
19a0d4b6 | 127 | endif |
337cd273 | 128 | |
e460639f RM |
129 | if BUILD_ELFUTILS |
130 | stap_CPPFLAGS += -Iinclude-elfutils | |
131 | stap_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ | |
132 | -Wl,--enable-new-dtags,-rpath,$(pkglibdir) | |
b976b20e FCE |
133 | |
134 | ||
e434132f | 135 | BUILT_SOURCES += stamp-elfutils |
e460639f RM |
136 | CLEANFILES += stamp-elfutils |
137 | stamp-elfutils: config.status | |
b01369ba | 138 | $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all bin_PROGRAMS= |
e460639f | 139 | for dir in libelf libebl libdw libdwfl backends; do \ |
b01369ba | 140 | $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils/$$dir bin_PROGRAMS= install; \ |
e460639f RM |
141 | done |
142 | touch $@ | |
1cecb3c5 | 143 | stap_DEPENDENCIES += lib-elfutils/libdw.so |
e460639f RM |
144 | lib-elfutils/libdw.so: stamp-elfutils ; |
145 | ||
337cd273 | 146 | PHONIES += install-elfutils |
e460639f | 147 | install-elfutils: |
17a127da | 148 | mkdir -p $(DESTDIR)$(pkglibdir) |
a3e695ac | 149 | for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \ |
17a127da | 150 | $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \ |
a3e695ac | 151 | done |
e460639f RM |
152 | install-exec-local: install-elfutils |
153 | endif | |
d04cf5ff | 154 | |
6d14a4a9 | 155 | endif |
552276c8 | 156 | |
98aab489 | 157 | staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/staprun_funcs.c\ |
337cd273 | 158 | runtime/staprun/ctl.c runtime/staprun/common.c |
e65b03c1 | 159 | |
7651c16b | 160 | staprun_CPPFLAGS = $(AM_CPPFLAGS) |
6ca3a004 | 161 | staprun_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ -DSINGLE_THREADED -fno-strict-aliasing -fno-builtin-strftime -D_FILE_OFFSET_BITS=64 |
5574ef2c | 162 | staprun_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ |
47f390f9 | 163 | staprun_LDADD = |
2f1a1aea | 164 | |
2035bcd4 DB |
165 | if HAVE_NSS |
166 | staprun_SOURCES += runtime/staprun/modverify.c nsscommon.c | |
167 | staprun_CFLAGS += $(nss_CFLAGS) $(nspr_CFLAGS) | |
e3851784 | 168 | staprun_LDADD += -lnss3 -lnspr4 |
2035bcd4 DB |
169 | endif |
170 | ||
98aab489 DS |
171 | stapio_SOURCES = runtime/staprun/stapio.c \ |
172 | runtime/staprun/mainloop.c runtime/staprun/common.c \ | |
4776796a | 173 | runtime/staprun/ctl.c \ |
4040e9ea | 174 | runtime/staprun/relay.c runtime/staprun/relay_old.c |
47f390f9 | 175 | stapio_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ -fno-strict-aliasing -fno-builtin-strftime |
5574ef2c | 176 | stapio_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ |
47f390f9 | 177 | stapio_LDADD = -lpthread |
98aab489 | 178 | |
1cecb3c5 | 179 | |
98aab489 | 180 | install-exec-hook: |
7ab87feb FCE |
181 | if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi |
182 | ||
183 | # Why the "id -u" condition? This way, an unprivileged user can run | |
184 | # make install, and have "sudo stap ...." or "sudo staprun ...." work later. | |
185 | ||
98aab489 | 186 | |
961588fd | 187 | CLEANFILES += $(pkglibexec_PROGRAMS) $(pkglibexec_SCRIPTS) |
e460639f | 188 | |
6d14a4a9 | 189 | if BUILD_TRANSLATOR |
a0fc7f8e DB |
190 | if HAVE_NSS |
191 | stap_sign_module_SOURCES = modsign.cxx nsscommon.c | |
192 | stap_sign_module_CPPFLAGS = -Wall -Werror $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) | |
193 | stap_sign_module_LDADD = -lnss3 -lnspr4 | |
194 | ||
6d14a4a9 | 195 | if BUILD_SERVER |
739cf687 | 196 | stap_client_connect_SOURCES = stap-client-connect.c nsscommon.c |
6d14a4a9 | 197 | stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) |
e3851784 | 198 | stap_client_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 |
6d14a4a9 | 199 | |
739cf687 | 200 | stap_server_connect_SOURCES = stap-server-connect.c nsscommon.c |
6d14a4a9 | 201 | stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) |
e3851784 | 202 | stap_server_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 |
a0fc7f8e | 203 | endif |
6d14a4a9 EB |
204 | endif |
205 | ||
5a5e5134 | 206 | noinst_PROGRAMS = loc2c-test |
51e874a1 | 207 | loc2c_test_SOURCES = loc2c-test.c loc2c.c |
5574ef2c | 208 | loc2c_test_CFLAGS = $(stap_CFLAGS) |
e460639f RM |
209 | loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) |
210 | loc2c_test_LDFLAGS = $(stap_LDFLAGS) | |
211 | loc2c_test_LDADD = $(stap_LDADD) | |
6d14a4a9 | 212 | endif |
51e874a1 | 213 | |
35a04c8e FCE |
214 | # crash(8) extension |
215 | if BUILD_CRASHMOD | |
216 | STAPLOG=staplog.so | |
217 | ||
218 | $(STAPLOG): staplog.c | |
564eb0a8 DS |
219 | $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \ |
220 | $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $< | |
551a4f58 | 221 | all-local: $(STAPLOG) example_index |
35a04c8e | 222 | install-exec-local: $(STAPLOG) |
674427d3 | 223 | $(MKDIR_P) $(DESTDIR)$(pkglibdir) |
17a127da | 224 | $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir) |
551a4f58 MW |
225 | else |
226 | all-local: example_index | |
35a04c8e FCE |
227 | endif |
228 | ||
2f1a1aea FCE |
229 | # Get extra libs as needed |
230 | LDADD = | |
231 | ||
ec4d1558 | 232 | EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples |
551a4f58 | 233 | EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta |
551a4f58 | 234 | |
751f8288 | 235 | example_index: $(EXAMPLE_SOURCE_DIR)/index.html |
551a4f58 | 236 | |
751f8288 | 237 | $(EXAMPLE_SOURCE_DIR)/index.html: $(EXAMPLE_META_FILES) $(EXAMPLE_INDEX_GEN) |
59ec9408 FCE |
238 | @echo "The script example index is outdated, run" |
239 | @echo " cd $(EXAMPLE_SOURCE_DIR) && \\ " | |
240 | @echo " perl examples-index-gen.pl" | |
241 | @echo "to regenerate it." | |
ec4d1558 | 242 | |
ecfa3e8b | 243 | install-data-local: |
ef9e124a | 244 | (cd $(srcdir)/runtime; for f in *.[ch]; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/$$f; done) |
aaf2af3e FCE |
245 | (cd $(srcdir)/runtime/unwind; find . \( -name '*.[ch]' \) -print \ |
246 | | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/unwind/$$f; done) | |
ef9e124a MH |
247 | (cd $(srcdir)/runtime/transport; for f in *.[ch]; \ |
248 | do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/transport/$$f; done) | |
6274464e | 249 | (cd $(srcdir)/runtime/uprobes; for f in Makefile *.[ch]; \ |
36b16282 | 250 | do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/uprobes/$$f; done) |
904b272c JK |
251 | (cd $(srcdir)/runtime/uprobes2; for f in *.[ch]; \ |
252 | do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/uprobes2/$$f; done) | |
4b2c4ab5 | 253 | (cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name README \) -print \ |
ef9e124a | 254 | | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done) |
751f8288 | 255 | (cd $(srcdir)/testsuite/systemtap.examples; find . -type f -print \ |
9b3f22a9 | 256 | | egrep -v 'check.exp|ChangeLog|examples-index-gen.pl' \ |
5b8561dc MW |
257 | | while read f; do if test -x $$f; then \ |
258 | i_cmd="$(INSTALL_PROGRAM)"; else \ | |
259 | i_cmd="$(INSTALL_DATA)"; fi; \ | |
260 | $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) | |
552276c8 | 261 | test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap |
60045090 DB |
262 | if BUILD_SERVER |
263 | test -e $(DESTDIR)$(localstatedir)/run/stap-server || mkdir -p $(DESTDIR)$(localstatedir)/run/stap-server | |
264 | test -e $(DESTDIR)$(localstatedir)/log || mkdir -p $(DESTDIR)$(localstatedir)/log | |
265 | endif | |
ecfa3e8b | 266 | |
e885b2ec WC |
267 | TEST_COV_DIR = coverage |
268 | ||
af56020f | 269 | gcov: |
e885b2ec | 270 | @-$(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" all check |
af56020f | 271 | @gcov *.gcno >/dev/null 2>&1 |
af56020f FCE |
272 | @rm -f `ls -1 *.gcov | fgrep -v .cxx.gcov` |
273 | ls -l *.cxx.gcov | |
274 | ||
e885b2ec WC |
275 | lcov: |
276 | @lcov --directory . -z | |
277 | @-$(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" all check | |
278 | @lcov --directory . -c -o stap.info | |
279 | @genhtml -o ./$(TEST_COV_DIR) stap.info | |
280 | ||
1e7ad3bf | 281 | clean-local: |
f00a8372 RM |
282 | rm -f *.gcov *.gcno *.gcda ${PACKAGE_TARNAME}-*.tar.gz |
283 | rm -rf ${PACKAGE_TARNAME}-${PACKAGE_VERSION} | |
e885b2ec WC |
284 | rm -rf $(TEST_COV_DIR) |
285 | rm -rf stap.info | |
35a04c8e | 286 | rm -rf staplog.so |
1c4cf93d MW |
287 | |
288 | distclean-local: | |
daae650d | 289 | rm -rf build-elfutils include-elfutils lib-elfutils |
4d4f412b FCE |
290 | |
291 | uninstall-local: | |
292 | rm -rf $(DESTDIR)$(pkgdatadir) | |
35a04c8e | 293 | rm -rf $(DESTDIR)$(libdir)/$(PACKAGE) |
4d4f412b | 294 | -rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE) |
ec4d1558 MW |
295 | @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ |
296 | echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \ | |
297 | rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \ | |
298 | done | |
299 | @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \ | |
300 | echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \ | |
301 | rm -f "$(DEMO_INSTALL_DIR)/$$p"; \ | |
302 | done | |
303 | @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \ | |
304 | echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \ | |
305 | rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \ | |
306 | done | |
8cd5d9f0 | 307 | rm -rf $(DESTDIR)$(sysconfdir)/systemtap |
e1335449 | 308 | rm -rf $(DESTDIR)$(docdir)/examples |
60045090 DB |
309 | if BUILD_SERVER |
310 | rm -rf $(DESTDIR)$(localstatedir)/run/stap-server | |
311 | rm -f $(DESTDIR)$(localstatedir)/log/stap-server.log | |
312 | endif | |
8129fd92 | 313 | |
1087b83f TM |
314 | SUBDIRS = doc grapher |
315 | DIST_SUBDIRS = testsuite $(SUBDIRS) | |
5ba96b90 | 316 | |
4b3c90da | 317 | check-local: |
17a127da | 318 | SRCDIR=`cd $(srcdir); pwd`; \ |
818ba2bc | 319 | PWD=`pwd`; \ |
edecda6c | 320 | $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)" PKGLIBDIR="$(pkglibexecdir)"; |
5ba96b90 FCE |
321 | |
322 | installcheck: | |
20fb5020 MW |
323 | if test \! -e $(DESTDIR)$(bindir)/stap; then \ |
324 | echo $(DESTDIR)$(bindir)/stap doesn\'t exist, run make install; \ | |
325 | exit -1; \ | |
0e47827d | 326 | fi; \ |
20fb5020 MW |
327 | if test $(builddir)/stap -nt $(DESTDIR)$(bindir)/stap; then \ |
328 | echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \ | |
329 | exit -1; \ | |
d5658775 | 330 | fi; |
a5b17365 | 331 | $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" |
8f3c45cc | 332 | |
4040e9ea FCE |
333 | |
334 | # Any extra flags, such as: | |
335 | # --define "with_docs 0" | |
336 | # --define "with_bundled_elfutils 1" --define "elfutils_version 0.135" | |
337 | RPMBUILDFLAGS= | |
338 | ||
337cd273 FCE |
339 | PHONIES += dist-gzip |
340 | ||
341 | .PHONY: $(PHONIES) | |
342 | ||
813ed4cb | 343 | dist-gzip: |
4040e9ea FCE |
344 | cd $(srcdir); git status | grep working.directory.clean || (echo "You should commit your changes before 'make rpm'.") |
345 | (cd $(srcdir); git archive --prefix=systemtap-$(VERSION)/ --format=tar HEAD) | gzip > systemtap-$(VERSION).tar.gz | |
813ed4cb | 346 | |
9b2e2b58 | 347 | rpm: dist-gzip |
4040e9ea FCE |
348 | mkdir -p `rpm --eval %_specdir` |
349 | mkdir -p `rpm --eval %_srcrpmdir` | |
350 | mkdir -p `rpm --eval %_rpmdir` | |
351 | mkdir -p `rpm --eval %_builddir` | |
352 | mkdir -p `rpm --eval %_buildroot` | |
353 | rpmbuild --define "_sourcedir $(PWD)/" -ta systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) |