Skip to content

Commit 0c376ed

Browse files
lukeglukedagar
authored andcommitted
fix sed unknown option to s'
when building with windows toolchain from eclipse
1 parent aec1b92 commit 0c376ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ all: px4_sitl_default
6363
space := $(subst ,, )
6464

6565
define make_list
66-
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's/[[:space:]]+(.*),/check_\1/g' | grep check_${2})
66+
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
6767
endef
6868

6969
# Parsing
@@ -77,7 +77,7 @@ ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
7777
# Get -j or --jobs argument as suggested in:
7878
# https://stackoverflow.com/a/33616144/8548472
7979
MAKE_PID := $(shell echo $$PPID)
80-
j := $(shell ps T | sed -n 's/.*$(MAKE_PID).*$(MAKE).* \(-j\|--jobs\) *\([0-9][0-9]*\).*/\2/p')
80+
j := $(shell ps T | sed -n 's|.*$(MAKE_PID).*$(MAKE).* \(-j\|--jobs\) *\([0-9][0-9]*\).*|\2|p')
8181

8282
# Default j for clang-tidy
8383
j_clang_tidy := $(or $(j),4)
@@ -189,9 +189,9 @@ endef
189189
define cmake-cache-check
190190
@# change to build folder which fails if it doesn't exist and CACHED_CMAKE_OPTIONS stays empty
191191
@# fetch all previously configured and cached options from the build folder and transform them into the OPTION=VALUE format without type (e.g. :BOOL)
192-
@$(eval CACHED_CMAKE_OPTIONS = $(shell cd $(BUILD_DIR) 2>/dev/null && cmake -L 2>/dev/null | sed -n 's/\([^[:blank:]]*\):[^[:blank:]]*\(=[^[:blank:]]*\)/\1\2/gp' ))
192+
@$(eval CACHED_CMAKE_OPTIONS = $(shell cd $(BUILD_DIR) 2>/dev/null && cmake -L 2>/dev/null | sed -n 's|\([^[:blank:]]*\):[^[:blank:]]*\(=[^[:blank:]]*\)|\1\2|gp' ))
193193
@# transform the options in CMAKE_ARGS into the OPTION=VALUE format without -D
194-
@$(eval DESIRED_CMAKE_OPTIONS = $(shell echo $(CMAKE_ARGS) | sed -n 's/-D\([^[:blank:]]*=[^[:blank:]]*\)/\1/gp' ))
194+
@$(eval DESIRED_CMAKE_OPTIONS = $(shell echo $(CMAKE_ARGS) | sed -n 's|-D\([^[:blank:]]*=[^[:blank:]]*\)|\1|gp' ))
195195
@# find each currently desired option in the already cached ones making sure the complete configured string value is the same
196196
@$(eval VERIFIED_CMAKE_OPTIONS = $(foreach option,$(DESIRED_CMAKE_OPTIONS),$(strip $(findstring $(option)$(space),$(CACHED_CMAKE_OPTIONS)))))
197197
@# if the complete list of desired options is found in the list of verified options we don't need to reconfigure and CMAKE_CACHE_CHECK stays empty
@@ -206,7 +206,7 @@ define colorecho
206206
endef
207207

208208
# Get a list of all config targets boards/*/*.cmake
209-
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's/boards\///' | sed -e 's/\.cmake//' | sed -e 's/\//_/g' | sort)
209+
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
210210

211211
# ADD CONFIGS HERE
212212
# --------------------------------------------------------------------

0 commit comments

Comments
 (0)