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