mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-11-01 03:48:57 +08:00 
			
		
		
		
	mdbx-makefile: add overrideable TESTLOG.
Change-Id: I168109be3a2534fe85c606051cd76f29c3087c25
This commit is contained in:
		
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| # GNU Makefile for libmdbx, https://github.com/ReOpen/libmdbx | # GNU Makefile for libmdbx, https://github.com/ReOpen/libmdbx | ||||||
|  |  | ||||||
| ######################################################################## | ######################################################################## | ||||||
| # Configuration. The compiler options must enable threaded compilation. | # Configuration. The compiler options must enable threaded compilation. | ||||||
| @@ -28,6 +28,7 @@ CFLAGS	?= -O2 -g3 -Wall -Wno-constant-logical-operand -Werror -Wextra -ffunction | |||||||
| CFLAGS	+= -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS) | CFLAGS	+= -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS) | ||||||
| CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS)) | CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS)) | ||||||
| TESTDB	?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db | TESTDB	?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db | ||||||
|  | TESTLOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.log | ||||||
|  |  | ||||||
| # LY: '--no-as-needed,-lrt' for ability to built with modern glibc, but then run with the old | # LY: '--no-as-needed,-lrt' for ability to built with modern glibc, but then run with the old | ||||||
| LDFLAGS	?= -Wl,--gc-sections,-z,relro,-O,--no-as-needed,-lrt | LDFLAGS	?= -Wl,--gc-sections,-z,relro,-O,--no-as-needed,-lrt | ||||||
| @@ -72,7 +73,7 @@ clean: | |||||||
| 	rm -rf $(TOOLS) test/test @* *.[ao] *.[ls]o *~ tmp.db/* *.gcov *.log *.err src/*.o test/*.o | 	rm -rf $(TOOLS) test/test @* *.[ao] *.[ls]o *~ tmp.db/* *.gcov *.log *.err src/*.o test/*.o | ||||||
|  |  | ||||||
| check:	all | check:	all | ||||||
| 	rm -f $(TESTDB) test.log && (set -o pipefail; test/test --pathname=$(TESTDB) --dont-cleanup-after basic | tee -a test.log | tail -n 42) && ./mdbx_chk -vn $(TESTDB) | 	rm -f $(TESTDB) $(TESTLOG) && (set -o pipefail; test/test --pathname=$(TESTDB) --dont-cleanup-after basic | tee -a $(TESTLOG) | tail -n 42) && ./mdbx_chk -vvn $(TESTDB) | ||||||
|  |  | ||||||
| define core-rule | define core-rule | ||||||
| $(patsubst %.c,%.o,$(1)): $(1) $(CORE_INC) mdbx.h Makefile | $(patsubst %.c,%.o,$(1)): $(1) $(CORE_INC) mdbx.h Makefile | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user