diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index f1418d6c..4d0f2e1e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,8 @@ man/stapprobes.tcp.3stap man/stapprobes.udp.3stap bin_PROGRAMS = staprun bin_SCRIPTS = stap-report +pkglibexec_PROGRAMS = stapio +pkglibexec_SCRIPTS = stap-env oldinclude_HEADERS = includes/sys/sdt.h if BUILD_TRANSLATOR @@ -33,15 +35,16 @@ bin_SCRIPTS += dtrace if HAVE_NSS man_MANS += stap-authorize-signing-cert.8 -bin_PROGRAMS += stap-sign-module -bin_SCRIPTS += stap-env stap-gen-cert stap-authorize-cert stap-authorize-signing-cert +bin_SCRIPTS += stap-authorize-signing-cert +pkglibexec_PROGRAMS += stap-sign-module +pkglibexec_SCRIPTS += stap-gen-cert stap-authorize-cert if BUILD_SERVER man_MANS += stap-client.8 stap-server.8 stap-authorize-server-cert.8 -bin_PROGRAMS += stap-client-connect stap-server-connect -bin_SCRIPTS += stap-client stap-serverd stap-server stap-find-servers \ - stap-start-server stap-find-or-start-server stap-stop-server \ - stap-authorize-server-cert +pkglibexec_PROGRAMS += stap-client-connect stap-server-connect +bin_SCRIPTS += stap-client stap-server stap-authorize-server-cert +pkglibexec_SCRIPTS += stap-serverd stap-server-request stap-find-servers \ + stap-start-server stap-find-or-start-server stap-stop-server endif endif @@ -113,9 +116,12 @@ install-exec-local: install-scripts PHONIES += install-scripts # scripts must be installed before this rule is run -install-scripts: install-binSCRIPTS +install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS for f in $(bin_SCRIPTS); do \ - sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ + sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ + done + for f in $(pkglibexec_SCRIPTS); do \ + 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; \ done endif endif @@ -178,8 +184,7 @@ install-exec-hook: # make install, and have "sudo stap ...." or "sudo staprun ...." work later. -pkglibexec_PROGRAMS = stapio -CLEANFILES += $(pkglibexec_PROGRAMS) +CLEANFILES += $(pkglibexec_PROGRAMS) $(pkglibexec_SCRIPTS) if BUILD_TRANSLATOR if HAVE_NSS @@ -254,6 +259,10 @@ install-data-local: i_cmd="$(INSTALL_DATA)"; fi; \ $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap +if BUILD_SERVER + test -e $(DESTDIR)$(localstatedir)/run/stap-server || mkdir -p $(DESTDIR)$(localstatedir)/run/stap-server + test -e $(DESTDIR)$(localstatedir)/log || mkdir -p $(DESTDIR)$(localstatedir)/log +endif TEST_COV_DIR = coverage @@ -297,6 +306,10 @@ uninstall-local: done rm -rf $(DESTDIR)$(sysconfdir)/systemtap rm -rf $(DESTDIR)$(docdir)/examples +if BUILD_SERVER + rm -rf $(DESTDIR)$(localstatedir)/run/stap-server + rm -f $(DESTDIR)$(localstatedir)/log/stap-server.log +endif SUBDIRS = doc grapher DIST_SUBDIRS = testsuite $(SUBDIRS) @@ -304,7 +317,7 @@ DIST_SUBDIRS = testsuite $(SUBDIRS) check-local: SRCDIR=`cd $(srcdir); pwd`; \ PWD=`pwd`; \ - $(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)"; + $(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)"; installcheck: if test \! -e $(DESTDIR)$(bindir)/stap; then \ @@ -315,7 +328,7 @@ installcheck: echo "$(DESTDIR)$(bindir)/stap is not recent, run make install"; \ exit -1; \ fi; - $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" + $(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)" PKGLIBDIR="$(pkglibexecdir)" # Any extra flags, such as: |