ruby-changes:34209
From: nobu <ko1@a...>
Date: Mon, 2 Jun 2014 09:21:42 +0900 (JST)
Subject: [ruby-changes:34209] nobu:r46306 (trunk): gmake.mk: universal cpp rules
nobu 2014-06-02 04:32:15 +0900 (Mon, 02 Jun 2014) New Revision: 46306 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46306 Log: gmake.mk: universal cpp rules * defs/gmake.mk: define preprocessing rules per architectures for universal binaries. Modified files: trunk/defs/gmake.mk Index: defs/gmake.mk =================================================================== --- defs/gmake.mk (revision 46305) +++ defs/gmake.mk (revision 46306) @@ -9,6 +9,19 @@ ifneq ($(filter -O0 -Od,$(optflags)),) https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L9 override XCFLAGS := $(filter-out -D_FORTIFY_SOURCE=%,$(XCFLAGS)) endif +ifneq ($(filter universal-%,$(arch)),) +define archcmd +%.$(1).i: %.c + @$$(ECHO) preprocessing $$< with $(2) + $$(Q) $$(CPP) $$(warnflags) $(2) $$(XCFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$@ -E $$< > $$@ + +%.i: %.$(1).i +endef + +$(foreach $(filter -arch=%,$(subst -arch ,-arch=,$(ARCH_FLAG))),\ + $(eval $(call archcmd,$(patsubst -arch=%,%,$(value arch)),$(patsubst -arch=%,-arch %,$(value arch))))) +endif + ifneq ($(filter check% test,$(MAKECMDGOALS)),) yes-test-knownbug: $(TEST_DEPENDS) yes-btest-ruby yes-btest-ruby: $(TEST_DEPENDS) yes-test-sample -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/