summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-10 06:38:18 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-10 06:38:18 (GMT)
commit9a63e76b816f597a8ebef10646b3fbdcdf14a882 (patch)
tree782d41eac738cda012d847584707821b4405d2f2 /defs
parentf6ca5edf3e3968a867faf82d763ffca45cf4483d (diff)
select each files for architectures
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs')
-rw-r--r--defs/gmake.mk15
1 files changed, 8 insertions, 7 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 218b082..7f83e67 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -154,13 +154,14 @@ $(foreach x,$(patsubst -arch=%,%,$(arch_flags)), \
mjit_min_headers := $(patsubst -arch=%,$(MJIT_MIN_HEADER:.h=-%.h),$(arch_flags))
$(MJIT_MIN_HEADER): $(mjit_min_headers) $(PREP)
@ set -e; set $(patsubst -arch=%,%,$(arch_flags)); \
- cd $(@D); h=$(@F:.h=); set -x; \
- cp $$h-$$1.h $$h.h.new; shift; \
- for arch; do \
- mv $$h.h.new $$h.h.tmp; \
- diff -B -D__$${arch}__ $$h.h.tmp $$h-$$arch.h > $$h.h.new || :; \
- done
- $(RM) $@.tmp
+ cd $(@D); h=$(@F:.h=); \
+ exec > $(@F).new; \
+ echo '#if 0'; \
+ for arch; do\
+ echo "#elif defined __$${arch}__"; \
+ echo "# include \"$$h-$$arch.h\""; \
+ done; \
+ echo "#else"; echo "# error unsupported platform"; echo "#endif"
$(IFCHANGE) $@ $@.new
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
$(Q) $(MAKE_LINK) $@ $(MJIT_HEADER_INSTALL_DIR)/$(@F)