Makefile rules for generating complete databases

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
This commit is contained in:
Rick Altherr 2018-02-05 17:51:35 -08:00
parent 47811acccd
commit 5d103c0498
3 changed files with 30 additions and 1 deletions

View File

@ -1,17 +1,21 @@
CLANG_FORMAT ?= clang-format
.PHONY: format clean
.PHONY: database format clean
build:
git submodule update --init --recursive
mkdir -p build
cd build; cmake ..; $(MAKE)
database: build
$(MAKE) -C $@
format:
find . -name \*.cc -and -not -path './third_party/*' -and -not -path './.git/*' -exec $(CLANG_FORMAT) -style=file -i {} \;
find . -name \*.h -and -not -path './third_party/*' -and -not -path './.git/*' -exec $(CLANG_FORMAT) -style=file -i {} \;
find . -name \*.py -and -not -path './third_party/*' -and -not -path './.git/*' -exec yapf -p -i {} \;
clean:
$(MAKE) -C database clean
$(MAKE) -C fuzzers clean
rm -rf build

10
database/Makefile Normal file
View File

@ -0,0 +1,10 @@
.NOTPARALLEL:
SUBDIRS := $(patsubst %/,%, $(wildcard */))
.PHONY: $(SUBDIRS)
$(MAKECMDGOALS): $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ -f ../Makefile.database $(MAKECMDGOALS)

View File

@ -0,0 +1,15 @@
.PHONY: all clean
all: tilegrid.json
# Small dance to say that there is a single recipe that is run once to generate
# multiple files.
tileconn.json tilegrid.json: fuzzers
.INTERMEDIATE: fuzzers
fuzzers: SHELL:=/bin/bash
fuzzers: settings.sh
source settings.sh && $(MAKE) -C ../../fuzzers all
clean:
rm -f *.db tileconn.json tilegrid.json *.yaml
rm -rf html