rbconfig_fix.rb 659 B

123456789101112131415161718192021
  1. install = '/usr/bin/install INSTALL_ARGS'
  2. c = RbConfig::CONFIG
  3. m = RbConfig::MAKEFILE_CONFIG
  4. if v = ENV['BSD_INSTALL_SCRIPT']
  5. m['INSTALL'] = c['INSTALL'] = v.sub('-m 755', '')
  6. m['INSTALL_SCRIPT'] = c['INSTALL_SCRIPT'] = v
  7. else
  8. m['INSTALL'] = c['INSTALL'] = "#{install}"
  9. m['INSTALL_SCRIPT'] = c['INSTALL_SCRIPT'] = "#{install} -m 755"
  10. end
  11. if v = ENV['BSD_INSTALL_PROGRAM']
  12. m['INSTALL_PROGRAM'] = c['INSTALL_PROGRAM'] = v
  13. else
  14. m['INSTALL_PROGRAM'] = c['INSTALL_PROGRAM'] = "#{install} -s -m 755"
  15. end
  16. if v = ENV['BSD_INSTALL_DATA']
  17. m['INSTALL_DATA'] = c['INSTALL_DATA'] = v
  18. else
  19. m['INSTALL_DATA'] = c['INSTALL_DATA'] = "#{install} -m 644"
  20. end