From 7fe8a2d7c41bb1c4a94d404a6a79b0e694b8dc9e Mon Sep 17 00:00:00 2001 From: Kenji Rikitake Date: Tue, 25 Nov 2014 07:13:23 +0900 Subject: plugins/c_src.mk: use non-regex file extention detection * The `-regex` option of `find` command to determine `SOURCES` in plugins/c_src.mk` is not portable; does not work on OS X. Rewrite with a portable form of using `find` native `-name` command option with `\(`, `-o`, and `\)`. * Support file extentions of `*.c`, `*.C`, `*.cc`, and `*.cpp`. --- erlang.mk | 2 +- plugins/c_src.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erlang.mk b/erlang.mk index 8226e30..f97d619 100644 --- a/erlang.mk +++ b/erlang.mk @@ -632,7 +632,7 @@ clean:: $(MAKE) -C $(C_SRC_DIR) clean else -SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)") +SOURCES := $(shell find $(C_SRC_DIR) -type f \( -name "*.c" -o -name "*.C" -o -name "*.cc" -o -name "*.cpp" \)) OBJECTS = $(addsuffix .o, $(basename $(SOURCES))) COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c diff --git a/plugins/c_src.mk b/plugins/c_src.mk index 734f13a..87e834b 100644 --- a/plugins/c_src.mk +++ b/plugins/c_src.mk @@ -55,7 +55,7 @@ clean:: $(MAKE) -C $(C_SRC_DIR) clean else -SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)") +SOURCES := $(shell find $(C_SRC_DIR) -type f \( -name "*.c" -o -name "*.C" -o -name "*.cc" -o -name "*.cpp" \)) OBJECTS = $(addsuffix .o, $(basename $(SOURCES))) COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c -- cgit v1.2.3