aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-20 01:23:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-20 01:23:23 +0000
commit717f40a9210916027d0e5414e2cc8e780c14bbe4 (patch)
treead7736a0798e0ac101ad6271524d03055eeba88b /Makefile.in
parent765952da8a1e5108265c2fa6b790e897821498d3 (diff)
downloadruby-717f40a9210916027d0e5414e2cc8e780c14bbe4.tar.gz
Makefile.in: function to quote for mjit_config.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in35
1 files changed, 12 insertions, 23 deletions
diff --git a/Makefile.in b/Makefile.in
index 3781d1ac3f..2b308f49ee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -544,33 +544,22 @@ un-runnable:
mjit_config.h:
$(ECHO) making $@
@{ \
+ quote() { \
+ printf "#define $$1"; shift; \
+ $${1+printf ' "%s"'$$sep "$$@"}; \
+ echo; \
+ }; \
test "$(Q)" = @ || set -x; \
echo '#ifndef RUBY_MJIT_CONFIG_H'; \
echo '#define RUBY_MJIT_CONFIG_H 1'; \
- \
- printf '#define MJIT_CC_COMMON ' && \
- if test -n "$(CC)"; then printf ' "%s",' $(CC); fi && \
echo; \
- \
- printf '#define MJIT_CFLAGS ' && \
- printf ' "%s",' -w $(ARCH_FLAG) && \
+ sep=,; \
+ quote "MJIT_CC_COMMON " $(CC); \
+ quote "MJIT_CFLAGS " -w $(ARCH_FLAG); \
+ quote "MJIT_OPTFLAGS " $(optflags); \
+ quote "MJIT_DEBUGFLAGS " $(debugflags); \
+ quote "MJIT_LDSHARED " @LDSHARED@; \
+ quote "MJIT_DLDFLAGS " @DLDFLAGS@; \
echo; \
- \
- printf '#define MJIT_OPTFLAGS ' && \
- if test -n "$(optflags)"; then printf ' "%s",' $(optflags); fi && \
- echo; \
- \
- printf '#define MJIT_DEBUGFLAGS ' && \
- if test -n "$(debugflags)"; then printf ' "%s",' $(debugflags); fi && \
- echo; \
- \
- printf '#define MJIT_LDSHARED ' && \
- if test -n "@LDSHARED@"; then printf ' "%s",' @LDSHARED@; fi && \
- echo; \
- \
- printf '#define MJIT_DLDFLAGS ' && \
- if test -n "@DLDFLAGS@"; then printf ' "%s",' @DLDFLAGS@; fi && \
- echo; \
- \
echo '#endif /* RUBY_MJIT_CONFIG_H */'; \
} > $@