Trying to get to the point where make format works the same
on Linux and MacOS
This commit is contained in:
parent
93b84087ce
commit
d620542ee5
13 changed files with 191 additions and 176 deletions
10
Makefile
10
Makefile
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue