summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.am71
-rw-r--r--Makefile.in91
-rw-r--r--aclocal.m438
-rw-r--r--systemtap.spec.in14
5 files changed, 143 insertions, 82 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e399ab4..ac96ddc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2008-07-07 Mark Wielaard <mwielaard@redhat.com>
+ * Makefile.am (install-data-hook): Install examples, demos and
+ samples.
+ (uninstall-local): Remove examples, demos and samples.
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Likewise.
+ * systemtap.spec.in (%install): Move examples.
+ Don't copy over examples to src.
+ (testsuite): Don't include src/examples.
+
+2008-07-07 Mark Wielaard <mwielaard@redhat.com>
+
* systemtap.spec.in (%install): Move installed pdf files.
(%files): Mark moved installed pdf as %doc files.
diff --git a/Makefile.am b/Makefile.am
index 8333281e..b603c640 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -155,32 +155,33 @@ EXTRA_DIST = auto_free.h buildrun.h elaborate.h loc2c.h session.h \
dwarf_wrappers.h \
git_version.h git_version.sh
-EXAMPLE_DEST_DIR = $(distdir)/examples
-SAMPLE_DEST_DIR = $(EXAMPLE_DEST_DIR)/samples
-
-EXAMPLE_SRC = $(srcdir)/testsuite/systemtap.examples
-
-SAMPLE_SRC = $(srcdir)/testsuite/systemtap.samples/iotask.stp \
- $(srcdir)/testsuite/systemtap.samples/kmalloc-stacks.stp \
- $(srcdir)/testsuite/systemtap.samples/kmalloc-top \
- $(srcdir)/testsuite/systemtap.samples/pfaults.stp \
- $(srcdir)/testsuite/systemtap.samples/profile.stp \
- $(srcdir)/testsuite/systemtap.samples/tcp_connections.stp \
- $(srcdir)/testsuite/systemtap.samples/topsys.stp
-
-dist-add-examples: $(EXAMPLE_SRC)
- rm -rf $(EXAMPLE_DEST_DIR)
- mkdir -p $(EXAMPLE_DEST_DIR)
- cp -a $(EXAMPLE_SRC)/* $(EXAMPLE_DEST_DIR)/.
-
-# Copy some of the testsuite sample scripts to the distdir
-# 'examples/samples' directory.
-dist-add-samples: $(SAMPLE_SRC) dist-add-examples
- rm -rf $(SAMPLE_DEST_DIR)
- mkdir -p $(SAMPLE_DEST_DIR)
- cp $(SAMPLE_SRC) $(SAMPLE_DEST_DIR)
-
-dist-hook: dist-add-samples dist-gitversion
+EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples
+EXAMPLE_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/examples
+DEMO_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples/small_demos
+DEMO_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/examples/small_demos
+SAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.samples
+SAMPLE_INSTALL_DIR = $(EXAMPLE_INSTALL_DIR)/samples
+
+EXAMPLE_SRC = $(EXAMPLE_SOURCE_DIR)/ChangeLog \
+ $(EXAMPLE_SOURCE_DIR)/README \
+ $(EXAMPLE_SOURCE_DIR)/*.stp \
+ $(EXAMPLE_SOURCE_DIR)/*.txt \
+ $(EXAMPLE_SOURCE_DIR)/*.meta
+
+DEMO_SRC = \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.stp \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.txt \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.wav
+
+SAMPLE_SRC = $(SAMPLE_SOURCE_DIR)/iotask.stp \
+ $(SAMPLE_SOURCE_DIR)/kmalloc-stacks.stp \
+ $(SAMPLE_SOURCE_DIR)/kmalloc-top \
+ $(SAMPLE_SOURCE_DIR)/pfaults.stp \
+ $(SAMPLE_SOURCE_DIR)/profile.stp \
+ $(SAMPLE_SOURCE_DIR)/tcp_connections.stp \
+ $(SAMPLE_SOURCE_DIR)/topsys.stp
+
+dist-hook: dist-gitversion
find $(distdir) -name CVS -o -name '*~' -o -name '.#*' | xargs rm -rf
find $(distdir) -name '*.o' -o -name '*.ko' -o -name '*.cmd' -o -name '*.mod.c' -o -name '.??*' | xargs rm -rf
find $(distdir) -name 'stap' -o -name '*.log' -o -name '*.sum' -o -name 'site.exp' | xargs rm -rf
@@ -195,6 +196,12 @@ install-data-local:
do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/uprobes/$$f; done)
(cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name README \) -print \
| while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done)
+ $(MKDIR_P) $(EXAMPLE_INSTALL_DIR)
+ $(INSTALL_DATA) $(EXAMPLE_SRC) $(EXAMPLE_INSTALL_DIR)
+ $(MKDIR_P) $(DEMO_INSTALL_DIR)
+ $(INSTALL_DATA) $(DEMO_SRC) $(DEMO_INSTALL_DIR)
+ $(MKDIR_P) $(SAMPLE_INSTALL_DIR)
+ $(INSTALL_DATA) $(SAMPLE_SRC) $(SAMPLE_INSTALL_DIR)
TEST_COV_DIR = coverage
@@ -222,6 +229,18 @@ uninstall-local:
rm -rf $(DESTDIR)$(libexecdir)/$(PACKAGE)
rm -rf $(DESTDIR)$(libdir)/$(PACKAGE)
-rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE)
+ @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \
+ rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \
+ done
+ @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \
+ rm -f "$(DEMO_INSTALL_DIR)/$$p"; \
+ done
+ @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \
+ rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \
+ done
# XXX: leaves behind man pages
SUBDIRS = testsuite doc
diff --git a/Makefile.in b/Makefile.in
index dc039c3f..0e2cc2fa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -331,16 +331,30 @@ EXTRA_DIST = auto_free.h buildrun.h elaborate.h loc2c.h session.h \
dwarf_wrappers.h \
git_version.h git_version.sh
-EXAMPLE_DEST_DIR = $(distdir)/examples
-SAMPLE_DEST_DIR = $(EXAMPLE_DEST_DIR)/samples
-EXAMPLE_SRC = $(srcdir)/testsuite/systemtap.examples
-SAMPLE_SRC = $(srcdir)/testsuite/systemtap.samples/iotask.stp \
- $(srcdir)/testsuite/systemtap.samples/kmalloc-stacks.stp \
- $(srcdir)/testsuite/systemtap.samples/kmalloc-top \
- $(srcdir)/testsuite/systemtap.samples/pfaults.stp \
- $(srcdir)/testsuite/systemtap.samples/profile.stp \
- $(srcdir)/testsuite/systemtap.samples/tcp_connections.stp \
- $(srcdir)/testsuite/systemtap.samples/topsys.stp
+EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples
+EXAMPLE_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/examples
+DEMO_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples/small_demos
+DEMO_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/examples/small_demos
+SAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.samples
+SAMPLE_INSTALL_DIR = $(EXAMPLE_INSTALL_DIR)/samples
+EXAMPLE_SRC = $(EXAMPLE_SOURCE_DIR)/ChangeLog \
+ $(EXAMPLE_SOURCE_DIR)/README \
+ $(EXAMPLE_SOURCE_DIR)/*.stp \
+ $(EXAMPLE_SOURCE_DIR)/*.txt \
+ $(EXAMPLE_SOURCE_DIR)/*.meta
+
+DEMO_SRC = \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.stp \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.txt \
+ $(EXAMPLE_SOURCE_DIR)/small_demos/*.wav
+
+SAMPLE_SRC = $(SAMPLE_SOURCE_DIR)/iotask.stp \
+ $(SAMPLE_SOURCE_DIR)/kmalloc-stacks.stp \
+ $(SAMPLE_SOURCE_DIR)/kmalloc-top \
+ $(SAMPLE_SOURCE_DIR)/pfaults.stp \
+ $(SAMPLE_SOURCE_DIR)/profile.stp \
+ $(SAMPLE_SOURCE_DIR)/tcp_connections.stp \
+ $(SAMPLE_SOURCE_DIR)/topsys.stp
TEST_COV_DIR = coverage
# XXX: leaves behind man pages
@@ -1150,8 +1164,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -1176,8 +1190,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -1187,13 +1201,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -1266,6 +1279,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -1293,6 +1310,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -1462,7 +1481,7 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
clean-binPROGRAMS clean-generic clean-local \
clean-noinstPROGRAMS clean-pkglibexecPROGRAMS ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
- dist-shar dist-tarZ dist-zip distcheck distclean \
+ dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
@@ -1537,19 +1556,7 @@ install-exec-hook:
@BUILD_CRASHMOD_TRUE@ $(MKDIR_P) $(DESTDIR)$(pkglibdir)
@BUILD_CRASHMOD_TRUE@ $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
-dist-add-examples: $(EXAMPLE_SRC)
- rm -rf $(EXAMPLE_DEST_DIR)
- mkdir -p $(EXAMPLE_DEST_DIR)
- cp -a $(EXAMPLE_SRC)/* $(EXAMPLE_DEST_DIR)/.
-
-# Copy some of the testsuite sample scripts to the distdir
-# 'examples/samples' directory.
-dist-add-samples: $(SAMPLE_SRC) dist-add-examples
- rm -rf $(SAMPLE_DEST_DIR)
- mkdir -p $(SAMPLE_DEST_DIR)
- cp $(SAMPLE_SRC) $(SAMPLE_DEST_DIR)
-
-dist-hook: dist-add-samples dist-gitversion
+dist-hook: dist-gitversion
find $(distdir) -name CVS -o -name '*~' -o -name '.#*' | xargs rm -rf
find $(distdir) -name '*.o' -o -name '*.ko' -o -name '*.cmd' -o -name '*.mod.c' -o -name '.??*' | xargs rm -rf
find $(distdir) -name 'stap' -o -name '*.log' -o -name '*.sum' -o -name 'site.exp' | xargs rm -rf
@@ -1564,6 +1571,12 @@ install-data-local:
do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/uprobes/$$f; done)
(cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name README \) -print \
| while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done)
+ $(MKDIR_P) $(EXAMPLE_INSTALL_DIR)
+ $(INSTALL_DATA) $(EXAMPLE_SRC) $(EXAMPLE_INSTALL_DIR)
+ $(MKDIR_P) $(DEMO_INSTALL_DIR)
+ $(INSTALL_DATA) $(DEMO_SRC) $(DEMO_INSTALL_DIR)
+ $(MKDIR_P) $(SAMPLE_INSTALL_DIR)
+ $(INSTALL_DATA) $(SAMPLE_SRC) $(SAMPLE_INSTALL_DIR)
gcov:
@-$(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" all check
@@ -1589,6 +1602,18 @@ uninstall-local:
rm -rf $(DESTDIR)$(libexecdir)/$(PACKAGE)
rm -rf $(DESTDIR)$(libdir)/$(PACKAGE)
-rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE)
+ @list='$(EXAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(EXAMPLE_INSTALL_DIR)/$$p'"; \
+ rm -f "$(EXAMPLE_INSTALL_DIR)/$$p"; \
+ done
+ @list='$(DEMO_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(DEMO_INSTALL_DIR)/$$p'"; \
+ rm -f "$(DEMO_INSTALL_DIR)/$$p"; \
+ done
+ @list='$(SAMPLE_SRC)'; for f in $$list; do p=`basename $$f`; \
+ echo " rm -f '$(SAMPLE_INSTALL_DIR)/$$p'"; \
+ rm -f "$(SAMPLE_INSTALL_DIR)/$$p"; \
+ done
check:
SRCDIR=`cd $(srcdir); pwd`; \
diff --git a/aclocal.m4 b/aclocal.m4
index 9d70920d..0e2027cd 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,12 +11,15 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf. If you want to use that,
-you should regenerate the build system entirely.], [63])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -31,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10], [],
+m4_if([$1], [1.10.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -47,8 +50,10 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -343,7 +348,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -391,13 +396,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -502,16 +507,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
+_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $1 | $1:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -872,7 +878,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
diff --git a/systemtap.spec.in b/systemtap.spec.in
index b44d23cb..1fdd65a4 100644
--- a/systemtap.spec.in
+++ b/systemtap.spec.in
@@ -130,16 +130,19 @@ cd ..
%configure %{?elfutils_config} %{sqlite_config} %{crash_config} %{docs_config}
make %{?_smp_mflags}
+%install
+rm -rf ${RPM_BUILD_ROOT}
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# We want the examples in the special doc dir, not the generoc doc install dir.
+mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/examples examples
+
# Fix paths in the example & testsuite scripts
find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@'
# To avoid perl dependency, make perl sample script non-executable
chmod -x examples/samples/kmalloc-top
-%install
-rm -rf ${RPM_BUILD_ROOT}
-make DESTDIR=$RPM_BUILD_ROOT install
-
# Because "make install" may install staprun with mode 04111, the
# post-processing programs rpmbuild runs won't be able to read it.
# So, we change permissions so that they can read it. We'll set the
@@ -148,8 +151,6 @@ chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
# Copy over the testsuite
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
-mkdir $RPM_BUILD_ROOT%{_datadir}/%{name}/src
-cp -rp examples $RPM_BUILD_ROOT%{_datadir}/%{name}/src
#%if %{with_docs}
# We want the manuals in the special doc dir, not the generic doc install dir.
@@ -201,7 +202,6 @@ exit 0
%files testsuite
%defattr(-,root,root)
-%{_datadir}/%{name}/src
%{_datadir}/%{name}/testsuite