From 9be5296ec60ff1cc80aeb85ed2b96726c20fc41c Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 11 Mar 2020 11:39:31 -0700 Subject: [PATCH 1/4] Remove unnecessary tabs in Makefiles --- src/lib/core/Makefile | 30 +++++++++++++++--------------- src/lib/support/Makefile | 2 +- src/system/Makefile | 30 +++++++++++++++--------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/lib/core/Makefile b/src/lib/core/Makefile index cf44cc39202359..5be1827803ac0b 100644 --- a/src/lib/core/Makefile +++ b/src/lib/core/Makefile @@ -7,25 +7,25 @@ all: libcore.a run_tests include $(TOP_DIR)/.yams/cpp_rules.min -Module_Includes = \ - -I. \ - -I$(TOP_DIR)/src \ - -I$(TOP_DIR)/src/include \ - -I$(TOP_DIR)/src/lib/ \ - -I$(TOP_DIR)/src/system \ - -I$(TOP_DIR)/build/config/standalone/ \ - -I$(TOP_DIR)/third_party/nlio/repo/include \ - -I$(TOP_DIR)/third_party/nlassert/repo/include \ +Module_Includes = \ + -I. \ + -I$(TOP_DIR)/src \ + -I$(TOP_DIR)/src/include \ + -I$(TOP_DIR)/src/lib/ \ + -I$(TOP_DIR)/src/system \ + -I$(TOP_DIR)/build/config/standalone/ \ + -I$(TOP_DIR)/third_party/nlio/repo/include \ + -I$(TOP_DIR)/third_party/nlassert/repo/include Module_Test_Includes = $(Module_Includes) CPP_Files = \ - CHIPError.cpp \ - CHIPTLVWriter.cpp \ - CHIPTLVReader.cpp \ - CHIPTLVUtilities.cpp \ - CHIPTLVUpdater.cpp \ - CHIPTLVDebug.cpp \ + CHIPError.cpp \ + CHIPTLVWriter.cpp \ + CHIPTLVReader.cpp \ + CHIPTLVUtilities.cpp \ + CHIPTLVUpdater.cpp \ + CHIPTLVDebug.cpp libcore.a: $(CPP_Objects) ar rvs $@ $^ diff --git a/src/lib/support/Makefile b/src/lib/support/Makefile index 32c36197268710..99ba2f2e59dfb3 100644 --- a/src/lib/support/Makefile +++ b/src/lib/support/Makefile @@ -7,7 +7,7 @@ all: libsupport.a run_tests include $(TOP_DIR)/.yams/cpp_rules.min -Module_Includes = \ +Module_Includes = \ -I. \ -I$(TOP_DIR)/src/include \ -I$(TOP_DIR)/src/lib \ diff --git a/src/system/Makefile b/src/system/Makefile index e4186d040e23d8..1a8b401807e3f7 100644 --- a/src/system/Makefile +++ b/src/system/Makefile @@ -7,27 +7,27 @@ all: libSystemLayer.a run_tests include $(TOP_DIR)/.yams/cpp_rules.min -Module_Includes = \ +Module_Includes = \ -I. \ - -I$(TOP_DIR)/src \ - -I$(TOP_DIR)/src/include \ - -I$(TOP_DIR)/src/lib/ \ - -I$(TOP_DIR)/build/config/standalone/ \ - -I$(TOP_DIR)/third_party/nlassert/repo/include/ \ - -I$(TOP_DIR)/src/lib/core \ + -I$(TOP_DIR)/src \ + -I$(TOP_DIR)/src/include \ + -I$(TOP_DIR)/src/lib \ + -I$(TOP_DIR)/build/config/standalone \ + -I$(TOP_DIR)/third_party/nlassert/repo/include \ + -I$(TOP_DIR)/src/lib/core \ Module_Test_Includes = $(Module_Includes) CPP_Files = \ - SystemMutex.cpp \ - SystemError.cpp \ - SystemClock.cpp \ - SystemObject.cpp \ - SystemStats.cpp \ - SystemTimer.cpp \ - SystemLayer.cpp \ - SystemFaultInjection.cpp \ + SystemMutex.cpp \ + SystemError.cpp \ + SystemClock.cpp \ + SystemObject.cpp \ + SystemStats.cpp \ + SystemTimer.cpp \ + SystemLayer.cpp \ + SystemFaultInjection.cpp \ SystemPacketBuffer.cpp libSystemLayer.a: $(CPP_Objects) From 92221eec1892840e322fd250e4d45b02b3fdb210 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 11 Mar 2020 11:49:45 -0700 Subject: [PATCH 2/4] Update style guide --- docs/STYLE_GUIDE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/STYLE_GUIDE.md b/docs/STYLE_GUIDE.md index 0316dba0ea2316..50cac46eb14762 100644 --- a/docs/STYLE_GUIDE.md +++ b/docs/STYLE_GUIDE.md @@ -118,6 +118,9 @@ Instead, do this: Use backticks for `inline code`. This includes file paths and file or binary names. +### Makefiles + +Use `tabs` only where strictly necessary. For example, Avoid using tabs to align line breaks. Supported keywords: From a5e19ffb7bb99bef6f563fd967a6dc123c431423 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 11 Mar 2020 12:08:24 -0700 Subject: [PATCH 3/4] Move Makefile style guide to its own file --- docs/STYLE_GUIDE.md | 4 ---- docs/style/STYLE_MAKEFILES.md | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 docs/style/STYLE_MAKEFILES.md diff --git a/docs/STYLE_GUIDE.md b/docs/STYLE_GUIDE.md index 50cac46eb14762..fc9b964f006b4b 100644 --- a/docs/STYLE_GUIDE.md +++ b/docs/STYLE_GUIDE.md @@ -118,10 +118,6 @@ Instead, do this: Use backticks for `inline code`. This includes file paths and file or binary names. -### Makefiles - -Use `tabs` only where strictly necessary. For example, Avoid using tabs to align line breaks. - Supported keywords: Keyword | Description diff --git a/docs/style/STYLE_MAKEFILES.md b/docs/style/STYLE_MAKEFILES.md new file mode 100644 index 00000000000000..7263f3203dd381 --- /dev/null +++ b/docs/style/STYLE_MAKEFILES.md @@ -0,0 +1,3 @@ +# CHIP Makefile Style Guide + +Use `tabs` only where strictly necessary. For example, Avoid using `tabs` to align line breaks. From 5539f94ffa29629fb878edebe3dac9c53f8ffee5 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 11 Mar 2020 12:10:45 -0700 Subject: [PATCH 4/4] Undo whitespace deletion --- docs/STYLE_GUIDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/STYLE_GUIDE.md b/docs/STYLE_GUIDE.md index fc9b964f006b4b..0316dba0ea2316 100644 --- a/docs/STYLE_GUIDE.md +++ b/docs/STYLE_GUIDE.md @@ -118,6 +118,7 @@ Instead, do this: Use backticks for `inline code`. This includes file paths and file or binary names. + Supported keywords: Keyword | Description