Renamed opt-in compile-time side-effects from YES_* -> *GEN

- YES_COV        -> COVGEN
- YES_PERF       -> PERFGEN
- YES_PERFBD     -> PERFBDGEN
- YES_TESTMARKS  -> TESTMARKS
- YES_BENCHMARKS -> BENCHMARKS

For a lack of better naming, may change in the future. Couldn't really
find any consistent prior art.

Note that no-suf/prefix doesn't work because of conflicts with the tool
overrides (PERF, COV, etc).
This commit is contained in:
Christopher Haster
2024-02-20 23:21:18 -06:00
parent e7341686bb
commit 025788a43c
+21 -21
View File
@@ -83,13 +83,13 @@ endif
ifdef TRACE ifdef TRACE
CFLAGS += -DLFS_YES_TRACE CFLAGS += -DLFS_YES_TRACE
endif endif
ifdef YES_COV ifdef COVGEN
CFLAGS += --coverage CFLAGS += --coverage
endif endif
ifdef YES_PERF ifdef PERFGEN
CFLAGS += -fno-omit-frame-pointer CFLAGS += -fno-omit-frame-pointer
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
CFLAGS += -fno-omit-frame-pointer CFLAGS += -fno-omit-frame-pointer
endif endif
@@ -125,20 +125,20 @@ BENCHFLAGS += -b
# forward -j flag # forward -j flag
TESTFLAGS += $(filter -j%,$(MAKEFLAGS)) TESTFLAGS += $(filter -j%,$(MAKEFLAGS))
BENCHFLAGS += $(filter -j%,$(MAKEFLAGS)) BENCHFLAGS += $(filter -j%,$(MAKEFLAGS))
ifdef YES_PERF ifdef PERFGEN
TESTFLAGS += -p $(TEST_PERF) TESTFLAGS += -p $(TEST_PERF)
BENCHFLAGS += -p $(BENCH_PERF) BENCHFLAGS += -p $(BENCH_PERF)
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
TESTFLAGS += -t $(TEST_TRACE) --trace-backtrace --trace-freq=100 TESTFLAGS += -t $(TEST_TRACE) --trace-backtrace --trace-freq=100
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
BENCHFLAGS += -t $(BENCH_TRACE) --trace-backtrace --trace-freq=100 BENCHFLAGS += -t $(BENCH_TRACE) --trace-backtrace --trace-freq=100
endif endif
ifdef YES_TESTMARKS ifdef TESTMARKS
TESTFLAGS += -o $(TEST_CSV) TESTFLAGS += -o $(TEST_CSV)
endif endif
ifdef YES_BENCHMARKS ifdef BENCHMARKS
BENCHFLAGS += -o $(BENCH_CSV) BENCHFLAGS += -o $(BENCH_CSV)
endif endif
ifdef VERBOSE ifdef VERBOSE
@@ -289,7 +289,7 @@ cov-diff: $(GCDA)
$(patsubst %,-F%,$(SRC)) \ $(patsubst %,-F%,$(SRC)) \
$(COVFLAGS) -d $(BUILDDIR)/lfs.cov.csv) $(COVFLAGS) -d $(BUILDDIR)/lfs.cov.csv)
## Find the perf results after bench run with YES_PERF ## Find the perf results after bench run with PERFGEN
.PHONY: perf .PHONY: perf
perf: PERFFLAGS+=-S perf: PERFFLAGS+=-S
perf: $(BENCH_PERF) $(BUILDDIR)/lfs.perf.csv perf: $(BENCH_PERF) $(BUILDDIR)/lfs.perf.csv
@@ -356,25 +356,25 @@ summary-diff sizes-diff: $(OBJ) $(CI)
## Build the test-runner ## Build the test-runner
.PHONY: test-runner build-test .PHONY: test-runner build-test
test-runner build-test: CFLAGS+=-Wno-unused-function test-runner build-test: CFLAGS+=-Wno-unused-function
ifdef YES_COV ifdef COVGEN
test-runner build-test: CFLAGS+=--coverage test-runner build-test: CFLAGS+=--coverage
endif endif
ifdef YES_PERF ifdef PERFGEN
test-runner build-test: CFLAGS+=-fno-omit-frame-pointer test-runner build-test: CFLAGS+=-fno-omit-frame-pointer
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
test-runner build-test: CFLAGS+=-fno-omit-frame-pointer test-runner build-test: CFLAGS+=-fno-omit-frame-pointer
endif endif
# note we remove some binary dependent files during compilation, # note we remove some binary dependent files during compilation,
# otherwise it's way to easy to end up with outdated results # otherwise it's way to easy to end up with outdated results
test-runner build-test: $(TEST_RUNNER) test-runner build-test: $(TEST_RUNNER)
ifdef YES_COV ifdef COVGEN
rm -f $(TEST_GCDA) rm -f $(TEST_GCDA)
endif endif
ifdef YES_PERF ifdef PERFGEN
rm -f $(TEST_PERF) rm -f $(TEST_PERF)
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
rm -f $(TEST_TRACE) rm -f $(TEST_TRACE)
endif endif
@@ -408,25 +408,25 @@ testmarks-diff: $(TEST_CSV)
## Build the bench-runner ## Build the bench-runner
.PHONY: bench-runner build-bench .PHONY: bench-runner build-bench
bench-runner build-bench: CFLAGS+=-Wno-unused-function bench-runner build-bench: CFLAGS+=-Wno-unused-function
ifdef YES_COV ifdef COVGEN
bench-runner build-bench: CFLAGS+=--coverage bench-runner build-bench: CFLAGS+=--coverage
endif endif
ifdef YES_PERF ifdef PERFGEN
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif endif
# note we remove some binary dependent files during compilation, # note we remove some binary dependent files during compilation,
# otherwise it's way to easy to end up with outdated results # otherwise it's way to easy to end up with outdated results
bench-runner build-bench: $(BENCH_RUNNER) bench-runner build-bench: $(BENCH_RUNNER)
ifdef YES_COV ifdef COVGEN
rm -f $(BENCH_GCDA) rm -f $(BENCH_GCDA)
endif endif
ifdef YES_PERF ifdef PERFGEN
rm -f $(BENCH_PERF) rm -f $(BENCH_PERF)
endif endif
ifdef YES_PERFBD ifdef PERFBDGEN
rm -f $(BENCH_TRACE) rm -f $(BENCH_TRACE)
endif endif