File: Build

package info (click to toggle)
dtrace 2.0.5-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 24,408 kB
  • sloc: ansic: 61,247; sh: 17,997; asm: 1,717; lex: 947; awk: 754; yacc: 695; perl: 37; sed: 17; makefile: 15
file content (54 lines) | stat: -rw-r--r-- 2,090 bytes parent folder | download
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
# Oracle Linux DTrace.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

TEST_UTILS = workload_kernel workload_user showUSDT print-stack-layout
TEST_SCRIPTS = check_result.sh clean_probes.sh cpc_get_events.sh cpc_temp_skip_bug.sh perf_count_event.sh workload_analyze_loop.sh workload_get_iterations.sh get_remote.sh stack_skip_test.sh

define test-util-template
CMDS += $(1)
$(1)_DIR := $(current-dir)
$(1)_TARGET = $(1)
$(1)_SOURCES = $(1).c
$(1)_POST := link-test-util
$(1)_CFLAGS := -Ilibdtrace -Ilibproc -Ilibcommon
$(1)_NOCFLAGS := --coverage
$(1)_NOLDFLAGS := --coverage
$(1)_DEPS = libdtrace.so
$(1)_LIBS = -L$(objdir) -ldtrace

clean::
	rm -f test/utils/$(1)
endef

define link-test-util
	rm -f test/utils/$(notdir $(1))
	ln -s $(1) test/utils/$(notdir $(1))
endef

$(foreach util,$(TEST_UTILS),$(eval $(call test-util-template,$(util))))

# The showUSDT utility needs to be linked against libelf, and should not be
# linked against libdtrace.
showUSDT_DEPS = libcommon.a
showUSDT_LIBS = -lelf -L$(objdir) -lcommon

# The print-stack-layout utility needs dt_impl.h which needs dt_git_version.h.
print-stack-layout_SRCDEPS := $(objdir)/dt_git_version.h

# Install the showUSDT utility in $(DOCDIR); do not count on this utility to
# always be present --- it is only included there to assist in early debugging of
# the (semi-new) USDT feature.
install::
	mkdir -p $(INSTDOCDIR)
	$(call describe-install-target,$(INSTDOCDIR),showUSDT)
	install -m 755 test/utils/showUSDT $(INSTDOCDIR)

install-test::
	$(call describe-install-target,$(INSTTESTDIR)/test/utils,$(TEST_UTILS) $(TEST_SCRIPTS) include-test.d libctf.r.p)
	mkdir -p $(INSTTESTDIR)/test/utils
	install -m 755 $(addprefix test/utils/,$(TEST_UTILS)) $(INSTTESTDIR)/test/utils
	install -m 755 $(addprefix test/utils/,$(TEST_SCRIPTS)) $(INSTTESTDIR)/test/utils
	install -m 644 test/utils/include-test.d $(INSTTESTDIR)/test/utils
	install -m 755 test/utils/libctf.r.p $(INSTTESTDIR)/test/utils