mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
c4fdfabcc8
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
39 lines
869 B
Ruby
39 lines
869 B
Ruby
# -*- coding: us-ascii -*-
|
|
# frozen_string_literal: false
|
|
require 'mkmf'
|
|
require 'fileutils'
|
|
|
|
# :stopdoc:
|
|
|
|
dir_config 'libyaml'
|
|
|
|
if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
|
|
# Embed libyaml since we could not find it.
|
|
|
|
$VPATH << "$(srcdir)/yaml"
|
|
$INCFLAGS << " -I$(srcdir)/yaml"
|
|
|
|
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}
|
|
|
|
if have_macro("_WIN32")
|
|
$CPPFLAGS << " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
|
|
end
|
|
|
|
have_header 'dlfcn.h'
|
|
have_header 'inttypes.h'
|
|
have_header 'memory.h'
|
|
have_header 'stdint.h'
|
|
have_header 'stdlib.h'
|
|
have_header 'strings.h'
|
|
have_header 'string.h'
|
|
have_header 'sys/stat.h'
|
|
have_header 'sys/types.h'
|
|
have_header 'unistd.h'
|
|
|
|
find_header 'yaml.h'
|
|
have_header 'config.h'
|
|
end
|
|
|
|
create_makefile 'psych'
|
|
|
|
# :startdoc:
|