Trying to get to the point where make format works the same

on Linux and MacOS
This commit is contained in:
Simon Brooke 2018-12-07 20:53:09 +00:00
parent 93b84087ce
commit d620542ee5
13 changed files with 191 additions and 176 deletions

View file

@ -1,4 +1,3 @@
TARGET ?= target/psse
SRC_DIRS ?= ./src
@ -11,7 +10,10 @@ TESTS := $(shell find unit-tests -name *.sh)
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
INDENT_FLAGS := -kr -br -brf -brs -ce -cdw -npsl -nut -prs -l79 -ts2
INDENT_FLAGS := -nbad -bap -nbc -br -brf -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 \
-d0 -di1 -nfc1 -i4 -ip0 -l75 -lp -npcs \
-npsl -nsc -nsob -nss -nut -prs -l79 -ts2
VERSION := "0.0.2"
@ -25,7 +27,11 @@ doc: $(SRCS) Makefile
doxygen
format: $(SRCS) $(HDRS) Makefile
ifeq ($(shell uname -s), Darwin)
gindent $(INDENT_FLAGS) $(SRCS) $(HDRS)
else
indent $(INDENT_FLAGS) $(SRCS) $(HDRS)
endif
test: $(OBJS) $(TESTS) Makefile
bash ./unit-tests.sh