summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2023-03-12 18:57:56 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2023-03-13 10:24:43 +0100
commit9ca86a09271ae74dcc3fb376e4518b03e12f52f5 (patch)
treed40dfaea39c2cf3b020905245e8679858093bffa /Makefile.in
parenteb2f8839ac53daa4d80fad2809be55d997678397 (diff)
downloadtcpdump-9ca86a09271ae74dcc3fb376e4518b03e12f52f5.tar.gz
instrument functions: Use an environment variable instead of config files
If the environment variable INSTRUMENT is - unset or set to an empty string, print nothing, like with no instrumentation - set to "all" or "a", print all the functions names - set to "global" or "g", print only the global functions names The configuration with --enable-instrument-functions remains. Note that before this change, the default was to print all functions. Now it is to print nothing. So by default 'make check' runs without errors. This allows to run: $ INSTRUMENT=a ./tcpdump ... $ INSTRUMENT=g ./tcpdump ... $ INSTRUMENT= ./tcpdump ... or $ export INSTRUMENT=global $ ./tcpdump ... This also allows to run the statically compiled binary on another host after copying it. It is no longer necessary to modify the configuration with: $ make instrument_all $ make instrument_global $ make instrument_off (Targets removed.) Update .gitignore, CONTRIBUTING.md and Makefile.in accordingly. Moreover: Reduce the scope of a variable. Rename a variable. Remove '\n' in the perror() call. Remove 2 spaces in function calls (style). [skip ci]
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in12
1 files changed, 0 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index 8d5b2534..1b3c3a57 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -389,18 +389,6 @@ $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
@rm -f $@
$(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
-instrument_all: $(PROG)
- @rm -f instrument_functions_global.devel
- @rm -f instrument_functions_off.devel
-
-instrument_global: $(PROG)
- @touch instrument_functions_global.devel
- @rm -f instrument_functions_off.devel
-
-instrument_off: $(PROG)
- @touch instrument_functions_off.devel
- @rm -f instrument_functions_global.devel
-
$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
@rm -f $@
$(AR) cr $@ $(LIBNETDISSECT_OBJ)