From 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 May 2020 16:56:32 +0200 Subject: make the whole project more python idiomatic * rename src directory to allocbench * make global variable names UPPERCASE * format a lot of code using yapf * use lowercase ld_preload and ld_library_path as Allocator members * name expected Errors 'err' and don't raise a new Exception * disable some pylint messages --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 96bc96c..f20c910 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -PYTHONFILES = $(shell find src/ -name "*.py") +SRCDIR = allocbench -MAKEFILES = $(shell dirname $(shell find src/ -name Makefile)) -CMAKELISTS = $(shell dirname $(shell find src/ -name CMakeLists.txt)) +PYTHONFILES = $(shell find $(SRCDIR)/ -name "*.py") + +MAKEFILES = $(shell dirname $(shell find $(SRCDIR)/ -name Makefile)) +CMAKELISTS = $(shell dirname $(shell find $(SRCDIR)/ -name CMakeLists.txt)) OBJDIR = $(PWD)/build @@ -22,7 +24,7 @@ export LDXXFLAGS = $(LDFLAGS) -static-libstdc++ all: $(OBJDIR)/ccinfo $(MAKEFILES) $(CMAKELISTS) $(CMAKELISTS): - $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/src//)) + $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//)) @if test \( ! \( -d $(BENCHDIR) \) \) ;then mkdir -p $(BENCHDIR);fi ifneq (,$(findstring s,$(MAKEFLAGS))) cd $(BENCHDIR); cmake $(PWD)/$@ >/dev/null @@ -32,9 +34,9 @@ endif $(MAKE) -C $(BENCHDIR) $(MAKEFILES): - $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/src//)) + $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//)) @if test \( ! \( -d $(BENCHDIR) \) \) ;then mkdir -p $(BENCHDIR);fi - $(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/src//) + $(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//) $(OBJDIR)/ccinfo: | $(OBJDIR) $(CC) -v 2> $@ -- cgit v1.2.3