diff options
author | roland <roland> | 2005-12-12 05:52:00 +0000 |
---|---|---|
committer | roland <roland> | 2005-12-12 05:52:00 +0000 |
commit | e460639fa72fda6ff89bb77ab48516f6f478c909 (patch) | |
tree | ced9b3cc1bf89498fe7257b7e7f4d003005d1e3a | |
parent | 4d9087fcfe475185ef08a16fef31942f06d60f54 (diff) | |
download | systemtap-steved-e460639fa72fda6ff89bb77ab48516f6f478c909.tar.gz systemtap-steved-e460639fa72fda6ff89bb77ab48516f6f478c909.tar.xz systemtap-steved-e460639fa72fda6ff89bb77ab48516f6f478c909.zip |
2005-12-11 Roland McGrath <roland@redhat.com>
PR 1916
* configure.ac: Grok --with-elfutils.
* Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils):
New targets.
[BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags
to point at local elfutils build.
[BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils.
[BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable.
[BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target.
[BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils.
(loc2c_test_LDADD): Set this to $(stap_LDADD).
(loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables.
* Makefile.in: Regenerated.
* compile: New file from automakeland.
* systemtap.spec.in (elfutils_version): Require 0.118 or later.
[bundled_elfutils]: Remove old hacks for building elfutils, and rely
on configure --with-elfutils instead.
* Makefile.am (pkglibexecdir): New variable.
(AM_CPPFLAGS): Use it.
(pkglibexec_PROGRAMS): Set this instead of noinst_PROGRAMS with stpd.
(pkglibexec_SCRIPTS, CLEANFILES): New variables.
(install-exec-local): Target removed.
* runtest.sh: Set LD_LIBRARY_PATH when lib-elfutils is in use.
-rw-r--r-- | Makefile.am | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am index 936605d9..d8faa020 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,9 @@ # Makefile.am --- automake input file for systemtap ## process this file with automake to produce Makefile.in -AM_CPPFLAGS = -DPKGLIBDIR='"${libexecdir}/${PACKAGE}"' \ - -DPKGDATADIR='"${pkgdatadir}"' +pkglibexecdir = ${libexecdir}/${PACKAGE} + +AM_CPPFLAGS = -DPKGLIBDIR='"$(pkglibexecdir)"' -DPKGDATADIR='"${pkgdatadir}"' AM_CFLAGS = -std=gnu99 -D_GNU_SOURCE -fexceptions \ -Wall -Werror -Wshadow -Wunused -Wformat=2 -W @@ -16,16 +17,48 @@ stap_SOURCES = main.cxx \ stap_LDADD = @stap_LIBS@ stap_CXXFLAGS = -Werror $(AM_CXXFLAGS) +stap_CPPFLAGS = $(AM_CPPFLAGS) +stap_LDFLAGS = $(AM_LDFLAGS) + +CLEANFILES = + +if BUILD_ELFUTILS +stap_CPPFLAGS += -Iinclude-elfutils +stap_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) +BUILT_SOURCES = stamp-elfutils +CLEANFILES += stamp-elfutils +stamp-elfutils: config.status + $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all + for dir in libelf libebl libdw libdwfl backends; do \ + $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils/$$dir install; \ + done + touch $@ +stap_DEPENDENCIES = lib-elfutils/libdw.so +lib-elfutils/libdw.so: stamp-elfutils ; + +.PHONY: install-elfutils +install-elfutils: + mkdir -p $(pkglibdir) + cp -df lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so* \ + $(pkglibdir) +install-exec-local: install-elfutils +endif # stpd goes into $libexec/$package, so libexec_PROGRAMS would # put it into the wrong location -noinst_PROGRAMS = stpd +pkglibexec_PROGRAMS = stpd stpd_SOURCES = runtime/stpd/stpd.c runtime/stpd/librelay.c stpd_LDADD = -lpthread -noinst_PROGRAMS += loc2c-test +pkglibexec_SCRIPTS = stp_check +CLEANFILES += $(pkglibexec_SCRIPTS) + +noinst_PROGRAMS = loc2c-test loc2c_test_SOURCES = loc2c-test.c loc2c.c -loc2c_test_LDADD = @stap_LIBS@ +loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) +loc2c_test_LDFLAGS = $(stap_LDFLAGS) +loc2c_test_LDADD = $(stap_LDADD) # Get extra libs as needed LDADD = @@ -37,11 +70,6 @@ dist-hook: 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 -install-exec-local: - mkdir -p $(DESTDIR)$(libexecdir)/systemtap - $(INSTALL) stpd $(DESTDIR)$(libexecdir)/systemtap - $(INSTALL) stp_check $(DESTDIR)$(libexecdir)/systemtap - install-data-local: mkdir -p $(DESTDIR)$(pkgdatadir)/runtime/transport cp -rp $(srcdir)/runtime/*.[ch] $(srcdir)/runtime/Doxyfile \ |