/usr/share/systemtap/runtime/uprobes/Makefile is in systemtap-common 1.6-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | obj-m := uprobes.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
DEPENDENCIES := $(shell echo uprobes.[ch] uprobes_*.[ch])
DEPENDENCIES += $(shell echo ../uprobes2/uprobes.[ch] ../uprobes2/uprobes_*.[ch])
DEPENDENCIES += Makefile
CLEAN_FILES := $(shell echo *.mod.c *.ko *.o .*.cmd *~ *.sgn)
CLEAN_FILES += Module.markers modules.order Module.symvers
CLEAN_DIRS := .tmp_versions
LIBEXECDIR = ../../../../libexec/systemtap
CERTDB = ../../../../etc/systemtap/staprun
# Build the module and, if we are root or stap-server, sign it.
# Make sure that all the required tools and resources are available
# before attempting to sign the module.
# Ensure that the generated files are writeable by the group which
# owns this build directory. This is so that the stap-server service
# can rebuild the module, if necessary.
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
if test `id -u` = 0 -o `id -un` = stap-server; then \
if test -x $(LIBEXECDIR)/stap-sign-module; then \
stap_dir=${SYSTEMTAP_DIR}; \
if test -z "$$stap_dir"; then \
stap_dir=~/.systemtap; \
fi; \
certfile=$$stap_dir/ssl/server/stap.cert; \
if test ! -f $$certfile -o -f $$stap_dir/ssl/server/pw; then \
$(LIBEXECDIR)/stap-gen-cert > /dev/null; \
fi; \
if test `id -u` = 0; then \
$(LIBEXECDIR)/stap-authorize-cert $$certfile $(CERTDB) > /dev/null; \
fi; \
for f in *.ko; do \
if test ! -e $$f.sgn -o $$f.sgn -ot $$f; then \
$(LIBEXECDIR)/stap-sign-module $$f > /dev/null; \
fi \
done \
fi \
fi
group=`stat -c %G $(PWD)`; \
for f in $(CLEAN_FILES); do \
test ! -f $$f && continue; \
chgrp -f $$group $$f; \
chmod -f 664 $$f; \
done; \
for d in $(CLEAN_DIRS); do \
test ! -d $$d && continue; \
chgrp -f $$group $$d; \
chmod -f 775 $$d; \
for dd in `find $$d -type d`; do \
chgrp -f $$group $$dd; \
chmod -f 775 $$dd; \
done; \
for f in `find $$d -type f`; do \
chgrp -f $$group $$f; \
chmod -f 664 $$f; \
done; \
done
# This target is used with "make -q" to see whether a "real" build is needed.
uprobes.ko: $(DEPENDENCIES)
@echo uprobes.ko is not a valid target. See Makefile.
clean:
rm -f $(CLEAN_FILES)
rm -rf $(CLEAN_DIRS)
|