Skip to content

Commit aeec6c5

Browse files
Rob Walkerrestyled-commits
Rob Walker
andauthored
Move build/config to config (project-chip#426)
* move build_config to config * mv build/scripts * Restyled by clang-format * move build/autoconf to autoconf Co-authored-by: Restyled.io <commits@restyled.io>
1 parent d0488aa commit aeec6c5

23 files changed

+31
-54
lines changed

.gitignore

+1-12
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,7 @@ Makefile.in
1515
aclocal.m4
1616
autom4te.cache
1717
output/
18-
build/*
19-
!build/README.md
20-
!build/autoconf/m4/chip_check_project_config_includes.m4
21-
!build/autoconf/m4/nl_with_lwip.m4
22-
!build/config/standalone/CHIPProjectConfig.h
23-
!build/config/standalone/SystemProjectConfig.h
24-
!build/config/standalone/darwin/CHIPProjectConfig.h
25-
!build/config/standalone/no-openssl/CHIPProjectConfig.h
26-
!build/efr32/
27-
!build/esp32/
28-
!build/nrf5/
29-
!build/scripts/gen-chip-version
18+
build/
3019
examples/**/build
3120
config.log
3221
config.status

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"${workspaceFolder}/build/default/src/**",
66
"${workspaceFolder}/build/default/src/include/**",
77
"${workspaceFolder}/build/default/src/lib/**",
8-
"${workspaceFolder}/build/config/standalone/",
9-
"${workspaceFolder}/build/config/standalone/**",
8+
"${workspaceFolder}/config/standalone/",
9+
"${workspaceFolder}/config/standalone/**",
1010
"${workspaceFolder}/examples/**",
1111
"${workspaceFolder}/src/**",
1212
"${workspaceFolder}/src/include/",

Makefile-Android

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ANDROID_STL_INCLUDES = $(foreach dir,$(ANDROID_STL_INCLUDE_DIRS_$(AND
6666
# Tools and Executables
6767
#
6868

69-
android-ndk-which = $(shell $(AbsTopSourceDir)/build/scripts/android-ndk-which --ndk-home $(ANDROID_NDK_HOME) $(1) $(TARGET_ABI))
69+
android-ndk-which = $(shell $(AbsTopSourceDir)/scripts/android-ndk-which --ndk-home $(ANDROID_NDK_HOME) $(1) $(TARGET_ABI))
7070

7171
AR = $(call android-ndk-which,ar)
7272
AS = $(call android-ndk-which,as)
@@ -114,7 +114,7 @@ INCLUDES += -isystem $(ANDROID_NDK_HOME)/sysroot/usr/incl
114114
#
115115
# Compilation/Build Flags
116116
#
117-
117+
118118
CPPFLAGS = --sysroot=$(ABI_SYSROOT) $(DEFINES) $(INCLUDES) $(ABI_CPPFLAGS)
119119
CFLAGS = $(CPPFLAGS) -ffunction-sections -funwind-tables $(ABI_CFLAGS)
120120
CXXFLAGS = $(CPPFLAGS) -fno-rtti $(ABI_CXXFLAGS)
@@ -142,7 +142,7 @@ CONFIGURE_OPTIONS = --disable-cocoa \
142142
ifeq ($(DEBUG),1)
143143
CONFIGURE_OPTIONS += --enable-debug --enable-optimization=no
144144
else
145-
CONFIGURE_OPTIONS +=
145+
CONFIGURE_OPTIONS +=
146146
endif
147147

148148

@@ -162,7 +162,7 @@ TopResultDir = $(ResultPath)
162162
AbsTopResultDir = $(PWD)/$(TopResultDir)
163163

164164
# NB: Regardless of where JAVA_HOME points, always use the JNI headers from the Android NDK,
165-
# and only include the top-most directory (include), not the system directory (include/linux).
165+
# and only include the top-most directory (include), not the system directory (include/linux).
166166
# Because the NDK mixes the JNI headers in with the linux headers, listing the system
167167
# directory in the -I flags will result in strange compilation errors. And unlike the standard
168168
# Java jni.h, the jni.h that comes with the Android NDK does not depend on any system-specific
@@ -257,7 +257,7 @@ JNI_INCLUDE_DIRS="$(JNI_INCLUDE_DIRS)" \
257257
--host=$(ABI_CONFIG_TUPLE_$(1)) \
258258
--with-sysroot=$(ABI_SYSROOT) \
259259
--with-libtool-sysroot=$(ABI_SYSROOT) \
260-
--with-chip-project-includes=$(AbsTopSourceDir)/build/config/android \
260+
--with-chip-project-includes=$(AbsTopSourceDir)/config/android \
261261
--prefix=/ \
262262
--exec-prefix=/$(ABI_CONFIG_TUPLE_$(1)) \
263263
$(CONFIGURE_OPTIONS))
@@ -444,7 +444,7 @@ $(TopResultDir) $(BUILD_DIRS):
444444

445445
help:
446446
$(ECHO) ""
447-
$(ECHO) "Type 'make -f $(firstword $(MAKEFILE_LIST))' to build CHIP for Android for the following"
447+
$(ECHO) "Type 'make -f $(firstword $(MAKEFILE_LIST))' to build CHIP for Android for the following"
448448
$(ECHO) "API level and ABIs: "
449449
$(ECHO) ""
450450
$(ECHO) " API Level $(ANDROID_API)"

Makefile-Standalone

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ AbsTopResultDir = $(CURDIR)/$(TopResultDir)
6666
TargetTuple = $(shell ${AbsTopSourceDir}/third_party/nlbuild-autotools/repo/third_party/autoconf/config.guess | sed -e 's/[[:digit:].]*$$//g')
6767

6868
ifeq ($(HOSTOS),darwin)
69-
ProjectConfigDir ?= $(AbsTopSourceDir)/build/config/standalone/darwin
69+
ProjectConfigDir ?= $(AbsTopSourceDir)/config/standalone/darwin
7070
else
71-
ProjectConfigDir ?= $(AbsTopSourceDir)/build/config/standalone
71+
ProjectConfigDir ?= $(AbsTopSourceDir)/config/standalone
7272
endif
7373

7474
ifeq ($(ARCH),x86_64)
@@ -120,7 +120,7 @@ endif
120120
configure_OPTIONS += --with-openssl=$(OPENSSL)
121121
ifeq ($(OPENSSL),no)
122122
configure_OPTIONS += --disable-tools
123-
ProjectConfigDir = $(AbsTopSourceDir)/build/config/standalone/no-openssl
123+
ProjectConfigDir = $(AbsTopSourceDir)/config/standalone/no-openssl
124124
endif
125125

126126
# If the user has asserted USE_FUZZING enable fuzzing build

Makefile-iOS

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ ac_cv_have_decl_clock_gettime=no \
276276
--target=$($(1)_arch_AUTOTOOLS)-$(TargetTupleStem) \
277277
--prefix=/ \
278278
--exec-prefix=/$(1)-$(TargetTuple) \
279-
--with-chip-project-includes=$(AbsTopSourceDir)/build/config/ios \
279+
--with-chip-project-includes=$(AbsTopSourceDir)/config/ios \
280280
--with-logging-style=external \
281281
--enable-cocoa \
282282
--disable-docs \

Makefile.am

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ EXTRA_DIST = \
5353
bootstrap-configure \
5454
repos.conf \
5555
$(srcdir)/build/autoconf \
56-
$(srcdir)/build/config \
57-
$(srcdir)/build/efr32 \
58-
$(srcdir)/build/nrf5 \
59-
$(srcdir)/build/scripts \
56+
$(srcdir)/config \
57+
$(srcdir)/config/efr32 \
58+
$(srcdir)/config/nrf5 \
59+
$(srcdir)/scripts \
6060
$(NULL)
6161

6262
BUILT_SOURCES = \
File renamed without changes.

build/README.md

-11
This file was deleted.

build/efr32/efr32-app.mk config/efr32/efr32-app.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
# PROJECT_ROOT = $(realpath .)
3636
#
37-
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/efr32
37+
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/efr32
3838
#
3939
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
4040
# include $(BUILD_SUPPORT_DIR)/efr32-chip.mk

build/efr32/efr32-chip.mk config/efr32/efr32-chip.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#
2929
# PROJECT_ROOT = $(realpath .)
3030
#
31-
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/efr32
31+
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/efr32
3232
#
3333
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
3434
# include $(BUILD_SUPPORT_DIR)/efr32-chip.mk

build/efr32/efr32-freertos.mk config/efr32/efr32-freertos.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#
3131
# PROJECT_ROOT = $(realpath .)
3232
#
33-
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/openweave-core/build/efr32
33+
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/openweave-core/config/efr32
3434
#
3535
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
3636
# include $(BUILD_SUPPORT_DIR)/efr32-openweave.mk

build/nrf5/nrf5-app.mk config/nrf5/nrf5-app.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
# PROJECT_ROOT = $(realpath .)
3636
#
37-
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/nrf5
37+
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/nrf5
3838
#
3939
# include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
4040
#

build/nrf5/nrf5-chip.mk config/nrf5/nrf5-chip.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#
2929
# PROJECT_ROOT = $(realpath .)
3030
#
31-
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/nrf5
31+
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/nrf5
3232
#
3333
# include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
3434
# include $(BUILD_SUPPORT_DIR)/nrf5-chip.mk

build/config/standalone/CHIPProjectConfig.h config/standalone/CHIPProjectConfig.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#ifndef CHIPPROJECTCONFIG_H
2525
#define CHIPPROJECTCONFIG_H
2626

27-
2827
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
2928

3029
// Configure WDM for event offload
@@ -57,7 +56,7 @@
5756
#define WDM_ENFORCE_EXPIRY_TIME 1
5857

5958
// Increase session idle timeout in stand-alone builds for the convenience of developers.
60-
#define CHIP_CONFIG_DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT 120000
59+
#define CHIP_CONFIG_DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT 120000
6160

6261
#define CHIP_CONFIG_ENABLE_WDM_UPDATE 1
6362

configure.ac

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ AC_CONFIG_AUX_DIR([build/autoconf])
8080
# Tell autoconf where to find auxilliary M4 macros
8181
# Note that nlbuild-autotools has macros in two subdirs, for local vs third-party scripts
8282
#
83-
AC_CONFIG_MACRO_DIRS([build/autoconf/m4 third_party/nlbuild-autotools/repo/third_party/autoconf/m4 third_party/nlbuild-autotools/repo/autoconf/m4])
83+
AC_CONFIG_MACRO_DIRS([build/autoconf/m4 autoconf/m4 third_party/nlbuild-autotools/repo/third_party/autoconf/m4 third_party/nlbuild-autotools/repo/autoconf/m4])
8484

8585
#
8686
# Tell autoconf what file the package is using to aggregate C preprocessor
@@ -1274,23 +1274,23 @@ AC_LANG_PUSH([C++])
12741274

12751275
# SystemLayer
12761276

1277-
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-system-project-includes, SYSTEM_PROJECT_CONFIG_INCLUDE, SystemProjectConfig.h, CHIP System Layer, ${ac_abs_confdir}/build/config/standalone)
1277+
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-system-project-includes, SYSTEM_PROJECT_CONFIG_INCLUDE, SystemProjectConfig.h, CHIP System Layer, ${ac_abs_confdir}/config/standalone)
12781278

12791279
# BleLayer
12801280

12811281
if test ${CONFIG_NETWORK_LAYER_BLE} = 1; then
1282-
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-ble-project-includes, BLE_PROJECT_CONFIG_INCLUDE, BleProjectConfig.h, CHIP BLE Layer, ${ac_abs_confdir}/build/config/standalone)
1282+
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-ble-project-includes, BLE_PROJECT_CONFIG_INCLUDE, BleProjectConfig.h, CHIP BLE Layer, ${ac_abs_confdir}/config/standalone)
12831283
fi
12841284

12851285
# InetLayer
12861286

12871287
if test ${CONFIG_NETWORK_LAYER_INET} = 1; then
1288-
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-inet-project-includes, INET_PROJECT_CONFIG_INCLUDE, InetProjectConfig.h, CHIP Inet Layer, ${ac_abs_confdir}/build/config/standalone)
1288+
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-inet-project-includes, INET_PROJECT_CONFIG_INCLUDE, InetProjectConfig.h, CHIP Inet Layer, ${ac_abs_confdir}/config/standalone)
12891289
fi
12901290

12911291
# Core
12921292

1293-
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-project-includes, CHIP_PROJECT_CONFIG_INCLUDE, CHIPProjectConfig.h, CHIP Core, ${ac_abs_confdir}/build/config/standalone)
1293+
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-project-includes, CHIP_PROJECT_CONFIG_INCLUDE, CHIPProjectConfig.h, CHIP Core, ${ac_abs_confdir}/config/standalone)
12941294

12951295
# Device Layer
12961296

examples/lock-app/efr32/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ GECKO_SDK_SUITE_DIR := $(EFR32_SDK_ROOT)/..
6767

6868
all : |
6969

70-
BUILD_SUPPORT_DIR := $(CHIP_ROOT)/build/efr32
70+
BUILD_SUPPORT_DIR := $(CHIP_ROOT)/config/efr32
7171

7272
include $(BUILD_SUPPORT_DIR)/efr32-app.mk
7373
include $(BUILD_SUPPORT_DIR)/efr32-chip.mk

examples/lock-app/nrf5/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
PROJECT_ROOT := $(realpath .)
2626

2727
CHIP_ROOT ?= $(realpath $(PROJECT_ROOT)/third_party/connectedhomeip)
28-
BUILD_SUPPORT_DIR = $(CHIP_ROOT)/build/nrf5
28+
BUILD_SUPPORT_DIR = $(CHIP_ROOT)/config/nrf5
2929

3030
include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
3131
include $(BUILD_SUPPORT_DIR)/nrf5-chip.mk
File renamed without changes.

src/include/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PRETTY_FILES = \
4747
CHIPVersion.h: force
4848

4949
define check-file-CHIPVersion.h
50-
$(top_srcdir)/build/scripts/gen-chip-version "`cat $(1)`" -o "$(2)"
50+
$(top_srcdir)/scripts/gen-chip-version "`cat $(1)`" -o "$(2)"
5151
endef # check-file-CHIPVersion.h
5252

5353
MAKEDIR_TARGETS=$(top_builddir)/.local-version

0 commit comments

Comments
 (0)