Changeset 1018 for trunk/lang/ruby


Ignore:
Timestamp:
Jun 8, 2008 6:24:34 PM (14 years ago)
Author:
gah
Message:

Massive changes: New directory/file layout

Location:
trunk/lang
Files:
2 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/lang/ruby/build.rb.in

    r896 r1018  
    1010cxx           = "@CXX@"
    1111cxxflags      = "@CXXFLAGS@"
     12srcdir        = "@srcdir@"
     13install       = "@INSTALL@"
     14shlib_cflags  = "@SHLIB_CFLAGS@"
     15shlib_ldflags  = "@SHLIB_LDFLAGS@"
    1216
    1317##############################################################################
     
    2024dlext         = Config::CONFIG["DLEXT"]
    2125rubydir       = Config::CONFIG["prefix"]
     26rb_archdir        = Config::CONFIG["archdir"]
    2227sitedir       = Config::CONFIG["sitedir"]
    2328ldshared      = Config::CONFIG["LDSHARED"]
     
    3641# Create Makefile
    3742
    38 f = File.new("Makefile", "w")
     43f = File.new("Makefile.ruby", "w")
    3944f.printf("\n")
     45f.printf("srcdir        = #{srcdir}\n")
     46f.printf("incdir        = $(RAPPTURE_DIR)/include\n")
     47f.printf("archdir       = #{rb_archdir}\n")
    4048f.printf("SOURCE        = #{source}\n")
    4149f.printf("TARGET        = #{target}\n\n")
     
    4553f.printf("RUBY_DIR      = #{rubydir}\n")
    4654f.printf("SITE_DIR      = #{sitedir}\n\n")
     55f.printf("SITE_DIR      = $(RAPPTURE_DIR)/lib/ruby/ruby_site\n\n")
    4756f.printf("CXX           = #{cxx}\n")
    48 f.printf("CXXFLAGS      = #{cxxflags}\n")
     57f.printf("CFLAGS        = #{cxxflags}\n")
    4958f.printf("CXX_DLFLAGS   = #{cxx_dlflags}\n")
    50 f.printf("CXX_INCLUDES  = -I$(RAPPTURE_DIR)/include -I$(RUBY_DIR)\n")
    51 f.printf("CXX_FLAGS     = $(CXXFLAGS) $(CXX_DLFLAGS) $(CXX_INCLUDES)\n\n")
     59f.printf("INCLUDES      = -I$(incdir) -I#{srcdir}/../../src/core -I$(archdir)/\n")
     60f.printf("INSTALL       = #{install}\n")
     61f.printf("SHLIB_FLAGS   = $(CFLAGS) $(CXX_DLFLAGS) $(LDFLAGS) $(INCLUDES)\n\n")
    5262f.printf("EXCEPTIONS    = #{exceptions}\n\n")
    53 f.printf("LDSHARED      = #{ldshared}\n")
    54 f.printf("LDFLAGS       = #{ldflags}\n")
    55 f.printf("LD_FLAGS      = $(LDFLAGS) -L$(RAPPTURE_DIR)/lib\n")
    56 f.printf("LIBS          = #{libs} -lrappture\n\n")
    57 f.printf("all: extension install\n\n")
    58 f.printf("extension: $(SOURCE).cc\n")
    59 f.printf("      $(CXX) $(CXX_FLAGS) $(EXCEPTIONS) -c $(SOURCE).cc\n")
    60 f.printf("      $(LDSHARED) $(LD_FLAGS) -o $(TARGET).$(DLEXT) $(SOURCE).$(OBJEXT) $(LIBS)\n\n")
    61 f.printf("install: $(TARGET).$(DLEXT)\n")
    62 f.printf("      @cp $(TARGET).$(DLEXT) $(SITE_DIR)\n\n")
     63f.printf("SHLIB_LD      = #{ldshared}\n")
     64f.printf("LDFLAGS       = #{ldflags}\n")
     65f.printf("LIBS          = -L../../src/core -lrappture #{libs}\n\n")
     66f.printf("package       = $(TARGET).$(DLEXT)\n\n")
     67f.printf("all: extension\n\n")
     68f.printf("extension: $(package)\n")
     69f.printf("$(package): $(srcdir)/$(SOURCE).cc\n")
     70f.printf("      $(SHLIB_LD) $(SHLIB_FLAGS) $(EXCEPTIONS) $< -o $@ $(LIBS)\n\n")
     71f.printf("install: $(package)\n")
     72f.printf("      $(INSTALL) -m 0755 $(package) $(SITE_DIR)\n\n")
    6373f.close
    6474 
     
    6676# Build the extension
    6777
    68 `make extension`
     78#`make extension`
    6979#`make install`
    7080
Note: See TracChangeset for help on using the changeset viewer.