aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenji Rikitake <[email protected]>2014-11-25 07:13:23 +0900
committerKenji Rikitake <[email protected]>2014-11-25 07:13:23 +0900
commit7fe8a2d7c41bb1c4a94d404a6a79b0e694b8dc9e (patch)
tree2b47b6e5ddfaa88a1def9f97a0564804574427db
parent18b73d5212d7dd88ff68ce845389be07921b6346 (diff)
downloaderlang.mk-7fe8a2d7c41bb1c4a94d404a6a79b0e694b8dc9e.tar.gz
erlang.mk-7fe8a2d7c41bb1c4a94d404a6a79b0e694b8dc9e.tar.bz2
erlang.mk-7fe8a2d7c41bb1c4a94d404a6a79b0e694b8dc9e.zip
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`.
-rw-r--r--erlang.mk2
-rw-r--r--plugins/c_src.mk2
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